Skip to main content

Jobs

A job is an arbitrary task with some stored state, pertaining to the governing workspace. Typically, jobs are orchestrated by pipeline operations, but can also represent tasks for the user to complete.


Objects​

Job​

PathJSON TypeFormatDescription
idstringVersion 4 UUIDThe job ID
createdstringISO 8601 timestampThe instant at which the job was created
typestringJob TypeThe descriptor for the process undertaken by the job
exitCodenumberProcess exit statusThe job exit code
statusstringJob StatusThe job status
startTimestringISO 8601 timestampThe instant at which the job run started
endTimestringISO 8601 timestampThe instant at which the job run ended

Formats​

Job Status​

string

ValueDescription
QUEUEDThe job is queued
RUNNINGThe job is running
COMPLETEThe job finished with no errors
ERRORThe job finished with errors
STOPPEDThe job timed out or was manually stopped

Job Type​

string

ValueDescription
WORKSPACE_INITA system task to create a Meltano project in a workspace repository - automatically run when a workspace is created
PIPELINE_CONFIGA system task to configure the Meltano project and publish datasets with reference to a pipeline - automatically run when a pipeline is created, or a pipeline with a status of FAILED is updated
PIPELINE_VERIFYA system task to display and test the configuration of a pipeline
PIPELINE_RUNA system task to run a pipeline to load data into the workspace default datastore, or some other destination external to the platform - manually run by the user or automatically run on the defined schedule
PROFILE_COLLABORATEA user task to send an invitation
PROFILE_IMPORTA user task to create a pipeline

Requests​

View all running or completed jobs for a workspace​

GET /api/workspaces/{workspace-id}/jobs

Returns all running or completed jobs for the workspace {workspace-id}.

Prerequisites​

  • Workspace {workspace-id} must exist
Examples
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/workspaces/65279a9b-0b3d-40f5-a69d-607d9f3abe87/jobs' -i -X GET

Response​

200 OK

Job collection with HAL links.


View all running or completed jobs for a pipeline​

GET /api/pipelines/{pipeline-id}/jobs

Returns all running or completed jobs for the pipeline {pipeline-id}.

Prerequisites​

  • Pipeline {pipeline-id} must exist
Examples
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/pipelines/f2003fc1-49d5-451c-b8ad-8c2134c7b31d/jobs' -i -X GET

Response​

200 OK

Job collection with HAL links.


View a job​

GET /api/jobs/{job-id}

Returns the job {job-id}.

Prerequisites​

  • Job {job-id} must exist
Examples
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/jobs/69de2f7a-1c2c-4fdd-91c2-397180f8c738' -i -X GET

Response​

200 OK

Job with HAL links.


View the logs of a job​

GET /api/jobs/{job-id}/logs?sequence={sequence}

Returns the logs of the job {job-id}.

Prerequisites​

  • Job {job-id} must exist

Query Parameters​

Query ParameterFormatDefault ValueDescription
sequenceUnsigned integer0The line number in the logs to read from

Headers​

Accept​
Media Type(s)Description
text/plain */*Sets the response content type format to plain text
application/stream+json application/x-ndjsonSets the response content type format to NDJSON
Examples
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/jobs/69de2f7a-1c2c-4fdd-91c2-397180f8c738/logs?sequence=0' -i -X GET \
-H 'Accept: application/x-ndjson'

Response​

  • 200: The job logs in the format specified by associated request Accept header
  • 204: No response body provided.

Create a job from a pipeline​

POST /api/pipelines/{pipeline-id}/jobs

Creates a new job from the pipeline {pipeline-id}.

Prerequisites​

  • Pipeline {pipeline-id} must exist and not already be running
Examples
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/pipelines/f2003fc1-49d5-451c-b8ad-8c2134c7b31d/jobs' -i -X POST \
-H 'Content-Type: application/json'

Response​

201 Created

Job with HAL links.


Stop a job​

PUT /api/jobs/{job-id}/stopped

Stops the execution of the job {job-id}.

Prerequisites​

  • Job {job-id} must exist
  • Job {job-id} must have status RUNNING
Examples
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/jobs/3baf5ce5-76bd-4f24-98c5-ed0c846ec0e8/stopped' -i -X PUT \
-H 'Content-Type: application/json'

Response​

202 Accepted

Job stop acceptance message.


Delete a job​

DELETE /api/jobs/{job-id}

Deletes and stops the execution of the job {job-id}.

Prerequisites​

  • Job {job-id} must exist
Examples
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/jobs/69de2f7a-1c2c-4fdd-91c2-397180f8c738' -i -X DELETE

Response​

204 No Content

No response body provided.