Product documentation
UserRoles
User-to-role assignments (RBAC).
UserRoles
User-to-role assignments (RBAC).
Base URL: https://api.stg.thoryn.org
Operations
| Method | Path | Summary | Scopes |
|---|---|---|---|
GET | /api/v1/users/{userId}/roles | User Roles List | tenant:roles.read |
POST | /api/v1/users/{userId}/roles | User Roles Assign | tenant:roles.write |
DELETE | /api/v1/users/{userId}/roles/{roleId} | User Roles Unassign | tenant:roles.write |
Operation details
GET /api/v1/users/{userId}/roles
User Roles List
- Operation ID:
userRolesList - Required scopes:
tenant:roles.read
Parameters:
| Name | In | Required | Type | Description |
|---|---|---|---|---|
userId | path | yes | string | |
limit | query | no | integer | |
cursor | query | no | string |
Responses:
| Status | Description | Body |
|---|---|---|
200 | OK | object |
401 | Unauthorized — bearer token missing, expired, signed by an untrusted issuer, or missing the tnt tenant claim. | Problem (problem+json) |
403 | Forbidden — 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:
| Name | In | Required | Type | Description |
|---|---|---|---|---|
userId | path | yes | string |
Request body (required): application/json → AssignRoleRequest
Responses:
| Status | Description | Body |
|---|---|---|
200 | OK | object |
401 | Unauthorized — bearer token missing, expired, signed by an untrusted issuer, or missing the tnt tenant claim. | Problem (problem+json) |
403 | Forbidden — 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:
| Name | In | Required | Type | Description |
|---|---|---|---|---|
userId | path | yes | string | |
roleId | path | yes | string | |
organizationId | query | no | string |
Responses:
| Status | Description | Body |
|---|---|---|
200 | OK | object |
401 | Unauthorized — bearer token missing, expired, signed by an untrusted issuer, or missing the tnt tenant claim. | Problem (problem+json) |
403 | Forbidden — token lacks a required tenant:* scope, or the tnt claim does not match the tenant addressed by the request path. | Problem (problem+json) |