Update Project#
You can update a project through the NeMo Entity Store microservice to change details such as its description or custom fields.
Prerequisites#
Before you can update a project, make sure that you have:
Obtained the base URL of the NeMo Entity Store microservice.
Permissions to access the NeMo Entity Store microservice endpoint.
Obtained the
namespace
andproject_name
of the project you want to update.
To Update a Project#
Choose one of the following options of updating a project.
Set up a NeMoMicroservices
client instance using the base URL of the NeMo Entity Store microservice and perform the task as follows.
from nemo_microservices import NeMoMicroservices
client = NeMoMicroservices(
base_url=os.environ["ENTITY_STORE_BASE_URL"]
)
response = client.projects.update(
namespace="your-namespace", # Namespace that you create using NeMo Entity Store
project_name="your-project-name",
custom_fields={
"team": "your-team",
"priority": "your-priority",
"status": "your-status", "target_completion": "your-target-completion",
},
)
print(response)
Make a PATCH request to the /v1/projects/{namespace}/{project_name}
endpoint.
export ENTITY_STORE_BASE_URL=<URL for NeMo Entity Store>
export NAMESPACE="your-namespace" # Namespace that you create using NeMo Entity Store
export PROJECT_NAME="your-project-name"
# URL-encode the project name if necessary.
ENCODED_PROJECT_NAME=$(printf %s "$PROJECT_NAME" | jq -sRr @uri)
curl -X PATCH "${ENTITY_STORE_BASE_URL}/v1/projects/${NAMESPACE}/${ENCODED_PROJECT_NAME}" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"custom_fields": {
"team": "your-team",
"priority": "your-priority",
"status": "your-status",
"target_completion": "your-target-completion"
}
}' | jq
Example Response
{
"schema_version": "1.0",
"id": "project-RM4tayGfUwA1aqu5NfTDA1",
"description": "A project for documentation testing",
"type_prefix": null,
"namespace": "docs",
"project": null,
"created_at": "2025-02-12T17:00:33.795767",
"updated_at": "2025-02-12T17:00:33.795769",
"custom_fields": {
"team": "your-team",
"priority": "your-priority",
"status": "your-status",
"target_completion": "your-target-completion"
},
"ownership": {
"created_by": "user@example.com",
"access_policies": {}
},
"name": "Your Project"
}