Estimate jobs

Configure and estimate a job from your workflow.


Overview

Before running a job, you can input the configured job parameters to view the estimated processing time and pricing for each job. You can estimate a job with or without validation of the job input. When you use the endpoint with validation, it will check that the configured job tasks and inputs are valid and may improve the accuracy of the estimate returned.

You can also estimate a job using the console.

Estimate a job with validation

To estimate a job with validation of the job input, call the /projects/{project_id}/estimate/job endpoint with your project ID as a path parameter.

Request

POST /projects/{project_id}/estimate/job HTTP/1.1
Host: api.up42.com
Content-Type: application/json
Authorization: Bearer {token}
ParameterOverview
jobIdstring
The job ID.
tasksarray of objects / required
Information about the job tasks. A job task is a unique configuration of a workflow task.
tasks.blockIdstring / required
The job task's block ID.
tasks.blockVersionTagstring / required
The job task's block version.
tasks.namestring / required
The job task name.
tasks.parentNamestring
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.inputsobject
The configured job task parameters.
tasks.jobTaskIdstring
The job task ID.
inputsobject / required
The job task's name and configured parameters.
inputs.
<property-name>
object / required
The configured job task parameters to estimate. Replace <property-name> with the job task name.
See request example
{
  "tasks": [
    {
      "blockId": "defb134b-ca00-4e16-afa0-639c6dc0c5fe",
      "blockVersionTag": "2.5.2",
      "name": "oneatlas-pleiades-fullscene:1",
      "parentName": 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,
      "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


See response example
{
  "data": {
    "oneatlas-pleiades-fullscene:1": {
      "blockConsumption": {
        "resources": {
          "unit": "SQUARE_KM",
          "min": 0.365356,
          "max": 0.365404
        },
        "credit": {
          "min": 366,
          "max": 366
        }
      },
      "machineConsumption": {
        "duration": {
          "min": 0,
          "max": 0
        },
        "credit": {
          "min": 1,
          "max": 1
        }
      }
    }
  },
  "error": null
}

ParameterOverview
data.
<property-name>
object
Information about the configured job task's estimated pricing and credits consumed. The <property-name> is replaced by the job task name.
Parameters of the data.<property-name> object
blockConsumptionobject
Information about the configured job task's estimated price and credit consumption.
machineConsumptionobject
Information about the estimated duration and credit consumption of the machine that will run the job task.
Parameters of the <property-name>.blockConsumption object
resourcesobject
Information about the configured job task's estimated consumption of resources.
resources.unitstring
The resource consumption unit of the job task:
  • SQUARE_KM
  • MEGABYTE
  • SCENE
  • MEGAPIXEL
  • TILE
  • DATA_POINT
  • PIXEL
  • QUANTITY
resources.minnumber
The estimated minimum of the resource that may be used in the configured job task.
resources.maxnumber
The estimated maximum of the resource that may be used in the configured job task.
creditobject
An estimation of data and processing costs for the configured job task.
credit.minnumber
The estimated minimum credits that may be consumed.
credit.maxnumber
The estimated maximum credits that may be consumed.
Parameters of the <property-name>.machineConsumption object
durationobject
Information about the job task's estimated processing time.
duration.mininteger
The estimated minimum duration of the processing time.
duration.maxinteger
The estimated maximum duration of the processing time.
creditobject
An estimation of infrastructure costs for the configured job task.
credit.minnumber
The estimated minimum credits that may be consumed.
credit.maxnumber
The estimated maximum credits that may be consumed.

Estimate a job without validation

To estimate a job quickly, without validation of the job input, call the /estimate/job endpoint.

Request

POST /estimate/job HTTP/1.1
Host: api.up42.com
Content-Type: application/json
Authorization: Bearer {token}

The request parameters are the same as estimating a job with validation.

See request example
{
  "tasks": [
    {
      "blockId": "defb134b-ca00-4e16-afa0-639c6dc0c5fe",
      "blockVersionTag": "2.5.2",
      "name": "oneatlas-pleiades-fullscene:1",
      "parentName": 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,
      "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

The response contains an object with the job estimate.

See response example
{
  "data": {
    "oneatlas-pleiades-fullscene:1": {
      "blockConsumption": {
        "resources": {
          "unit": "SQUARE_KM",
          "min": 0.365356,
          "max": 0.365404
        },
        "credit": {
          "min": 366,
          "max": 366
        }
      },
      "machineConsumption": {
        "duration": {
          "min": 0,
          "max": 0
        },
        "credit": {
          "min": 1,
          "max": 1
        }
      }
    }
  },
  "error": null
}

See an existing estimate

To see an existing estimate for a job, call the /projects/{project_id}/jobs/{job_id}/estimate endpoint with your project ID and job ID as path parameters.

Request

GET /projects/{project_id}/jobs/{job_id}/estimate HTTP/1.1
Host: api.up42.com
Authorization: Bearer {token}

Response

The response contains an object with the job estimate that matches the request criteria.

See response example
{
  "data": {
    "property1": {
      "blockConsumption": {
        "resources": {
          "unit": "SQUARE_KM",
          "min": 0,
          "max": 0
        },
        "credit": {
          "min": 0,
          "max": 0
        }
      },
      "machineConsumption": {
        "duration": {
          "min": null,
          "max": null
        },
        "credit": {
          "min": 0,
          "max": 0
        }
      }
    }
  },
  "error": {}
}