v1

latestOpenAPI 3.1.02026-07-2618690613.4 KB
User model roles

Assign or update user model role

Assign or update a model role for a user. If the user already has a role for the specified model, this endpoint will update it to the new role.

Model roles control what actions a user can perform on models and connections. To manage users, see the User APIs.

post/v1/users/{userId}/model-roles

Path parameters

userIdstring uuid required

The ID of the user to assign or update a model role for.

Request body

connectionIdstring uuid

The ID of the connection that the model belongs to:

  • Required if modelId is not provided
  • Optional if modelId is provided, in which case it will be inferred from the model
modelIdstring uuid

The ID of the model to assign the role for:

  • Optional when assigning CONNECTION_ADMIN or custom roles with CONNECTION_ADMIN as the base role
  • Required for other role types
roleNamestring required

The role to assign. Available roles include:

  • VIEWER - Can view the model
  • QUERIER - Can view and query the model
  • QUERY_TOPICS - Can query specific topics. Equivalent to Restricted Querier.
  • MODELER - Can edit and model the data
  • CONNECTION_ADMIN - Full administrative access to the connection
  • NO_ACCESS - No access to the model
  • Custom roles defined for your organization

Response

Model role assigned or updated successfully.

userIdstring uuid

The ID of the user.

connectionIdstring uuid

The ID of the connection.

modelIdstring uuid

The ID of the model.

roleNamestring

The assigned role name.