PATCH /v1/tags/{id}
from metadata.sdk import configure
from metadata.sdk.entities import Tags
configure(
host="https://your-company.open-metadata.org/api",
jwt_token="your-jwt-token"
)
# Retrieve, modify, and update
tag = Tags.retrieve("68ec158c-5f5e-4277-8a19-5e9e0cd5294f")
tag.description = "Updated: Bronze level certification for data assets"
tag.style = {"color": "#D4A017"}
updated = Tags.update(tag)
print(f"Updated to version {updated.version}")
import static org.openmetadata.sdk.fluent.Tags.*;
// Retrieve, modify, and update
var tag = Tags.retrieve("68ec158c-5f5e-4277-8a19-5e9e0cd5294f");
tag.setDescription("Updated: Bronze level certification for data assets");
var updated = Tags.update(tag);
# Update by ID
curl -X PATCH "{base_url}/api/v1/tags/68ec158c-5f5e-4277-8a19-5e9e0cd5294f" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json-patch+json" \
-d '[
{"op": "replace", "path": "/description", "value": "Updated: Bronze level certification for data assets"}
]'
# Update by name
curl -X PATCH "{base_url}/api/v1/tags/name/Certification.Bronze" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json-patch+json" \
-d '[
{"op": "replace", "path": "/description", "value": "Updated: Bronze level certification for data assets"}
]'
{
"id": "68ec158c-5f5e-4277-8a19-5e9e0cd5294f",
"name": "Bronze",
"fullyQualifiedName": "Certification.Bronze",
"description": "Updated: Bronze level certification for data assets",
"style": {
"color": "#D4A017"
},
"version": 0.2,
"updatedAt": 1769982619666,
"updatedBy": "admin",
"classification": {
"id": "06d90883-6be9-4f7e-9475-753f10a95e94",
"type": "classification",
"name": "Certification",
"fullyQualifiedName": "Certification",
"deleted": false
},
"deleted": false,
"owners": [],
"provider": "system",
"mutuallyExclusive": false
}
Update a Tag
Update tag properties using JSON Patch
PATCH
/
v1
/
tags
/
{id}
PATCH /v1/tags/{id}
from metadata.sdk import configure
from metadata.sdk.entities import Tags
configure(
host="https://your-company.open-metadata.org/api",
jwt_token="your-jwt-token"
)
# Retrieve, modify, and update
tag = Tags.retrieve("68ec158c-5f5e-4277-8a19-5e9e0cd5294f")
tag.description = "Updated: Bronze level certification for data assets"
tag.style = {"color": "#D4A017"}
updated = Tags.update(tag)
print(f"Updated to version {updated.version}")
import static org.openmetadata.sdk.fluent.Tags.*;
// Retrieve, modify, and update
var tag = Tags.retrieve("68ec158c-5f5e-4277-8a19-5e9e0cd5294f");
tag.setDescription("Updated: Bronze level certification for data assets");
var updated = Tags.update(tag);
# Update by ID
curl -X PATCH "{base_url}/api/v1/tags/68ec158c-5f5e-4277-8a19-5e9e0cd5294f" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json-patch+json" \
-d '[
{"op": "replace", "path": "/description", "value": "Updated: Bronze level certification for data assets"}
]'
# Update by name
curl -X PATCH "{base_url}/api/v1/tags/name/Certification.Bronze" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json-patch+json" \
-d '[
{"op": "replace", "path": "/description", "value": "Updated: Bronze level certification for data assets"}
]'
{
"id": "68ec158c-5f5e-4277-8a19-5e9e0cd5294f",
"name": "Bronze",
"fullyQualifiedName": "Certification.Bronze",
"description": "Updated: Bronze level certification for data assets",
"style": {
"color": "#D4A017"
},
"version": 0.2,
"updatedAt": 1769982619666,
"updatedBy": "admin",
"classification": {
"id": "06d90883-6be9-4f7e-9475-753f10a95e94",
"type": "classification",
"name": "Certification",
"fullyQualifiedName": "Certification",
"deleted": false
},
"deleted": false,
"owners": [],
"provider": "system",
"mutuallyExclusive": false
}
Update a Tag
Update a tag’s properties using JSON Merge Patch. You can update by ID or by fully qualified name.Update by ID
string
required
UUID of the tag to update.
Update by Name
UsePATCH /v1/tags/name/{fqn} to update by fully qualified name.
string
required
Fully qualified name of the tag (e.g.,
Certification.Bronze).Body Parameters
Send a JSON object with the fields to update. Only provided fields are changed.string
Updated description in Markdown format.
string
Updated display name.
object
array
PATCH /v1/tags/{id}
from metadata.sdk import configure
from metadata.sdk.entities import Tags
configure(
host="https://your-company.open-metadata.org/api",
jwt_token="your-jwt-token"
)
# Retrieve, modify, and update
tag = Tags.retrieve("68ec158c-5f5e-4277-8a19-5e9e0cd5294f")
tag.description = "Updated: Bronze level certification for data assets"
tag.style = {"color": "#D4A017"}
updated = Tags.update(tag)
print(f"Updated to version {updated.version}")
import static org.openmetadata.sdk.fluent.Tags.*;
// Retrieve, modify, and update
var tag = Tags.retrieve("68ec158c-5f5e-4277-8a19-5e9e0cd5294f");
tag.setDescription("Updated: Bronze level certification for data assets");
var updated = Tags.update(tag);
# Update by ID
curl -X PATCH "{base_url}/api/v1/tags/68ec158c-5f5e-4277-8a19-5e9e0cd5294f" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json-patch+json" \
-d '[
{"op": "replace", "path": "/description", "value": "Updated: Bronze level certification for data assets"}
]'
# Update by name
curl -X PATCH "{base_url}/api/v1/tags/name/Certification.Bronze" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json-patch+json" \
-d '[
{"op": "replace", "path": "/description", "value": "Updated: Bronze level certification for data assets"}
]'
{
"id": "68ec158c-5f5e-4277-8a19-5e9e0cd5294f",
"name": "Bronze",
"fullyQualifiedName": "Certification.Bronze",
"description": "Updated: Bronze level certification for data assets",
"style": {
"color": "#D4A017"
},
"version": 0.2,
"updatedAt": 1769982619666,
"updatedBy": "admin",
"classification": {
"id": "06d90883-6be9-4f7e-9475-753f10a95e94",
"type": "classification",
"name": "Certification",
"fullyQualifiedName": "Certification",
"deleted": false
},
"deleted": false,
"owners": [],
"provider": "system",
"mutuallyExclusive": false
}
Returns
Returns the updated tag object with the new version number.Response
string
Unique identifier for the tag (UUID format).
string
Tag name.
string
Fully qualified name of the tag.
string
Updated description.
number
Incremented version number.
Error Handling
| Code | Error Type | Description |
|---|---|---|
400 | BAD_REQUEST | Invalid JSON patch or malformed request |
401 | UNAUTHORIZED | Invalid or missing authentication token |
403 | FORBIDDEN | User lacks permission to update this tag |
404 | NOT_FOUND | Tag with given ID or FQN does not exist |
409 | CONFLICT | Concurrent modification detected |
Was this page helpful?
⌘I