You can get a list of all the entity-permissions of an entity by using the following endpoint.
{warning} Don't forget that all endpoints documented here need to be prefixed with
1.0/campaigns/{campaign.id}/
.
Method | URI | Headers |
---|---|---|
GET/HEAD | entities/{entity.id}/entity_permissions |
Default |
{
"data": [
{
"id": 37,
"campaign_role_id": 115,
"user_id": null,
"action": 1,
"access": true,
"created_at": "2022-07-25T16:21:38.000000Z",
"updated_at": "2022-07-25T17:36:21.000000Z"
},
}
To create an entity permission, use the following endpoint.
Method | URI | Headers |
---|---|---|
POST | entities/{entity.id}/entity_permissions |
Default |
Parameter | Type | Detail |
---|---|---|
campaign_role_id |
integer (Required) |
The campaign role id affected by the permission, only required when there's no user id |
user_id |
integer (Required) |
The id of the user affected by the permission, only required when there's no campaign role id |
action |
integer (Required) |
The code of the action controller by the permission |
access |
boolean (Required) |
Determines if the permission is allowed or forbidden |
ID | Action |
---|---|
1 |
Read |
2 |
Edit |
3 |
Add |
4 |
Delete |
5 |
Posts |
6 |
Perms |
{success} Array with all the newly created permissions.
{
"data": [
{
"id": 37,
"campaign_role_id": 115,
"user_id": null,
"action": 1,
"access": true,
"created_at": "2022-07-25T16:21:38.000000Z",
"updated_at": "2022-07-25T17:36:21.000000Z"
}
],
}