You can get a list of all the entity-abilities 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_abilities |
Default |
{
"data": [
{
"ability_id": 33,
"created_at": "2019-01-28 19:42:33.000000Z",
"created_by": 1,
"entity_id": 70,
"id": 31,
"visibility_id": 1,
"updated_at": "2019-01-28 19:42:33.000000Z",
"updated_by": 1,
"charges": 3,
"position": 0,
"note": null
}
]
}
To get the details of a single entity-ability, use the following endpoint.
Method | URI | Headers |
---|---|---|
GET/HEAD | entities/{entity.id}/entity_abilities/{entity_ability.id} |
Default |
{
"data": {
"ability_id": 33,
"created_at": "2019-01-28 19:42:33.000000Z",
"created_by": 1,
"entity_id": 70,
"id": 31,
"visibility_id": 1,
"updated_at": "2019-01-28 19:42:33.000000Z",
"updated_by": 1,
"charges": 3,
"position": 0,
"note": null
}
}
To create an entity-ability, use the following endpoint.
Method | URI | Headers |
---|---|---|
POST | entities/{entity.id}/entity_abilities |
Default |
Parameter | Type | Detail |
---|---|---|
abilities |
array (Required) |
An array containing ability ids |
visibility_id |
int |
The visibility ID: 1 for all , 2 self , 3 admin , 4 self-admin or 5 members . |
charges |
int |
How many times the ability was used. |
note |
string |
Custom note attached to the ability. |
position |
int |
Position of the ability in the list |
{success} Code 200 with JSON body of the new entity-ability.
To update an entity-ability, use the following endpoint.
Method | URI | Headers |
---|---|---|
PUT/PATCH | entities/{entity.id}/entity_abilities/{entity_ability.id} |
Default |
The same body parameters are available as for when creating an entity-ability.
{success} Code 200 with JSON body of the updated entity-ability.
To delete an entity-ability, use the following endpoint.
Method | URI | Headers |
---|---|---|
DELETE | entities/{entity.id}/entity_abilities/{entity_ability.id} |
Default |
{success} Code 200 with JSON.