Skip to main content

Passing data between tasks

You can pass data between tasks using context. Context is a map where data can be saved in one task and retrieved in another. The output of the previous task is by default saved at context["last_output"].

Example with a POST request returning an ID to be used in the GET request in the following task.

method: POST
baseUrl: https://example.com
path: /api/users
headers:
Content-Type: application/json
body: |-
{
"name": "morpheus",
"job": "leader"
}

method: GET
baseUrl: https://example.com
path: /api/users/${{context.last_output.body.id}}
headers:
Content-Type: application/json