Flags (global)
API version
Select a version to change the base URI
in syntax and code examples. Learn about versions:
in syntax and code examples. Learn about versions
Represents a list of all available flags. For a list of flags assigned to a specific application, see Flags.
URI
/api/v9/applications/flagsGET List flags
Get a list of all flags currently in the system.
Syntax
GET /api/v9/applications/flags
Host: apply.example.edu
Authorization: DREAM apikey="..."Example request
Request
curl
curl \
-X GET \
-H "Authorization: DREAM apikey=\"YOUR-API-KEY\"" \
"https://apply.example.edu/api/v9/applications/flags"Response headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json | Media type of the resource |
Content-Length | 1234 | Size of the response body in bytes |
X-Count | 10 | Number of available flags |
Response codes
| Response code | Description |
|---|---|
200 OK | The list of flags was successfully returned |
Example response
Response
{
"1": {
"id": 1,
"created": "2025-03-14T13:28:51+00:00",
"name": "Awaiting interview"
},
"2": {
"id": 2,
"created": "2025-03-14T13:29:03+00:00",
"name": "Incomplete application"
},
"3": {
"id": 3,
"created": "2025-03-14T13:29:18+00:00",
"name": "Special consideration"
}
}POST Create a flag
Add a new flag using any text (up to 32 characters) as the flag’s name. The URI for the flag created is returned in the Location header.
If a flag with this name exists already, a 409 Conflict will be returned, along with the URI of the offending flag in the Location header.
This request simply creates a new flag, but does not assign it to any applications. You are expected to use the PUT verb to add existing flags to applications, see PUT /api/v9/applications/ID/flags/ID.
Syntax
POST /api/v9/applications/flags
Host: apply.example.edu
Authorization: DREAM apikey="..."Parameters
| Name | Required/Optional | Description |
|---|---|---|
name | Required | This text will be displayed on the flag. Up to 32 characters. |
Example request
Request
curl
curl \
-X POST \
-H "Authorization: DREAM apikey=\"YOUR-API-KEY\"" \
"https://apply.example.edu/api/v9/applications/flags?name=Early%20applicant"Response headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json | Media type of the resource |
Content-Length | 0 | Size of the response body in bytes |
Location | /api/applications/flags/123 | URI of the created flag |
Response codes
| Response code | Description |
|---|---|
201 Created | A new flag was successfully created |
209 Conflict | A flag with this name already exists |