PUT /v1/users
curl -X PUT "{base_url}/api/v1/users" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{
"name": "aaron_johnson0",
"displayName": "Aaron Johnson",
"email": "aaron_johnson0@gmail.com",
"description": "Data analyst in the Sales team",
"teams": ["4f87a3ea-d798-4509-8c64-5b11f8a96f89"],
"roles": ["a0c1b2d3-e4f5-4a6b-8c7d-9e0f1a2b3c4d"]
}'
from metadata.sdk import configure
from metadata.sdk.entities import Users
configure(
host="https://your-company.getcollate.io/api",
jwt_token="your-jwt-token"
)
# Retrieve, modify, and update
user = Users.retrieve("77655e6e-ad33-49da-bbca-db4ba4d4e2cd")
user.description = "Senior data analyst in the Sales team"
user.displayName = "Aaron M. Johnson"
updated = Users.update(user)
print(f"Updated to version {updated.version.root}")
// client is an initialized OpenMetadataClient.
var userId = "77655e6e-ad33-49da-bbca-db4ba4d4e2cd";
var user = client.users().get(userId);
user.setDescription("Senior data analyst in the Sales team");
var updated = client.users().update(userId, user);
# Update by ID
curl -X PATCH "{base_url}/api/v1/users/77655e6e-ad33-49da-bbca-db4ba4d4e2cd" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json-patch+json" \
-d '[
{"op": "replace", "path": "/description", "value": "Senior data analyst in the Sales team"},
{"op": "replace", "path": "/displayName", "value": "Aaron M. Johnson"}
]'
# Update by name
curl -X PATCH "{base_url}/api/v1/users/name/aaron_johnson0" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json-patch+json" \
-d '[
{"op": "replace", "path": "/description", "value": "Senior data analyst in the Sales team"}
]'
{
"id": "77655e6e-ad33-49da-bbca-db4ba4d4e2cd",
"name": "aaron_johnson0",
"fullyQualifiedName": "aaron_johnson0",
"displayName": "Aaron M. Johnson",
"description": "Senior data analyst in the Sales team",
"version": 0.2,
"updatedAt": 1769982624214,
"updatedBy": "admin",
"email": "aaron_johnson0@gmail.com",
"href": "http://localhost:8585/api/v1/users/77655e6e-ad33-49da-bbca-db4ba4d4e2cd",
"isBot": false,
"isAdmin": false,
"allowImpersonation": false,
"teams": [
{
"id": "7a2b921b-f623-4eb5-9736-649788ad842c",
"type": "team",
"name": "Sales",
"fullyQualifiedName": "Sales",
"displayName": "Sales",
"deleted": false
}
],
"personas": [],
"deleted": false,
"roles": [
{
"id": "761c2bb2-0b77-4bc5-9af9-cf89536d6a12",
"type": "role",
"name": "DataSteward",
"fullyQualifiedName": "DataSteward",
"displayName": "Data Steward",
"deleted": false
}
],
"domains": []
}
Update a User
Create or update a user with a full request body
PUT
/
v1
/
users
PUT /v1/users
curl -X PUT "{base_url}/api/v1/users" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{
"name": "aaron_johnson0",
"displayName": "Aaron Johnson",
"email": "aaron_johnson0@gmail.com",
"description": "Data analyst in the Sales team",
"teams": ["4f87a3ea-d798-4509-8c64-5b11f8a96f89"],
"roles": ["a0c1b2d3-e4f5-4a6b-8c7d-9e0f1a2b3c4d"]
}'
from metadata.sdk import configure
from metadata.sdk.entities import Users
configure(
host="https://your-company.getcollate.io/api",
jwt_token="your-jwt-token"
)
# Retrieve, modify, and update
user = Users.retrieve("77655e6e-ad33-49da-bbca-db4ba4d4e2cd")
user.description = "Senior data analyst in the Sales team"
user.displayName = "Aaron M. Johnson"
updated = Users.update(user)
print(f"Updated to version {updated.version.root}")
// client is an initialized OpenMetadataClient.
var userId = "77655e6e-ad33-49da-bbca-db4ba4d4e2cd";
var user = client.users().get(userId);
user.setDescription("Senior data analyst in the Sales team");
var updated = client.users().update(userId, user);
# Update by ID
curl -X PATCH "{base_url}/api/v1/users/77655e6e-ad33-49da-bbca-db4ba4d4e2cd" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json-patch+json" \
-d '[
{"op": "replace", "path": "/description", "value": "Senior data analyst in the Sales team"},
{"op": "replace", "path": "/displayName", "value": "Aaron M. Johnson"}
]'
# Update by name
curl -X PATCH "{base_url}/api/v1/users/name/aaron_johnson0" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json-patch+json" \
-d '[
{"op": "replace", "path": "/description", "value": "Senior data analyst in the Sales team"}
]'
{
"id": "77655e6e-ad33-49da-bbca-db4ba4d4e2cd",
"name": "aaron_johnson0",
"fullyQualifiedName": "aaron_johnson0",
"displayName": "Aaron M. Johnson",
"description": "Senior data analyst in the Sales team",
"version": 0.2,
"updatedAt": 1769982624214,
"updatedBy": "admin",
"email": "aaron_johnson0@gmail.com",
"href": "http://localhost:8585/api/v1/users/77655e6e-ad33-49da-bbca-db4ba4d4e2cd",
"isBot": false,
"isAdmin": false,
"allowImpersonation": false,
"teams": [
{
"id": "7a2b921b-f623-4eb5-9736-649788ad842c",
"type": "team",
"name": "Sales",
"fullyQualifiedName": "Sales",
"displayName": "Sales",
"deleted": false
}
],
"personas": [],
"deleted": false,
"roles": [
{
"id": "761c2bb2-0b77-4bc5-9af9-cf89536d6a12",
"type": "role",
"name": "DataSteward",
"fullyQualifiedName": "DataSteward",
"displayName": "Data Steward",
"deleted": false
}
],
"domains": []
}
Update a User
Create a user or update it if it already exists, usingPUT /v1/users with the full request body. Send the complete definition, not just the fields you want to change. To change only some fields, use PATCH with a JSON Patch array and the application/json-patch+json content type, as shown in the PATCH examples below.
Body Parameters
string
required
Username for the user. Must be unique across the organization.
string
required
Email address of the user. Must be unique across the organization.
string
Human-readable display name for the user.
string
Description of the user in Markdown format.
boolean
default:"false"
Whether this user is a bot account.
boolean
default:"false"
Whether this user has admin privileges.
array
Array of team UUIDs to assign the user to.
array
Array of role UUIDs to assign to the user.
array
Array of persona references to assign to the user.
array
Array of fully qualified names of the domains to assign for governance purposes.
object
PUT /v1/users
curl -X PUT "{base_url}/api/v1/users" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{
"name": "aaron_johnson0",
"displayName": "Aaron Johnson",
"email": "aaron_johnson0@gmail.com",
"description": "Data analyst in the Sales team",
"teams": ["4f87a3ea-d798-4509-8c64-5b11f8a96f89"],
"roles": ["a0c1b2d3-e4f5-4a6b-8c7d-9e0f1a2b3c4d"]
}'
from metadata.sdk import configure
from metadata.sdk.entities import Users
configure(
host="https://your-company.getcollate.io/api",
jwt_token="your-jwt-token"
)
# Retrieve, modify, and update
user = Users.retrieve("77655e6e-ad33-49da-bbca-db4ba4d4e2cd")
user.description = "Senior data analyst in the Sales team"
user.displayName = "Aaron M. Johnson"
updated = Users.update(user)
print(f"Updated to version {updated.version.root}")
// client is an initialized OpenMetadataClient.
var userId = "77655e6e-ad33-49da-bbca-db4ba4d4e2cd";
var user = client.users().get(userId);
user.setDescription("Senior data analyst in the Sales team");
var updated = client.users().update(userId, user);
# Update by ID
curl -X PATCH "{base_url}/api/v1/users/77655e6e-ad33-49da-bbca-db4ba4d4e2cd" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json-patch+json" \
-d '[
{"op": "replace", "path": "/description", "value": "Senior data analyst in the Sales team"},
{"op": "replace", "path": "/displayName", "value": "Aaron M. Johnson"}
]'
# Update by name
curl -X PATCH "{base_url}/api/v1/users/name/aaron_johnson0" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json-patch+json" \
-d '[
{"op": "replace", "path": "/description", "value": "Senior data analyst in the Sales team"}
]'
{
"id": "77655e6e-ad33-49da-bbca-db4ba4d4e2cd",
"name": "aaron_johnson0",
"fullyQualifiedName": "aaron_johnson0",
"displayName": "Aaron M. Johnson",
"description": "Senior data analyst in the Sales team",
"version": 0.2,
"updatedAt": 1769982624214,
"updatedBy": "admin",
"email": "aaron_johnson0@gmail.com",
"href": "http://localhost:8585/api/v1/users/77655e6e-ad33-49da-bbca-db4ba4d4e2cd",
"isBot": false,
"isAdmin": false,
"allowImpersonation": false,
"teams": [
{
"id": "7a2b921b-f623-4eb5-9736-649788ad842c",
"type": "team",
"name": "Sales",
"fullyQualifiedName": "Sales",
"displayName": "Sales",
"deleted": false
}
],
"personas": [],
"deleted": false,
"roles": [
{
"id": "761c2bb2-0b77-4bc5-9af9-cf89536d6a12",
"type": "role",
"name": "DataSteward",
"fullyQualifiedName": "DataSteward",
"displayName": "Data Steward",
"deleted": false
}
],
"domains": []
}
Returns
Returns the updated user object with the new version number.Response
string
Unique identifier for the user (UUID format).
string
Username.
string
Fully qualified name (same as
name for users).string
Updated description.
number
Incremented version number.
Error Handling
| Code | Error Type | Description |
|---|---|---|
400 | BAD_REQUEST | Invalid or malformed request body |
401 | UNAUTHORIZED | Invalid or missing authentication token |
403 | FORBIDDEN | User lacks permission to update this user |
409 | CONFLICT | Concurrent modification detected |
Was this page helpful?