Language:

/roles

POST

Create Role

Creates a role with the provided system role as its base.

Please sign in to view your instance’s unique identifier

URL Endpoint

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

Authentication Header

Bearer YOUR_APP_SID 

Request Body

{
  "name": "test custom role name",
  "entityZUID": "{{instance_zuid}}",
  "systemRoleZUID": "{{system_role_zuid}}"
}
GET

Get Role

Gets a role by its zuid

Please sign in to view your instance’s unique identifier

URL Endpoint

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

Authentication Header

Bearer YOUR_APP_SID 
GET

Get Roles

Gets all roles associated with the current user

Please sign in to view your instance’s unique identifier

URL Endpoint

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

Authentication Header

Bearer YOUR_APP_SID 
DELETE

Delete Role

Deletes a role by its zuid

Please sign in to view your instance’s unique identifier

URL Endpoint

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

Authentication Header

Bearer YOUR_APP_SID 
POST

Create Instance Roles

Creates a single instance's base roles.

Please sign in to view your instance’s unique identifier

URL Endpoint

https://accounts.api.zesty.io/v1/instances/8-xxxxxxxxx/roles
Please sign in to view your token

Authentication Header

Bearer YOUR_APP_SID 
GET

Get Instance Role

Gets a role by its zuid

Please sign in to view your instance’s unique identifier

URL Endpoint

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

Authentication Header

Bearer YOUR_APP_SID 
GET

Get Instance Roles

Gets a single instance's roles

Please sign in to view your instance’s unique identifier

URL Endpoint

https://accounts.api.zesty.io/v1/instances/8-xxxxxxxxx/roles
Please sign in to view your token

Authentication Header

Bearer YOUR_APP_SID 
POST

Assign User Role

Adds an entry for the provided user and role ZUID.

Please sign in to view your instance’s unique identifier

URL Endpoint

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

Authentication Header

Bearer YOUR_APP_SID 
GET

Get User Roles

Gets a role by its zuid

Please sign in to view your instance’s unique identifier

URL Endpoint

https://accounts.api.zesty.io/v1/users/undefined/roles
Please sign in to view your token

Authentication Header

Bearer YOUR_APP_SID 
PUT

Update User Role

Updates the entry for the provided user and role ZUID with the roleZUID element in the request body. Fails if the user/role entry in the URL does not exist.

Please sign in to view your instance’s unique identifier

URL Endpoint

https://accounts.api.zesty.io/v1/users/undefined/roles/{{current_role_zuid}}
Please sign in to view your token

Authentication Header

Bearer YOUR_APP_SID 

Request Body

{
	"roleZUID": "{{role_zuid}}"
}
DELETE

Delete User Role

Unassigns a role from a user.

Please sign in to view your instance’s unique identifier

URL Endpoint

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

Authentication Header

Bearer YOUR_APP_SID 

;