generate_etl_job_execution_logs¶
- EtlJobsApi.generate_etl_job_execution_logs(id, executionid, servicename, action, role_id, timestamp_range_with_next_token, logtype=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Preview, generate, or download logs for a time window
Views, packages, or downloads execution logs for startTime/endTime. action is required: view-logs, generate-logs, or download-logs. servicename is required; logtype is required for glue.
- Parameters:
id (str) – UUID of the parent ETL job. (required)
executionid (str) – Glue JobRun / execution ID whose logs are requested. (required)
servicename (str) – Log source service. Supported values include glue, jdbc-dataflow, jdbc-advanced-dataflow, streams-entity, and data-pipelines. (required)
action (str) – view-logs returns a log preview (optional nextToken pagination). generate-logs starts async packaging for the time window. download-logs returns a download URL for the packaged window. (required)
role_id (str) – Amorphic role ID sent for authorization. Missing this header returns AUTH-1001. (required)
timestamp_range_with_next_token (TimestampRangeWithNextToken) – (required)
logtype (str) – Log stream type such as output or error. Required when servicename=glue.
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
Request and Response Examples¶
HTTP: POST /jobs/{id}/executions/{executionid}/logs
Request¶
Request / response example
{
"startTime": "2024-06-01T12:00:00",
"endTime": "2024-06-01T13:00:00"
}
Success (HTTP 200)¶
Preview payload (logPreview/logTruncated), generate confirmation, or download URL depending on action.
action=view-logs preview
{
"logPreview": "2026-08-15 09:00:01 INFO Starting job...",
"logTruncated": false
}
action=generate-logs
{
"Message": "Triggered log file creation"
}
action=download-logs
{
"Presignedurl": "https://s3.amazonaws.com/example-logs/jr_a1b2c3d4e5f6/window.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256"
}
Errors¶
Documented error codes: IPV-1054, IPV-1041, GE-1020, GE-1008.
HTTP 400
Missing servicename, invalid action, invalid timestamp format (IPV-1054), or job does not exist.
action is not allowed
{
"Message": "IPV-1041 - Invalid parameter - action, allowed values/keys are [view-logs, generate-logs, download-logs]"
}
Job does not exist
{
"Message": "GE-1020 - Job with id 3fa85f64-5717-4562-b3fc-2c963f66afa6 does not exist"
}
HTTP 500
Uncaught backend failure. Typical Message is “GE-1008 - Could not complete the request. Please try again.”
Request / response example
{
"Message": "GE-1008 - Could not complete the request. Please try again."
}