Retrieve the job script download URL
GET/jobs/:id/script
Returns a SigV4 presigned GET URL in Message to download the job script. Caller must send a valid role_id (AUTH-1001 if missing) and have at least read-only access on the job (AUTH-1012 if the access level is too low). Unknown JobId returns IPV-1002. Object key is {jobId}/script/{JobName} in the Amorphic ETL bucket, unless ResourceOrigin is AWSConsole — then ScriptLocation is parsed as bucket plus key. If head_object returns 404, the handler returns HTTP 204 with an empty JSON object so the UI can show a default script. Other S3 ClientError values surface as HTTP 400. Read-only users are also checked against attached datasets, domains, parameters, and libraries via glueUtil.validate_attached_resources. Missing underlying grants return AUTH-1010 with the missing permission list. Safe to retry (read-only), aside from a ScriptUpdate notification sent to subscribers after a successful 200.
Request
Responses
- 200
- 204
- 400
- 500
Presigned GET URL returned in Message. Suggested download filename is {jobId}_script.py.
Response Headers
No script object at the resolved S3 key. Body is an empty JSON object. The UI uses this to load a default script until the user uploads one.
Response Headers
Validation or authorization failure. Body is {"Message": " -
Response Headers
Unhandled backend failure. Body is {"Message": " -