Table of Contents

/api/applications/flags

HEAD, GET

Get a list of all flags currently in the system.

Syntax

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

Response headers

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

Response example

{
  "1": {
      "created": "2014-06-20T06:50:15+00:00",
      "name": "Will come to the interview"
  },
  "2": {
      "created": "2014-06-20T06:50:15+00:00",
      "name": "Interested in accommodation"
  },
}

POST

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 method simply creates a new flag, but does not assign it to any applications. You are expected to use the PUT verb to add exiting flags to applications, see /api/applications/ID/flags/ID.

Syntax

POST /api/applications/flags
Host: apply.example.edu
Authorization: DREAM apikey="..."

Parameters

Name Description
name Required This text will be displayed on the flag. Up to 32 characters.

Response headers

Content-Type: application/json
Content-Length: 0
Location: /api/applications/flags/456

Response codes

201 Created New flag was created
209 Conflict A flag with this name already exists