Workflow Operations (API)

Advanced API calls for interacting with workflows.


This guide assumes that you already authenticated and defined the project ID as variable PROJ and the project token as variable PTOKEN. For more information, please refer to Authentication.

View Workflows

Display the details of all the workflows from this project:

curl -s GET -H "Authorization: Bearer $PTOKEN" \
https://api.up42.com/projects/$PROJ/workflows/ | jq '.'

Display all the workflow IDs and their names from this project:

curl -s GET -H "Authorization: Bearer $PTOKEN" \
https://api.up42.com/projects/$PROJ/workflows | jq -r '.data[] | .id,.name'

Display the details of a specific workflow and save them in a new file (workflow_details.json):

curl -L -s https://api.up42.com/projects/$PROJ/workflows/$WORKFLOW \
-H "Authorization: Bearer $PTOKEN" | jq '.' > workflow_details.json

Get the tasks of a specific workflow and save them in a new file (workflow_tasks.json):

curl -L -s https://api.up42.com/projects/$PROJ/workflows/$WORKFLOW/tasks \
-H "Authorization: Bearer $PTOKEN" | jq '.' > workflow_tasks.json

Do not confuse workflow tasks (also defined as blocks) with job tasks (also defined as job steps that generate individual outputs).

Update Workflow

The workflow created in the previous article was based on the data block Pléiades Reflectance (Download), which has the block ID defb134b-ca00-4e16-afa0-639c6dc0c5fe. This data block is the first task of the workflow.


In this example, we will replace the first task with the data block SPOT 6/7 Reflectance (Download), which has the block ID 63a69b97-1765-474e-b465-0b319b8d3b2d. Create a file containing the request body that includes all the 3 tasks you previously added. In this request body, replace the first task with the new task (workflow_with_spot.json):


Update your workflow with the new task and save your response in a new file (workflow_updated_response.json):

curl -s POST -H "Authorization: Bearer $PTOKEN" -H 'Content-Type: application/json' \
https://api.up42.com/projects/$PROJ/workflows/$NEW_WORKFLOW/tasks \
-d @workflow_with_spot.json \
| jq '.' > workflow_updated_response.json

Delete Workflow

Delete the workflow from your project:

curl -sL -X DELETE https://api.up42.com/projects/$PROJ/workflows/$WORKFLOW \
-H "Authorization: Bearer $PTOKEN"

Verify that the workflow has been deleted:

curl -s -L https://api.up42.com/projects/$PROJ/workflows/$WORKFLOW \
-H "Authorization: Bearer $PTOKEN" | jq '.'