This is an old revision of the document!


/api/applications/ID/tasks/ID/documents

HEAD, GET

Get a list of documents that have been attached to this task. The HEAD verb is useful if you only want to test if this task has any documents attached at all (and how many). Use the GET verb to get the listing of documents.

In order to retrieve the binary data of the document, you need to call /api/applications/ID/tasks/ID/documents/ID. In the example below, you will need to call /api/applications/123/tasks/123/documents/222 to retrieve the first document as an image file.

Syntax

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

Response headers

Content-Type: application/json
Content-Length: 1234
X-Count: 15

Response example

{
  "222": {
    "uploaded": "2014-04-29T15:46:38+00:00",
    "name": "Passport",
    "mime": "image/jpeg",
    "size": "1966954",
    "task": {
      "class": "checklist-language-english",
      "title": "Proof of English language proficiency"
    }
  },
  "333": {
    "uploaded": "2014-04-29T15:46:38+00:00",
    "name": "Diploma",
    "mime": "image/jpeg",
    "size": "310178",
    "task": {
      "class": "checklist-language-english",
      "title": "Proof of English language proficiency"
    }
  }
}