Language:

/roles/granulars

POST

Create Granular Role

Adds a granular role to the role with the given role ZUID.

StartFragment

In the body content, you can pass content models (schemas), instances, and item ZUID as the resource ZUID.

EndFragment

Please sign in to view your instance’s unique identifier

URL Endpoint

https://accounts.api.zesty.io/v1/roles/{{role_zuid}}/granulars
Please sign in to view your token

Authentication Header

Bearer YOUR_APP_SID 

Request Body

{
    "resourceZUID": "{{item_zuid}}",
    "name": "",
    "create": true,
    "read": true,
    "update": false,
    "delete": false,
    "publish": false,
    "grant": false
}
GET

Get Granular Role

Gets granular role by its role and resource ZUID.

You can pass content models (schemas), instances, and item ZUID as the resource ZUID.

Please sign in to view your instance’s unique identifier

URL Endpoint

https://accounts.api.zesty.io/v1/roles/{{role_zuid}}/granulars/{{resource_zuid}}
Please sign in to view your token

Authentication Header

Bearer YOUR_APP_SID 
DELETE

Delete Granular Role

Deletes a granular role by its role and resource ZUID.

You can pass content models (schemas), instances, and item ZUID as the resource ZUID.

Please sign in to view your instance’s unique identifier

URL Endpoint

https://accounts.api.zesty.io/v1/roles/{{role_zuid}}/granulars/{{resource_zuid}}
Please sign in to view your token

Authentication Header

Bearer YOUR_APP_SID 
GET

Get Granular Roles

Gets granular roles by their role zuid

Please sign in to view your instance’s unique identifier

URL Endpoint

https://accounts.api.zesty.io/v1/roles/{{role_zuid}}/granulars
Please sign in to view your token

Authentication Header

Bearer YOUR_APP_SID 
PUT

Update Granular Roles

Updates the granular roles for the give role ZUID. The resource ZUID for each granular permission must be included in the body of each update.

You can pass content models (schemas), instances, and item ZUID as the resource ZUID.

Please sign in to view your instance’s unique identifier

URL Endpoint

https://accounts.api.zesty.io/v1/roles/{{role_zuid}}/granulars
Please sign in to view your token

Authentication Header

Bearer YOUR_APP_SID 

Request Body

 [
        {
            "resourceZUID": "{{item_zuid}}",
            "name": "",
            "create": true,
            "read": true,
            "update": true,
            "delete": false
        }
    ]

;