Skip to content

List Unit Roles

GET
/units/{unitId}/roles

Lists all role assignments for a Unit. Each entry is enriched with user profile data (name, email, avatar) from the IdP. Returns 404 if the Unit does not exist.

unitId
required
string
X-Space-Id
required
string format: uuid

UUID of the target Space (tenant boundary). Validated against user access.

Array<object>
object
id
required

Assignment ID

string format: uuid
Example
770e8400-e29b-41d4-a716-446655440000
unitId
required

Unit ID

string format: uuid
Example
550e8400-e29b-41d4-a716-446655440000
userId
required

User ID from the IdP

string
Example
usr_abc123
role
required

Assigned role

string
Allowed values: operator viewer
Example
operator
name

User display name

string
Example
John Smith
email

User email

string
Example
john.smith@example.com
avatarUrl

User avatar URL

string
Example
https://cdn.example.com/avatars/john.jpg

Unauthorized — missing or invalid JWT

Forbidden — insufficient permissions

Resource not found