Skip to main content

Get Role Assignment

Request

Get a RoleAssignment by its id. For an Access Policy token, the RoleAssignment's assignmentScope must be at or below the project (if given, otherwise the project that owns the Access Policy) For a Role Assignment token, the RoleAssignment must be visible by the user and the project args are unsupported.

The auth token's access policy must allow action:use/getRoleAssignment.

Security
bearerAuth
Path
roleAssignmentIdstring(RoleAssignmentId)^roleassignment:[0-9a-f]{8}(-[0-9a-f]{4}){3}-...required

Uniquely identifies an access policy within a project. Callers may URL encode this value.

Example:roleassignment:550e8400-e29b-41d4-a716-446655440000
Payload
// No request payload

Responses

Success

Bodyapplication/json
roleAssignmentIdstring(RoleAssignmentId)^roleassignment:[0-9a-f]{8}(-[0-9a-f]{4}){3}-...required

Immutable UUID of this RoleAssignment

Example:"roleassignment:550e8400-e29b-41d4-a716-446655440000"
projectIdstring(ProjectId)^project:[0-9a-zA-Z](?![^:]*-$)(?![^:]*--)[0-...required

Id of the project that owns this assignment

Example:"project:abc-123"
principalPrincipal (string) or Group (string)required
Any of:

Globally unique string identifier for a principal formatted like "principal:...".

string(Principal)
roleIdstring(RoleId)^role:[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$required

Id of the Role assigned to the principal

Example:"role:550e8400-e29b-41d4-a716-446655440000"
roleNamestringrequired

Name of the Role assigned to the principal

Example:"Network Admin"
assignmentScopeobjectrequired

The scope this assignment applies to, usually a specific Project or Organization.

Response
{ "roleAssignmentId": "roleassignment:550e8400-e29b-41d4-a716-446655440000", "projectId": "project:abc-123", "principal": "principal:abc-123:idp:example-user", "roleId": "role:550e8400-e29b-41d4-a716-446655440000", "roleName": "Network Admin", "assignmentScope": { "id": "07218c48-343d-43e2-9831-a2080445cd22", "type": "PROJECT", "name": "My Project", "parent": { … } } }
Was this page helpful?