Update User Roles
Replace a user’s roles.
This endpoint allows administrators to replace the roles assigned to a user.
The roles can be scoped to a specific context (e.g., dataset or system). If a context is provided, the roles will only be replaced within that context. If no context is provided, all roles (system-level and dataset-level) will be replaced.
To replace roles at the system level, use the “system” context. To replace roles at the dataset level, use the “dataset:{dataset_id}” context.
Path parameters
user_id
The ID of the user to update
Headers
Authorization
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
This endpoint expects an object.
roles
New list of roles to assign to the user
roles_context
Context for the roles to update. This can either be ‘system’ for system-level roles or ‘dataset:{dataset_id}’ for dataset-level roles.
Response
The updated user profile with new roles
user_id
Unique identifier for the user
name
Display name of the user
created_at
Timestamp when the user was created
roles
List of roles assigned to the user
email
Email address of the user
picture
URL to the user's profile picture
last_login
Timestamp of the user's last login