PATCH /v1/teams/{id}
from metadata.sdk import configure
from metadata.sdk.entities import Teams
configure(
host="https://your-company.getcollate.io/api",
jwt_token="your-jwt-token"
)
# Retrieve, modify, and update
team = Teams.retrieve("449b5f25-4cbb-42db-8f71-3be2c5cd888a")
team.description = "Updated: Accounting team handling all financial reporting"
team.displayName = "Accounting & Reporting"
updated = Teams.update(team)
print(f"Updated to version {updated.version.root}")
// client is an initialized OpenMetadataClient.
var teamId = "449b5f25-4cbb-42db-8f71-3be2c5cd888a";
var team = client.teams().get(teamId);
team.setDescription("Updated: Accounting team handling all financial reporting");
var updated = client.teams().update(teamId, team);
# Update by ID
curl -X PATCH "{base_url}/api/v1/teams/449b5f25-4cbb-42db-8f71-3be2c5cd888a" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json-patch+json" \
-d '[
{"op": "replace", "path": "/description", "value": "Updated: Accounting team handling all financial reporting"},
{"op": "replace", "path": "/displayName", "value": "Accounting & Reporting"}
]'
{
"id": "449b5f25-4cbb-42db-8f71-3be2c5cd888a",
"teamType": "Group",
"name": "Accounting",
"fullyQualifiedName": "Accounting",
"displayName": "Accounting & Reporting",
"description": "Updated: Accounting team handling all financial reporting",
"version": 0.2,
"updatedAt": 1769982623753,
"updatedBy": "admin",
"href": "http://localhost:8585/api/v1/teams/449b5f25-4cbb-42db-8f71-3be2c5cd888a",
"parents": [
{
"id": "4f87a3ea-d798-4509-8c64-5b11f8a96f89",
"type": "team",
"name": "Finance",
"fullyQualifiedName": "Finance",
"displayName": "Finance",
"deleted": false
}
],
"users": [
{
"id": "2c4036a5-27d5-4d47-949f-3e8666e9d371",
"type": "user",
"name": "andrew_jennings3",
"fullyQualifiedName": "andrew_jennings3",
"displayName": "Andrew Jennings",
"deleted": false
}
],
"deleted": false,
"owners": [],
"domains": [],
"children": [],
"policies": []
}
Update a Team
Update team properties using JSON Patch operations to modify team type, users, roles, policies, domains, and organizational hierarchy via the Collate REST API.
PATCH
/
v1
/
teams
/
{id}
PATCH /v1/teams/{id}
from metadata.sdk import configure
from metadata.sdk.entities import Teams
configure(
host="https://your-company.getcollate.io/api",
jwt_token="your-jwt-token"
)
# Retrieve, modify, and update
team = Teams.retrieve("449b5f25-4cbb-42db-8f71-3be2c5cd888a")
team.description = "Updated: Accounting team handling all financial reporting"
team.displayName = "Accounting & Reporting"
updated = Teams.update(team)
print(f"Updated to version {updated.version.root}")
// client is an initialized OpenMetadataClient.
var teamId = "449b5f25-4cbb-42db-8f71-3be2c5cd888a";
var team = client.teams().get(teamId);
team.setDescription("Updated: Accounting team handling all financial reporting");
var updated = client.teams().update(teamId, team);
# Update by ID
curl -X PATCH "{base_url}/api/v1/teams/449b5f25-4cbb-42db-8f71-3be2c5cd888a" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json-patch+json" \
-d '[
{"op": "replace", "path": "/description", "value": "Updated: Accounting team handling all financial reporting"},
{"op": "replace", "path": "/displayName", "value": "Accounting & Reporting"}
]'
{
"id": "449b5f25-4cbb-42db-8f71-3be2c5cd888a",
"teamType": "Group",
"name": "Accounting",
"fullyQualifiedName": "Accounting",
"displayName": "Accounting & Reporting",
"description": "Updated: Accounting team handling all financial reporting",
"version": 0.2,
"updatedAt": 1769982623753,
"updatedBy": "admin",
"href": "http://localhost:8585/api/v1/teams/449b5f25-4cbb-42db-8f71-3be2c5cd888a",
"parents": [
{
"id": "4f87a3ea-d798-4509-8c64-5b11f8a96f89",
"type": "team",
"name": "Finance",
"fullyQualifiedName": "Finance",
"displayName": "Finance",
"deleted": false
}
],
"users": [
{
"id": "2c4036a5-27d5-4d47-949f-3e8666e9d371",
"type": "user",
"name": "andrew_jennings3",
"fullyQualifiedName": "andrew_jennings3",
"displayName": "Andrew Jennings",
"deleted": false
}
],
"deleted": false,
"owners": [],
"domains": [],
"children": [],
"policies": []
}
Update a Team
Update a team’s properties using JSON Merge Patch. You can update by ID.Update by ID
Body Parameters
Send a JSON object with the fields to update. Only provided fields are changed.PATCH /v1/teams/{id}
from metadata.sdk import configure
from metadata.sdk.entities import Teams
configure(
host="https://your-company.getcollate.io/api",
jwt_token="your-jwt-token"
)
# Retrieve, modify, and update
team = Teams.retrieve("449b5f25-4cbb-42db-8f71-3be2c5cd888a")
team.description = "Updated: Accounting team handling all financial reporting"
team.displayName = "Accounting & Reporting"
updated = Teams.update(team)
print(f"Updated to version {updated.version.root}")
// client is an initialized OpenMetadataClient.
var teamId = "449b5f25-4cbb-42db-8f71-3be2c5cd888a";
var team = client.teams().get(teamId);
team.setDescription("Updated: Accounting team handling all financial reporting");
var updated = client.teams().update(teamId, team);
# Update by ID
curl -X PATCH "{base_url}/api/v1/teams/449b5f25-4cbb-42db-8f71-3be2c5cd888a" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json-patch+json" \
-d '[
{"op": "replace", "path": "/description", "value": "Updated: Accounting team handling all financial reporting"},
{"op": "replace", "path": "/displayName", "value": "Accounting & Reporting"}
]'
{
"id": "449b5f25-4cbb-42db-8f71-3be2c5cd888a",
"teamType": "Group",
"name": "Accounting",
"fullyQualifiedName": "Accounting",
"displayName": "Accounting & Reporting",
"description": "Updated: Accounting team handling all financial reporting",
"version": 0.2,
"updatedAt": 1769982623753,
"updatedBy": "admin",
"href": "http://localhost:8585/api/v1/teams/449b5f25-4cbb-42db-8f71-3be2c5cd888a",
"parents": [
{
"id": "4f87a3ea-d798-4509-8c64-5b11f8a96f89",
"type": "team",
"name": "Finance",
"fullyQualifiedName": "Finance",
"displayName": "Finance",
"deleted": false
}
],
"users": [
{
"id": "2c4036a5-27d5-4d47-949f-3e8666e9d371",
"type": "user",
"name": "andrew_jennings3",
"fullyQualifiedName": "andrew_jennings3",
"displayName": "Andrew Jennings",
"deleted": false
}
],
"deleted": false,
"owners": [],
"domains": [],
"children": [],
"policies": []
}
Returns
Returns the updated team object with the new version number.Response
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 team |
404 | NOT_FOUND | Team with given ID does not exist |
409 | CONFLICT | Concurrent modification detected |
Was this page helpful?