Retrieve a User
Get a single user by its unique ID or fully qualified name.
Get by ID
UUID of the user to retrieve.
Comma-separated list of fields to include (e.g., teams,roles,personas,domains,follows,owns).
include
string
default:"non-deleted"
Include all, deleted, or non-deleted entities.
Get by Fully Qualified Name
Use GET /v1/users/name/{fqn} to retrieve by fully qualified name.
Fully qualified name of the user (e.g., aaron_johnson0).
Comma-separated list of fields to include: teams, roles, personas, domains, follows, owns.
include
string
default:"non-deleted"
Include all, deleted, or non-deleted entities.
from metadata.sdk import configure
from metadata.sdk.entities import Users
configure(
host="https://your-company.getcollate.io/api",
jwt_token="your-jwt-token"
)
# Get by ID
user = Users.retrieve("77655e6e-ad33-49da-bbca-db4ba4d4e2cd")
print(f"{user.fullyQualifiedName}: {user.email}")
# Get by ID with fields
user = Users.retrieve(
"77655e6e-ad33-49da-bbca-db4ba4d4e2cd",
fields=["teams", "roles", "domains"]
)
# Get by fully qualified name
user = Users.retrieve_by_name("aaron_johnson0")
# Get by name with fields
user = Users.retrieve_by_name(
"aaron_johnson0",
fields=["teams", "roles", "domains"]
)
{
"id": "77655e6e-ad33-49da-bbca-db4ba4d4e2cd",
"name": "aaron_johnson0",
"fullyQualifiedName": "aaron_johnson0",
"displayName": "Aaron Johnson",
"version": 0.1,
"updatedAt": 1769982624214,
"updatedBy": "admin",
"email": "[email protected]",
"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 a user object with all requested fields populated.
Response
Unique identifier for the user (UUID format).
Fully qualified name (same as name for users).
Human-readable display name.
Email address of the user.
Whether this user is a bot account.
Whether this user has admin privileges.
Teams the user belongs to. Only included when fields contains teams.
Roles assigned to the user. Only included when fields contains roles.
Personas assigned. Only included when fields contains personas.
Domain assignments. Only included when fields contains domains.
Entities the user follows. Only included when fields contains follows.
Entities owned by the user. Only included when fields contains owns.
Version number for the entity.
Error Handling
| Code | Error Type | Description |
|---|
401 | UNAUTHORIZED | Invalid or missing authentication token |
403 | FORBIDDEN | User lacks permission to view this user |
404 | NOT_FOUND | User with given ID or FQN does not exist |