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.matatika.com/api/workspaces/73bc3927-e760-48f0-9e43-e11e1351e7fb/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.matatika.com/api/pipelines/a6006410-e5b5-465b-838a-d8ca2132da47/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.matatika.com/api/jobs/f8a00cdb-4c65-4668-9112-add1fa9d9b97' -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.matatika.com/api/jobs/f8a00cdb-4c65-4668-9112-add1fa9d9b97/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.matatika.com/api/pipelines/a6006410-e5b5-465b-838a-d8ca2132da47/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.matatika.com/api/jobs/acf4a4df-4fb3-48a9-a8c2-d15e5da08708/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.matatika.com/api/jobs/f8a00cdb-4c65-4668-9112-add1fa9d9b97' -i -X DELETE

Response

204 No Content

No response body provided.