Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
api:api_applications_id_tasks_id_documents [2025/06/09 13:34] – created Lauriapi:api_applications_id_tasks_id_documents [2025/06/09 13:50] (current) Lauri
Line 24: Line 24:
   {   {
     "222": {     "222": {
 +      "id": 222,
       "uploaded": "2014-04-29T15:46:38+00:00",       "uploaded": "2014-04-29T15:46:38+00:00",
       "name": "Passport",       "name": "Passport",
Line 34: Line 35:
     },     },
     "333": {     "333": {
 +      "id": 333,
       "uploaded": "2014-04-29T15:46:38+00:00",       "uploaded": "2014-04-29T15:46:38+00:00",
       "name": "Diploma",       "name": "Diploma",
Line 44: Line 46:
     }     }
   }   }
 +
 +===== POST =====
 +
 +Initiate an upload process to add a new document to the task.
 +
 +The process is as follows:
 +
 +  - Client calls ''POST /api/application/123/tasks/321/documents''
 +  - API returns code 204 and an ingress URL on the ''Location'' header, such as `https://svcs-ingress.dreamapply.com/........` that contains a JWT token, authorising the upload. 
 +  - Client pushes a file using a standard multipart request, for example like ''curl -v -F upload=@somefile.jpg https://svcs-ingress.dreamapply.com/.......''.
 +  - The ingress service returns code 201 if the file was accepted.
 +
 +The ingress URL is valid for 30 minutes to upload the file (or files - the URL can be used multiple times to upload multiple files within the 30 minute window). Up to 10MiB are allowed, and any of the usual MIME-s are allowed (same as in the UI). **:!: The ingress URL should not be made public, but should be treated as secure material.**
 +
 +==== Syntax ====
 +
 +  POST /api/application/123/tasks/321/documents
 +  Host: apply.example.edu
 +  Authorization: DREAM apikey="..."
 +
 +==== Response codes ====
 +
 +| ''204 No Content'' | The ingress URL was returned in the ''Location'' header |