meta data for this page
  •  

This is an old revision of the document!


/api/applications/ID/flags/ID

HEAD, GET

Use the HEAD verb to test if the application in question has this flag. A request with the GET verb returns some additional information about the flag association (date assigned etc.).

Note that this will not return the flag itself, but rather represents the relationships between the application and the flag. Follow the flag URI in the response to retrieve further information about the flag in question.

Syntax

GET /api/applications/123/flags/1
Host: apply.example.edu
Authorization: DREAM apikey="..."

Response headers

Content-Type: application/json
Content-Length: 1234

Response codes

200 OK The flag is set
404 Not Found The flag was not set

PUT

Set a flag (identified by it's ID) to the application in question. This requires that the flag already exists. Use POST /api/applications/flags to create a flag first, then this API call will allow you to PUT the flag (identified by it's code) to any number of applications.

In other words, this will not create a new flag, but create a relationship (association) between an existing flag and an application.

Syntax

PUT /api/applications/123/flags/1
Host: apply.example.edu
Authorization: DREAM apikey="..."

Response headers

Content-Type: text/plain
Content-Length: 0

Response codes

200 OK Flag was successfully set

DELETE

Remove the flag (identified by it's ID) from the application in question.

Note that this does not delete the flag itself, only removing it's association with the application in question.

Syntax

DELETE /api/application/123/flags/1
Host: apply.example.edu
Authorization: DREAM apikey="..."

Response headers

Content-Type: text/plain
Content-Length: 0

Response codes

204 No Content Flag was successfully deleted