Export/Report Files (check status)
Stability: production
Retrieve the status of a running export file initiated with the previous POST. Required parameters are the id of the export (e.g. export template) and the id of the running instance of that export (e.g. export file) that you wish to check the status of. You may continue to issue this call over a reasonable polling interval until the file becomes ready for download. Once the status of the file becomes "available", a download URL for the file will also be returned from the API. This URL is secure and time-sensitive, expiring less than 30 seconds from when it is issued. It is the expectation that software using this API will immediately download the file once given the URL. The download URL can always be re-generated if it expires by re-calling this method – a new URL will be issued.
Attributes
Name | Type | Description | Example |
---|---|---|---|
export_files:download_url | string | This is a secure S3 URL that can be requested for downloading the generated file. | "https://webadmit-production.s3.amazonaws.com/export_files/reports/000/074/780/d19d6c0a34b7062c4496530f3d5dbfb_original.txt?AWSAccessKeyId=AKIAIT7746URBGHSHEA&Expires=1425359248&Signature=y2jwr78kbVt44xz%2BfaEnp5dXKU%3D&response-content-disposition=attachment%3B%20filename%3DTest-API-Export.csv&response-content-type=text%2Fcsv%3Bcharset%3Diso-8859-1" |
export_files:export_id | integer | Unique identifier of the associated export. | 86446 |
export_files:href | string | Hypertext reference to this resource. pattern: /api/v1/exports/\d+/export_files/\d+ |
"/api/v1/exports/86466/export_files/74780" |
export_files:id | integer | Unique identifier of this export file. | 74780 |
export_files:status | string | Current status of this export file. one of: "initializing" or "queued" or "in_progress" or "available" or "success_with_errors" or "empty_list" or "failed" |
"available" |
Export/Report Files (check status) Show
The response is the status of the running instance of the export the user is checking on, including the id of that export_file (the running instance), the export id (the export template), the status of the execution, and the actual (time-sensitive) URL to download the file if it is ready.
GET /api/v1/exports/:export_id/export_files/:export_file_id
Curl Example
$ curl -n https://api.webadmit.org/api/v1/exports/:export_id/export_files/:export_file_id \
-H "x-api-key: 0123456789abcdef0123456789abcdef"
Response Example
HTTP/1.1 200 OK
{
"export_files": {
"id": 74780,
"href": "/api/v1/exports/86466/export_files/74780",
"export_id": 86446,
"status": "available",
"download_url": "https://webadmit-production.s3.amazonaws.com/export_files/reports/000/074/780/d19d6c0a34b7062c4496530f3d5dbfb_original.txt?AWSAccessKeyId=AKIAIT7746URBGHSHEA&Expires=1425359248&Signature=y2jwr78kbVt44xz%2BfaEnp5dXKU%3D&response-content-disposition=attachment%3B%20filename%3DTest-API-Export.csv&response-content-type=text%2Fcsv%3Bcharset%3Diso-8859-1"
}
}
Not Found
Response Example
HTTP/1.1 404 Not Found
{
"message": "Not Found"
}
While 404 Not Found
is most often associated with resources that don't exist when making a GET
request, please note that 404 Not Found
is also the response during POST
, PUT
, and PATCH
requests if any resources specified by parameters cannot be found.
Unauthorized
Response Example
HTTP/1.1 401 Unauthorized
(Empty response body.)