Runbooks API

The Airplane API is currently available to customers as a beta and is subject to change. Please reach out to us at hello@airplane.dev with any feedback!

A Runbook is a multi-step, human-in-the-loop workflow. Runbooks are able to take a set of top-level parameters, run one or more functions, and generate output at each step of the way.

The current runbooks API is focused around allowing you to execute runbooks. Each instance of an executed runbook is called a session. See Sessions API for how to track a session's status after you've executed a runbook.

Endpoints

Execute Runbook

POST /v0/runbooks/execute

Execute a runbook and receive a session ID to track the runbook's exeuction. Check on the status of your newly created session with /sessions/get.

Execute Runbook
Copied
1
curl https://api.airplane.dev/v0/runbooks/execute \
2
-X POST \
3
-H "X-Airplane-API-Key: $AIRPLANE_API_KEY" \
4
-d 'envSlug=prod' \
5
-d '{
6
"id": "rbk20220120z15kl79",
7
"paramValues": {
8
"limit": "20",
9
"user": "eric"
10
}
11
}'

Query Parameters

envSlugstringoptional

Environment to execute the runbook in.

Body Parameters

idstringREQUIRED

Unique ID of the runbook. You can find your runbook's ID by visiting the runbook's page on Airplane. The runbook ID is located at the end of the url.

e.g. the runbook ID for https://app.airplane.dev/runbooks/rbk20220120z15kl79 is rbk20220120z15kl79

paramValueskey valueoptional

Mapping of parameter name to value. You can find your runbooks's parameters inside the runbook editor on Airplane.

Response
Copied
1
{
2
"sessionID": "ses20220120za1pskd"
3
}

Response

sessionIDstring

Unique ID of the runbook's session.