Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

Test whether a user has a list of permissions for a specified resource.

Note: This is an admin API.

HTTP request

POST /api/v/4/webhook/execute/{adminSysKey}/policy?method=testIamPermissions

Query parameters

Parameters

project_area

string

The id of the project for which you want to check permissions

registry_id

(optional) The id of the registry for which you want to check permissions.

region

(optional) The region of the registry for which you want to check permissions.

Note: If registry_id and region are included, the request will check permissions for the caller user at that registry’s level. If those optional parameters are not included, the request will check permissions for the caller user at the project’s level.

Request body

The request body contains data with this structure:

JSON representation

{
  "permissions": string[]  
}

Example: ['cloudiot.registries.list', 'cloudiot.registries.get', 'cloudiot.registries.setIamPolicy']

Response body

If successful, the response body contains a list of strings. This list only includes the subset of the inputted permissions, which the user actually has.

Example: ['cloudiot.registries.list', 'cloudiot.registries.get']

Example

https://iot.clearblade.com/api/v/4/webhook/execute/aae9b9b30c8aa4e49081c7eeb9bb07/policy?method=testIamPermission&project_area=myProject123

  • No labels