Skip to main content
 print this page

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

Presigned GET URL returned in Message. Suggested download filename is {jobId}_script.py.

Response Headers
    Access-Control-Allow-Origin
    Access-Control-Allow-Methods
    Access-Control-Allow-Headers