111 lines
2.7 KiB
Plaintext
111 lines
2.7 KiB
Plaintext
### List Squads [GET /squads{?q,fractFilter}]
|
|
|
|
Get single army member information
|
|
|
|
+ Parameters
|
|
+ q: `alpha` (string, optional) - filter string which filters for partial squadname
|
|
|
|
+ fractFilter: `BLUFOR` (enum[string], optional)
|
|
Field to filter by fraction
|
|
|
|
+ Members
|
|
+ `BLUFOR`
|
|
+ `OPFOR`
|
|
+ `GLOBAL`
|
|
|
|
+ Response 200 (application/json; charset=utf-8)
|
|
|
|
+ Attributes (array[Squad], fixed-type)
|
|
|
|
### Get Squad [GET /squads/{id}]
|
|
|
|
Get single squad information
|
|
|
|
+ Parameters
|
|
+ id: `5aba54eaeadcce6332c6a774` (string, required) - unique id of the squad
|
|
|
|
+ Response 200 (application/json; charset=utf-8)
|
|
|
|
+ Attributes (Squad, fixed-type)
|
|
|
|
### Create Squad [POST /squads]
|
|
|
|
Create a new squad
|
|
|
|
**Permission: 2**
|
|
|
|
+ Request (multipart/form-data; boundary=---BOUNDARY)
|
|
|
|
-----BOUNDARY
|
|
Content-Disposition: form-data; name="name"
|
|
Content-Type: text/plain
|
|
|
|
Delta
|
|
-----BOUNDARY
|
|
Content-Disposition: form-data; name="fraction"
|
|
Content-Type: text/plain
|
|
|
|
BLUFOR
|
|
-----BOUNDARY
|
|
Content-Disposition: form-data; name="image"; filename="image.png"
|
|
Content-Type: image/png
|
|
Content-Transfer-Encoding: base64
|
|
|
|
iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEX/TQBcNTh/AAAAAXRSTlMA
|
|
QObYZgAAAApJREFUeJxjYgAAAAYAAzY3fKgAAAAASUVORK5CYII=
|
|
-----BOUNDARY--
|
|
|
|
+ Response 201 (application/json; charset=utf-8)
|
|
|
|
+ Attributes (Squad, fixed-type)
|
|
|
|
### Update Squad [PATCH /squads/{id}]
|
|
|
|
Update squad, identified by its id
|
|
|
|
**Permission: 2**
|
|
|
|
+ Parameters
|
|
+ id: `5abe166f8b7488392a623f12` (string, required) - unique id of the squad
|
|
|
|
+ Request (multipart/form-data; boundary=---BOUNDARY)
|
|
|
|
-----BOUNDARY
|
|
Content-Disposition: form-data; name="name"
|
|
Content-Type: text/plain
|
|
|
|
test-CSAT
|
|
-----BOUNDARY
|
|
Content-Disposition: form-data; name="fraction"
|
|
Content-Type: text/plain
|
|
|
|
OPFOR
|
|
-----BOUNDARY
|
|
Content-Disposition: form-data; name="sortingNumber"
|
|
Content-Type: text/plain
|
|
|
|
3
|
|
-----BOUNDARY
|
|
Content-Disposition: form-data; name="image"; filename="image.png"
|
|
Content-Type: image/png
|
|
Content-Transfer-Encoding: base64
|
|
|
|
iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEX/TQBcNTh/AAAAAXRSTlMA
|
|
QObYZgAAAApJREFUeJxjYgAAAAYAAzY3fKgAAAAASUVORK5CYII=
|
|
-----BOUNDARY--
|
|
|
|
+ Response 200 (application/json; charset=utf-8)
|
|
|
|
+ Attributes (Squad, fixed-type)
|
|
|
|
### Delete Squad [DELETE /squads/{id}]
|
|
|
|
Delete a squad
|
|
|
|
**Permission: 2**
|
|
|
|
+ Parameters
|
|
+ id: `5abe16f98b7488392a623f17` (string, required) - unique id of the squad
|
|
|
|
+ Response 204
|