Flags
- Flag Index Endpoint
- View Flag Endpoint
- Create Flag Endpoint
- Update Flag Endpoint
- Delete Flag Endpoint
Flag Index Endpoint
Structure
See View Flag Endpoint for the structure of the flag payload inside the data array.
Example Request
GET /api/flags?per_page=2
Example Response
{
"current_page": 1,
"data": [
//...
],
"first_page_url": "http://aero.test/api/flags?page=1",
"from": 1,
"last_page": 3,
"last_page_url": "http://aero.test/api/flags?page=3",
"next_page_url": "http://aero.test/api/flags?page=2",
"path": "http://aero.test/api/flags",
"per_page": 2,
"prev_page_url": null,
"to": 2,
"total": 5
}
See View Flag Endpoint for the structure of the flag payload inside the data array.
View Flag Endpoint
Structure
| Name |
Type |
Description |
id |
int | The id of the flag |
name |
string | The unique name for the flag |
color |
hexcode | The colour of the flag (format ##RRGGBB) |
created_at |
timestamp | The date the flag was created |
Example Request
GET /api/flags/{id|name}
Example Response
{
"id": 1,
"name": "Flag",
"color": "#7f3434",
"created_at": "2025-06-30T08:14:27.000000Z"
}
Create Flag Endpoint
Structure
| Name |
Type |
Description |
Required |
id |
int | The id for the flag | No |
name |
string | The name of the flag | Yes |
color |
hexcode | The color of the flag (format ##RRGGBB) | Yes |
Example Request
POST /api/flags/
{
"name": "API Flag",
"color": "#000000",
}
Example Response
{
"flag": {
"id": 1
}
}
Update Flag Endpoint
Structure
| Name |
Type |
Description |
Required |
name |
string | The name of the flag | No |
color |
hexcode | The color of the flag (format ##RRGGBB) | No |
Example Request
PUT /api/flags/{id|name}
{
"name": "API Flag Updated",
"color": "#A1B2C3",
}
Example Response
{
"flag": {
"id": 1
}
}
Delete Flag Endpoint
Example Request
DELETE /api/flags/{id|name}
Example Response
204 No Content