Skip to main content
Skip table of contents

setIamPolicy

Note: This is an admin API.

Set a specified resource’s IAM policy.

Required permission

To call this endpoint, you must have the following permission:

cloudiot.registries.setIamPolicy

HTTP request

PUT /api/v/4/webhook/execute/{adminSysKey}/policy?method=setIamPolicy

Query parameters

Parameters

project_area

string

The project’s ID for which you want to set the policy.

registry_id

(optional) The registry’s ID for which you want to set the policy.

region

(optional) The registry’s region for which you want to set the policy.

If registry_id and region are included, the request will assign the roles at that registry’s level. If those optional parameters are not included, the request will assign the roles at the project’s level.

Request body

The request body contains data with this structure, containing a CbPolicy:

JSON representation

CODE
{
  "policy": CbPolicy
}

Response body

If successful, the response body contains the CbPolicy assigned to the resource.

Example

https://iot.clearblade.com/api/v/4/webhook/execute/aae9b9b30c8aa4e49081c7eeb9bb07/policy?method=setIamPolicy&project_area=myProject123&region=us-central1&registry_id=myRegistry123

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.