Return a list of roles. With pagination.
Permission Level: Read
GET /users/roles
Operation id: RoleService_ListRoles
Tags: RoleService
Parameters
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
domain | string | No | Domain of the role (example: zpa, reflexis, wfc, etc), Required: false |
enabledStatus | string | No | The enabled status of the role in this request to search on will only work in conjunction with the scope field, Default: Both Enabled and Disabled Roles, Required: false |
excludeTenantIds | array | No | List of tenant IDs to exclude. Required: false |
fieldMask | string | No | FieldMask to control what fields are to be returned, if empty assumes everything, Required: false Valid path names are names of each field in the RoleResponse proto |
genericFilter | string | No | Generic filter for role fields (role_id, domain, scope). Required: false |
includePermissions | boolean | No | if include permissions is true, it returns the roles with its permissions, Default: false, Required: false |
isTemplate | boolean | No | Flag to include roles which have isTemplate enabled, Default: false, Required: false |
pageSize | integer (int32) | No | Requested size of the next page of data. If not set, the default page size is 10, Required: false. |
pageToken | string | No | MongoDB Field, describes the encoded page token for page traversal, Required: false |
roleType | string | No | Filter by Role Type, Default: All Roles, Required: false - ALL_ROLES: All Roles - USER_ONLY: User Roles only - ADMIN_ONLY: Admin Roles only |
scope | string | No | Some more general scoping (like a particular app in the domain), Required: false |
sortField | string | No | Sort field, valid values: domain, scope, roleId, lastUpdated or displayName. Default: domain, Required: false |
sortType | string | No | Sort Type for the results, Default: ASC, Required: false |
specificFilter.displayName | string | No | |
specificFilter.domain | string | No | |
specificFilter.roleId | string | No | |
specificFilter.scope | string | No | |
specificFilter.systemLevel | string | No | |
startsWithSingleCharacter | boolean | No | Ability to search for a single starts with character, only applicable to specific_filter: display_name, Required: false, Default: false |
tenantId | array | No | Tenant of the Roles to fetch, Required: false |
Security
- Authorization (apiKey)
- Bearer token
Responses
200 — A successful response.
Content type: application/json
default — An unexpected error response.
Content type: application/json
Response models
200 — A successful response.
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
roles | array | No | |
nextPageToken | string | No |
{
"type": "object",
"properties": {
"roles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"globalId": {
"type": "string"
},
"tenantId": {
"type": "string"
},
"domain": {
"type": "string"
},
"scope": {
"type": "string",
"description": "Some more general scoping for the data (like a particular app in the domain). Required: false."
},
"roleId": {
"type": "string"
},
"description": {
"type": "string",
"description": "Role description. Required: false."
},
"users": {
"type": "array",
"items": {
"type": "object"
}
},
"roles": {
"type": "array",
"items": {
"type": "object"
}
},
"systemLevel": {
"type": "boolean"
},
"workspaces": {
"type": "array",
"items": {
"type": "object"
}
},
"permissionsIds": {
"type": "array",
"items": {
"type": "string"
}
},
"deactivated": {
"type": "boolean"
},
"creationTime": {
"type": "string",
"format": "date-time"
},
"lastUpdated": {
"type": "string",
"format": "date-time"
},
"displayName": {
"type": "string"
},
"dynamic": {
"type": "boolean"
},
"attributes": {
"type": "array",
"items": {
"type": "object"
}
},
"roleType": {
"type": "string",
"enum": [
"UNDEFINED",
"USER",
"ADMIN"
],
"default": "UNDEFINED"
}
}
}
},
"nextPageToken": {
"type": "string"
}
}
}
default — An unexpected error response.
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
code | integer (int32) | No | |
message | string | No | |
details | array | No |
{
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"type": "object",
"properties": {
"@type": {
"type": "string"
}
}
}
}
}
}