Skip to main content

job_invocation_logs

Creates, updates, deletes, gets or lists a job_invocation_logs resource.

Overview

Namejob_invocation_logs
TypeResource
Iddigitalocean.apps.job_invocation_logs

Fields

The following fields are returned by SELECT queries:

A JSON object with urls that point to Job Invocation logs

NameDatatypeDescription
historic_urlsarray (title: A list of URLs to archived log files)
live_urlstringA URL of the real-time live logs. This URL may use either the https:// or wss:// protocols and will keep pushing live logs as they become available. (example: ws://logs/build)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
apps_get_job_invocation_logsselectapp_id, job_name, job_invocation_id, typedeployment_id, follow, pod_connection_timeout, tail_linesRetrieve the logs of a past, in-progress, or active deployment. If a component name is specified, the logs will be limited to only that component. If deployment is omitted the active deployment will be selected (if available). The response will include links to either real-time logs of an in-progress or active deployment or archived logs of a past deployment.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
app_idstringThe app ID (example: 4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf)
job_invocation_idstringThe ID of the job invocation to retrieve. (example: 123e4567-e89b-12d3-a456-426)
job_namestringThe job name to list job invocations for. (example: component)
typestringThe type of logs to retrieve (example: JOB_INVOCATION)
deployment_idstringThe deployment ID (example: 3aa4d20e-5527-4c00-b496-601fbd22520a)
followbooleanWhether the logs should follow live updates. (example: true)
pod_connection_timeoutstringAn optional time duration to wait if the underlying component instance is not immediately available. Default: 3m. (example: 3m)
tail_linesstring (int64)The number of lines from the end of the logs to retrieve. (example: 100)

SELECT examples

Retrieve the logs of a past, in-progress, or active deployment. If a component name is specified, the logs will be limited to only that component. If deployment is omitted the active deployment will be selected (if available). The response will include links to either real-time logs of an in-progress or active deployment or archived logs of a past deployment.

SELECT
historic_urls,
live_url
FROM digitalocean.apps.job_invocation_logs
WHERE app_id = '{{ app_id }}' -- required
AND job_name = '{{ job_name }}' -- required
AND job_invocation_id = '{{ job_invocation_id }}' -- required
AND type = '{{ type }}' -- required
AND deployment_id = '{{ deployment_id }}'
AND follow = '{{ follow }}'
AND pod_connection_timeout = '{{ pod_connection_timeout }}'
AND tail_lines = '{{ tail_lines }}'
;