v1

latestOpenAPI 3.1.02026-08-04118425322.0 KB
userManagement

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.

put/api/v1/auth-management/users/{user_id}/roles

Path parameters

user_idstring required

The ID of the user to update

Headers

Authorizationstring required

Bearer authentication

Request body

roles_contextstring nullable

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_idstring required

Unique identifier for the user

namestring required

Display name of the user

emailstring nullable

Email address of the user

picturestring nullable

URL to the user's profile picture

created_atstring date-time required

Timestamp when the user was created

last_loginstring date-time nullable

Timestamp of the user's last login