Skip to content

Product documentation

UserRoles

User-to-role assignments (RBAC).

UserRoles

User-to-role assignments (RBAC).

Base URL: https://api.stg.thoryn.org

Operations

MethodPathSummaryScopes
GET/api/v1/users/{userId}/rolesUser Roles Listtenant:roles.read
POST/api/v1/users/{userId}/rolesUser Roles Assigntenant:roles.write
DELETE/api/v1/users/{userId}/roles/{roleId}User Roles Unassigntenant:roles.write

Operation details

GET /api/v1/users/{userId}/roles

User Roles List

  • Operation ID: userRolesList
  • Required scopes: tenant:roles.read

Parameters:

NameInRequiredTypeDescription
userIdpathyesstring
limitquerynointeger
cursorquerynostring

Responses:

StatusDescriptionBody
200OKobject
401Unauthorized — bearer token missing, expired, signed by an untrusted issuer, or missing the tnt tenant claim.Problem (problem+json)
403Forbidden — token lacks a required tenant:* scope, or the tnt claim does not match the tenant addressed by the request path.Problem (problem+json)

POST /api/v1/users/{userId}/roles

User Roles Assign

  • Operation ID: userRolesAssign
  • Required scopes: tenant:roles.write

Parameters:

NameInRequiredTypeDescription
userIdpathyesstring

Request body (required): application/jsonAssignRoleRequest

Responses:

StatusDescriptionBody
200OKobject
401Unauthorized — bearer token missing, expired, signed by an untrusted issuer, or missing the tnt tenant claim.Problem (problem+json)
403Forbidden — token lacks a required tenant:* scope, or the tnt claim does not match the tenant addressed by the request path.Problem (problem+json)

DELETE /api/v1/users/{userId}/roles/{roleId}

User Roles Unassign

  • Operation ID: userRolesUnassign
  • Required scopes: tenant:roles.write

Parameters:

NameInRequiredTypeDescription
userIdpathyesstring
roleIdpathyesstring
organizationIdquerynostring

Responses:

StatusDescriptionBody
200OKobject
401Unauthorized — bearer token missing, expired, signed by an untrusted issuer, or missing the tnt tenant claim.Problem (problem+json)
403Forbidden — token lacks a required tenant:* scope, or the tnt claim does not match the tenant addressed by the request path.Problem (problem+json)