Returns a list of permissions

Permission Level: Read

GET /users/permissions

Operation id: PermissionService_ListPermissions

Tags: PermissionService

Parameters

Query parameters

NameTypeRequiredDescription
domainstringNoDomain of the permissions, Required: false
excludeTenantIdsarrayNoList of tenant IDs to exclude. Required: false
grantsstringNoGrants to Permission (example: admin, r, rw, *), Required: false
groupIdstringNoOptional - if provided retrieves permissions that are part of the group id passed.
pageSizeinteger (int32)NoRequested size of the next page of data. Required: false. If not set, the default page size is 10.
pageTokenstringNoToken identifying which result to start with, which is returned by a previous list call. Required: false
role.domainstringNoThe platform domain. Required: true. (e.g. ZPA, Reflexis, WFC) Defaults to the domain in the request.
role.roleIdstringNoThe role ID. Required: true.
role.scopestringNoSome more general scoping for the data (like a particular app in the domain). Required: false.
role.tenantIdstringNoThe ID of the tenant. Required: false. Defaults to the tenant of the user making the call.
role.userIdsarrayNoThe User Ids for the Unique Role Proto, Required: false
scopestringNoScope of the permissions, Required: false
sortFieldstringNoField to sort by, Default: permissionId, Required: false
sortTypestringNoSort Type for the results, Default: ASC, Required: false
tenantIdarrayNoTenant of the permissions to list, Required: false
typestringNoType of Permission (example: user, phoenixAuth, permission, *), Required: false
user.firstNamestringNoThe first name. Required: false.
user.lastNamestringNoThe last name. Required: false.
user.tenantIdstringNoThe ID of the tenant. Required: false. Defaults to the tenant of the user making the call.
user.userIdstringNoThe user ID. Required: true.

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
permissionsarrayNo
nextPageTokenstringNoToken that can be passed to ListPermissionsRequest to resume a paginated query.
{
  "type": "object",
  "properties": {
    "permissions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "permissionId": {
            "type": "string"
          },
          "ownerTenantId": {
            "type": "string",
            "description": "Owner tenant of the permission to which it belongs."
          },
          "friendlyId": {
            "type": "string"
          },
          "domain": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "grants": {
            "type": "string"
          },
          "tenants": {
            "type": "string"
          },
          "targets": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Targets describe what the permission applies to.\nFor example if you wanted to have an admin permission and wanted the user to only have permissions on unitA and unitB\nyou would design your target like this:\nid_type = \"byUnit\"\nid = \"unitA,unitB\"\nThe actual values used are free form and determined by the application when designing their authorization model.\nSome standards we try to stick to despite the free form are:\nid_type we try and model with by{{Thing}}.  The most common use case for this is byTenant (which we moved up to the base permission\nlevel, see permission.proto).\nFor ID, which is the actual value this is giving access to we recommend using:\n* - if the user should have access to everything in that Thing.  so a byTenant - * permission would give access to ALL tenants.\n^ - gives access to the user's own Thing.  For example - byTenant - ^ would give access to the user's own tenant.\nThis gives the ability to create a single permission that can be used by multiple roles.\nOtherwise we use a specific value, so byTenant - mytenant would give access to the \"mytenant\" tenant.  This is best used for giving\naccess to someone outside of our tenant to your tenant, or if you have a list of specific things that wont change depending on who\nhas access to the permission."
            }
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "users": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "systemLevel": {
            "type": "boolean"
          },
          "groupIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "deactivated": {
            "type": "boolean"
          },
          "creationTime": {
            "type": "string",
            "format": "date-time"
          },
          "lastUpdated": {
            "type": "string",
            "format": "date-time"
          },
          "typeFriendlyName": {
            "type": "string",
            "description": "Friendly name of the type of permission. Blank if not set."
          },
          "scopeFriendlyName": {
            "type": "string",
            "description": "Friendly name of the scope of the permission. Blank if not set."
          },
          "grantFriendlyName": {
            "type": "string",
            "description": "Friendly name of the grant from PERMISSION_GRANTS property. Blank if not set."
          },
          "grantDescription": {
            "type": "string",
            "description": "Description of the grant from PERMISSION_GRANTS property. Blank if not set."
          }
        }
      }
    },
    "nextPageToken": {
      "type": "string",
      "description": "Token that can be passed to `ListPermissionsRequest` to resume a paginated query."
    }
  }
}

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"
          }
        }
      }
    }
  }
}