Create and run jobs

Create and run jobs from your workflow.


Overview

A job is an instance of a workflow that delivers outputs defined by job parameters. Each job may have a different configuration, and you can run a job multiple times.

You can also create and manage jobs using the console.

Validate a job before creating it

To check that the configured job tasks and inputs are valid, call the /projects/{project_id}/jobs/validate endpoint with your project ID as a path parameter.

You can skip this step if you already estimated a job with validation.

Request

POST /projects/{project_id}/jobs/validate HTTP/1.1
Host: api.up42.com
Content-Type: application/json
Authorization: Bearer {token}
ParameterOverview
tasks.
blockId
string / required
The job task's block ID.
tasks.
name
string / required
The job task name.
tasks.
blockVersionTag
string
The job task's block version.
tasks.
parentName
string
The name of the parent job task. If it's the first job task of the job, omit this parameter or set it to null.
tasks.
environmentId
string
The environment ID.
input.
<property-name>
object
The configured job task parameters. Replace <property-name> with the job task name.
See request example
{
  "tasks": [
    {
      "blockId": "defb134b-ca00-4e16-afa0-639c6dc0c5fe",
      "name": "oneatlas-pleiades-fullscene:1",
      "blockVersionTag": "2.5.2",
      "parentName": null
    }
  ],
  "input": {
    "oneatlas-pleiades-fullscene:1": {
      "ids": null,
      "time": "2018-01-01T00:00:00+00:00/2021-12-31T23:59:59+00:00",
      "limit": 1,
      "asset_ids": null,
      "time_series": null,
      "max_cloud_cover": 10,
      "contains": {
        "type": "Polygon",
        "coordinates": [
          [
            [26.255884, 47.100282],
            [26.260523, 47.102736],
            [26.26645, 47.100691],
            [26.259578, 47.094498],
            [26.255884, 47.100282]
          ]
        ]
      }
    }
  }
}

Response

If a job passed validation, there will be no response body.

Create and run a job

To create a new job and run it, call the /projects/{project_id}/workflows/{workflow_id}/jobs endpoint with your project ID and workflow ID as path parameters.

Request

POST /projects/{project_id}/workflows HTTP/1.1
Host: api.up42.com
Content-Type: application/json
Authorization: Bearer {token}
Query parameterOverview
namestring
A name for the job.
Body parameterOverview
<property-name>object / required
The configured job task parameters. Replace <property-name> with the job task name.
See request example
{
  "oneatlas-pleiades-fullscene:1": {
    "ids": null,
    "time": "2018-01-01T00:00:00+00:00/2021-12-31T23:59:59+00:00",
    "limit": 1,
    "asset_ids": null,
    "time_series": null,
    "max_cloud_cover": 10,
    "bbox": [13.38885, 52.512086, 13.411536, 52.524945]
  },
  "pansharpen:1": {
    "method": "SFIM",
    "include_pan": false,
    "bbox": [13.38885, 52.512086, 13.411536, 52.524945],
    "contains": null,
    "intersects": null,
    "clip_to_aoi": true
  }
}

Response

The response is an object with the job summary.

See response example
{
  "data": {
    "id": "e3ed4856-dd2e-477f-a957-1886cd4c9c52",
    "displayID": "e3ed4856",
    "createdAt": "2020-03-20T13:53:05.999Z",
    "updatedAt": "2020-03-20T22:35:39.846Z",
    "createdBy": {
      "id": "d935111c-7f27-4c28-b06f-488bf0290520",
      "type": "API_KEY"
    },
    "updatedBy": {
      "id": "d935111c-7f27-4c28-b06f-488bf0290520",
      "type": "API_KEY"
    },
    "status": "NOT_STARTED",
    "name": "New job",
    "startedAt": null,
    "finishedAt": null,
    "inputs": {
      "oneatlas-pleiades-fullscene:1": {
        "ids": null,
        "time": "2018-01-01T00:00:00+00:00/2021-12-31T23:59:59+00:00",
        "limit": 1,
        "asset_ids": null,
        "time_series": null,
        "max_cloud_cover": 10,
        "bbox": [13.38885, 52.512086, 13.411536, 52.524945]
      }
    },
    "mode": "DEFAULT",
    "workflowId": "fc88746e-98b0-4fa7-b750-2f96cde0f385",
    "workflowName": "My brand new workflow with pansharpened Pléiades images."
  },
  "error": null
}

Rerun a job

To rerun a job, call the /projects/{project_id}/workflows/{workflow_id}/jobs/{job_id} endpoint with your project ID, workflow ID, and job ID as path parameters.

Request

POST /projects/{project_id}/workflows/{workflow_id}/jobs/{job_id} HTTP/1.1
Host: api.up42.com
Content-Type: application/json
Authorization: Bearer {token}

Response

The response is an object with the updated job summary.

See response example
{
  "data": {
    "id": "e3ed4856-dd2e-477f-a957-1886cd4c9c52",
    "displayID": "e3ed4856",
    "createdAt": "2020-03-20T13:53:05.999Z",
    "updatedAt": "2020-03-20T22:35:39.846Z",
    "createdBy": {
      "id": "system",
      "type": "INTERNAL"
    },
    "updatedBy": {
      "id": "d935111c-7f27-4c28-b06f-488bf0290520",
      "type": "API_KEY"
    },
    "status": "NOT_STARTED",
    "name": null,
    "startedAt": null,
    "finishedAt": null,
    "inputs": {
      "oneatlas-pleiades-fullscene:1": {
        "ids": null,
        "time": "2018-01-01T00:00:00+00:00/2021-12-31T23:59:59+00:00",
        "limit": 1,
        "asset_ids": null,
        "time_series": null,
        "max_cloud_cover": 10,
        "bbox": [13.38885, 52.512086, 13.411536, 52.524945]
      },
      "pansharpen:1": {
        "method": "SFIM",
        "include_pan": false,
        "bbox": [13.38885, 52.512086, 13.411536, 52.524945],
        "contains": null,
        "intersects": null,
        "clip_to_aoi": true
      }
    },
    "mode": "DRY_RUN",
    "workflowId": "fc88746e-98b0-4fa7-b750-2f96cde0f385",
    "workflowName": "My brand new workflow with pansharpened Pléiades images."
  },
  "error": null
}