opt-cc/api/apib/army-management/awardings.apib

61 lines
1.7 KiB
Plaintext

### Get Awardings [GET /awardings{?userId,inProgress,fractFilter}]
List all awardings
+ Parameters
+ userId: `5ab68d42f547ed304064e5f7` (string, optional)
specific army member Id to show the awardings for
+ inProgress: false (boolean, optional)
true to filter by awarding state 'in progress'
+ Default: false
+ fractFilter: `BLUFOR` (enum[string], optional)
Field to filter by fraction
+ Members
+ `BLUFOR`
+ `OPFOR`
+ `GLOBAL`
+ Response 200
+ Attributes (array[Awarding], fixed-type)
### Create Awarding [POST /awardings]
Create a new awarding which is immediatly assigned to the user
*Permission: 2*
+ Request (application/json)
+ Attributes
+ userId: `5ab68d42f547ed304064e5f7` (string, required) - unique id of the army member to give award
+ decorationId: `5abd3dff6e6a0334d95b8ba0` (string, required) - unique id of the decoration
+ reason: `Good boy` (string, required) - reason for giving the awarding
+ proposer: `5ab68ceef547ed304064e5f6` (string, required) - app user id, who requested this awarding
+ Response 201
+ Attributes (Awarding, fixed-type)
### Create Awarding Proposal [POST /request/award]
Create a new awarding proposal, that needs to be approved by higher permission level user to take effect
*Permission: 1*
+ Request (application/json)
+ Attributes
+ userId: `5ab68d42f547ed304064e5f7` (string, required) - unique id of the army member to give award
+ decorationId: `5abd3dff6e6a0334d95b8ba0` (string, required) - unique id of the decoration
+ reason: `Good boy` (string, required) - reason for giving the awarding
+ Response 201
+ Attributes (Awarding, fixed-type)