Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

Info

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.

...

The request body contains data with this structure:

JSON representation

Code Block
{
  "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.

...