User Role Assignments
5 Endpunkte. Basis-URL: https://xapi.ambertech.cloud/api/v1
List role assignments (filter by user_id or role_id)#
GET
/user-role-assignmentsTokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
user_id | Query | string | – |
role_id | Query | string | – |
Antworten
- 200OK
Beispiel (cURL)
curl -X GET "https://xapi.ambertech.cloud/api/v1/user-role-assignments" \
-H "Authorization: Bearer $XISUITE_TOKEN"Assign a role to a user#
POST
/user-role-assignmentsTokenRequest-Body
| Name | Typ | Beschreibung |
|---|---|---|
user_idPflicht | string | User ID to assign the role to |
role_idPflicht | string | Role ID to assign |
organizationId | string | Organization ID (defaults to JWT org) |
Antworten
- 201Erstellt
Beispiel (cURL)
curl -X POST "https://xapi.ambertech.cloud/api/v1/user-role-assignments" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"user_id":"…","role_id":"…"}'Unassign role(s) from a user (role_id optional — omit to remove all)#
DELETE
/user-role-assignmentsTokenRequest-Body
| Name | Typ | Beschreibung |
|---|---|---|
user_idPflicht | string | User ID to remove role from |
role_id | string | Role ID (if omitted, removes ALL roles from user) |
Antworten
- 200OK
Beispiel (cURL)
curl -X DELETE "https://xapi.ambertech.cloud/api/v1/user-role-assignments" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"user_id":"…"}'Get a role assignment by ID#
GET
/user-role-assignments/{id}TokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
idPflicht | Pfad | string | – |
Antworten
- 200OK
Beispiel (cURL)
curl -X GET "https://xapi.ambertech.cloud/api/v1/user-role-assignments/{id}" \
-H "Authorization: Bearer $XISUITE_TOKEN"Delete a role assignment by ID#
DELETE
/user-role-assignments/{id}TokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
idPflicht | Pfad | string | – |
Antworten
- 200OK
Beispiel (cURL)
curl -X DELETE "https://xapi.ambertech.cloud/api/v1/user-role-assignments/{id}" \
-H "Authorization: Bearer $XISUITE_TOKEN"