Update Namespace#

You can update a namespace through the NeMo Entity Store microservice to change details such as its description or custom fields.

Prerequisites#

Before you can update a namespace, make sure that you have:

  • Obtained the base URL of your NeMo Entity Store Microservice.

  • Permissions to access the NeMo Entity Store microservice endpoint.

  • Obtained the id of the namespace you want to update.


How to Update a Namespace#

API#

  1. Make a PATCH request to the /v1/namespaces/{id} endpoint.

    Note

    Changes to custom_fields overwrite the existing custom_fields; include all custom_fields in the request, including the ones you want to update or add.

    export ENTITY_STORE_BASE_URL=<URL for NeMo Entity Store>
    
    NAMESPACE_ID="team-docs"
    
    curl -X PATCH "${ENTITY_STORE_BASE_URL}/v1/namespaces/${NAMESPACE_ID}" \
        -H 'Accept: application/json' \
        -H 'Content-Type: application/json' \
        -d '{
            "custom_fields": {
                "sandbox": "true",
                "location": "on-prem"
            }
        }' | jq
    
  2. Verify that the namespace was updated by reviewing the response.

    Example Response
    {
      "id": "team-docs",
      "created_at": "2025-02-12T18:45:40.227770",
      "updated_at": "2025-02-12T18:45:40.227774",
      "description": "The docs team",
      "project": null,
      "custom_fields": {
        "sandbox": "true",
        "location": "on-prem"
      },
      "ownership": {
        "created_by": "user@nvidia.com",
        "access_policies": {}
      }
    }