This route returns either a signed S3 URL to the generated file or, if the file is not yet ready or have failed to generate for other reasons, returns a status indicating that. This route is used for file generation within a submission.
/v1/check_generation_status/?submission_id=123&file_type=D1
submission_id
: (required, integer) the ID of the current submissionfile_type
: (required, string) the file type whose status we are checking. Allowable values are:D1
D2
E
F
{
"job_id": 1234,
"status": "finished",
"file_type": "D1",
"url": "https://........",
"size": null,
"start": "01/01/2016",
"end": "03/31/2016",
"message": "",
"generated_at": "2020-01-15 14:25:40.12345"
}
job_id
: (integer) job ID of the generation job in questionstatus
: (string) indicates the file's status. Possible values are:finished
: file has been generated and is available for downloadwaiting
: file has either not started/finished generating or has finished generating but is not yet uploaded to S3failed
: an error occurred and the file generation or S3 upload failed, the generated file is invalid, or any other errorinvalid
: no generation request has ever been made for this submission ID before
file_type
: (string) indicates the file that the status data refers to. Possible values are:D1
D2
E
F
url
: (string) a signed S3 URL from which the generated file can be downloaded. This will be the string"#"
if the file is not in thefinished
state.size
: (integer) the size of the generated file in bytesstart
: (string) the file start date, inMM/DD/YYYY
format. If not a D1/D2 file, this key will not be returned.end
: (string) the file end date, inMM/DD/YYYY
format. If not a D1/D2 file, this key will not be returned.message
: (string) a user-readable error message when the file isfailed
, otherwise returns a blank stringgenerated_at
: (string) the last time (in theYYYY-MM-DD HH:mm:ss
format) this file was generated in this submission. This does not reflect the time the file itself was generated if it was cached but rather the last time this submission's generation was updated.
Possible HTTP Status Codes:
- 400:
- Missing
submission_id
parameter - Submission does not exist
- Invalid
file_type
parameter
- Missing
- 401: Login required
- 403: Permission denied, user does not have permission to view this submission