Skip to content

Submitting a Job

A job request has four fields:

FieldRequiredDescription
recipe or recipe_idyesThe pipeline to run
inputsyesArtifact map — the data to process
paramsonly if steps need itPer-step runtime values
outputsnoWhere to write final results in MinIO

Full example

Reproject a survey dataset, then build an EPT tileset:

bash
curl -X POST https://dev.mapprism.com/ordo/jobs \
  -H "Authorization: Bearer <API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "recipe": {
      "name": "reproject-ept",
      "version": "3.0.0",
      "definition": {
        "recipe": [
          {
            "id": "reproject",
            "type": "REPROJECT_LAS",
            "inputs":  { "input_las": "job:input_las" },
            "outputs": { "output_las": "step:reproject.output_las" },
            "param_keys": ["source_epsg", "target_epsg"]
          },
          {
            "id": "build_ept",
            "type": "BUILD_EPT",
            "inputs":  { "input_las": "step:reproject.output_las" },
            "outputs": { "output_ept": "step:build_ept.output_ept" }
          },
          {
            "id": "dataset_info",
            "type": "DATASET_INFO",
            "inputs":  { "input_las": "step:reproject.output_las" },
            "outputs": { "metadata": "step:dataset_info.metadata" }
          }
        ],
        "on_exit": {
          "id": "call_webhook",
          "type": "CALL_WEBHOOK",
          "inputs": { "waits_for": "step:dataset_info.metadata" },
          "param_keys": ["webhook_url"]
        }
      }
    },
    "inputs": {
      "job:input_las": {
        "type": "las",
        "uri": "development/pineydam/mbes.las",
        "hash": "abc123def456"
      }
    },
    "params": {
      "reproject": {
        "source_epsg": "EPSG:2271",
        "target_epsg": "EPSG:3857"
      },
      "call_webhook": {
        "webhook_url": "https://myapp.example.com/hooks/processing-done"
      }
    },
    "outputs": {
      "step:build_ept.output_ept": {
        "path": "development/results/piney-dam/ept"
      }
    }
  }'

Response (201):

json
{ "id": 4 }

inputs field

Keys are namespaced artifact references matching the recipe's job: inputs. Each value:

json
{
  "type": "las",
  "uri": "development/pineydam/mbes.las",
  "hash": "abc123def456"
}
FieldRequiredDescription
typeyesArtifact type: las, tif, ept, potree, json
uriyesPath within MinIO (no bucket prefix)
hashyesContent hash or stable identifier for the file

hash is stored by Ordo but not validated. It can be an MD5, SHA256, or any stable string you use to track file identity.

You must provide exactly the inputs that the recipe requires — no more, no less.


params field

Keyed by step ID. Only needed for steps that declare param_keys. Each step's params are a flat key-value map.

json
"params": {
  "reproject": {
    "source_epsg": "EPSG:2271",
    "target_epsg": "EPSG:3857"
  },
  "call_webhook": {
    "webhook_url": "https://myapp.example.com/hooks/done"
  }
}

Missing a required param returns 400.


outputs field

Declares where produced artifacts should be written in MinIO after the step completes. Optional — artifacts are still tracked in Ordo if this field is omitted.

json
"outputs": {
  "step:build_ept.output_ept": {
    "path": "development/results/piney-dam/ept"
  }
}

Keys are namespaced artifact references. Values have a single path field. Only artifacts that are actually producible by the recipe can be referenced here.

Ordo stores the declaration. n8n performs the actual write to MinIO.


Using an existing recipe by ID

If a recipe is already registered in Ordo, reference it by ID instead of sending the full definition:

json
{
  "recipe_id": 7,
  "inputs": { ... },
  "params": { ... },
  "outputs": { ... }
}