opt-cc/api/apib/statistics/campaigns.apib

66 lines
1.4 KiB
Plaintext

### Get Campaigns [GET /campaigns]
Get all campaigns information
+ Response 200 (application/json; charset=utf-8)
+ Attributes (array[Campaign], fixed-type)
### Get Campaign [GET /campaigns/{id}]
Get single campaign information
+ Parameters
+ id: `5abd55ea9e30a76bfef747d6` (string, required) - unique id of campaign
+ Response 200 (application/json; charset=utf-8)
+ Attributes (Campaign, fixed-type)
### Create Campaign [POST /campaigns]
Create a new campaign
**Permission: 3**
+ Request Create new army member (application/json)
+ Attributes
+ title: `Return To Kessel In A Schmelz` (string, required) - display name of the campaign
+ Response 201 (application/json; charset=utf-8)
+ Attributes (Campaign, fixed-type)
### Update Campaign [PATCH /campaigns/{id}]
Update a campaign, identified by its id
**Permission: 3**
+ Parameters
+ id: `5abd55ea9e32a76afef777d6` (string, required) - unique id of campaign
+ Request (application/json)
+ Attributes
+ _id: `5abd55ea9e32a76afef777d6` (string, required) - unique id of campaign
+ title: `Operation Pandora` (string, optional) - display name of the campaign
+ Response 200 (application/json; charset=utf-8)
+ Attributes (Campaign, fixed-type)
### Delete Campaign [DELETE /campaigns/{id}]
Delete a campaign
**Permission: 3**
+ Parameters
+ id: `5abd58989e30a76bfef747e6` (string, required) - unique id of campaign
+ Response 204