Return a list of roles. With pagination.

Permission Level: Read

GET /users/roles

Operation id: RoleService_ListRoles

Tags: RoleService

Parameters

Query parameters

NameTypeRequiredDescription
domainstringNoDomain of the role (example: zpa, reflexis, wfc, etc), Required: false
enabledStatusstringNoThe 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
excludeTenantIdsarrayNoList of tenant IDs to exclude. Required: false
fieldMaskstringNoFieldMask 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
genericFilterstringNoGeneric filter for role fields (role_id, domain, scope). Required: false
includePermissionsbooleanNoif include permissions is true, it returns the roles with its permissions, Default: false, Required: false
isTemplatebooleanNoFlag to include roles which have isTemplate enabled, Default: false, Required: false
pageSizeinteger (int32)NoRequested size of the next page of data. If not set, the default page size is 10, Required: false.
pageTokenstringNoMongoDB Field, describes the encoded page token for page traversal, Required: false
roleTypestringNoFilter by Role Type, Default: All Roles, Required: false - ALL_ROLES: All Roles - USER_ONLY: User Roles only - ADMIN_ONLY: Admin Roles only
scopestringNoSome more general scoping (like a particular app in the domain), Required: false
sortFieldstringNoSort field, valid values: domain, scope, roleId, lastUpdated or displayName. Default: domain, Required: false
sortTypestringNoSort Type for the results, Default: ASC, Required: false
specificFilter.displayNamestringNo
specificFilter.domainstringNo
specificFilter.roleIdstringNo
specificFilter.scopestringNo
specificFilter.systemLevelstringNo
startsWithSingleCharacterbooleanNoAbility to search for a single starts with character, only applicable to specific_filter: display_name, Required: false, Default: false
tenantIdarrayNoTenant 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

PropertyTypeRequiredDescription
rolesarrayNo
nextPageTokenstringNo
{
  "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

PropertyTypeRequiredDescription
codeinteger (int32)No
messagestringNo
detailsarrayNo
{
  "type": "object",
  "properties": {
    "code": {
      "type": "integer",
      "format": "int32"
    },
    "message": {
      "type": "string"
    },
    "details": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "@type": {
            "type": "string"
          }
        }
      }
    }
  }
}