Runs 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 run represents an instance of a task's execution. See Tasks API for how to execute tasks.

Endpoints

Get Run

GET /v0/runs/get

Get information about an existing run.

Get Run
Copied
1
curl https://api.airplane.dev/v0/runs/get \
2
-H "X-Airplane-API-Key: $AIRPLANE_API_KEY" \
3
-d 'id=run20220215zv10o6s52qj' \
4
-G

Query Parameters

idstringREQUIRED

ID of the run to retrieve.

Response
Copied
1
{
2
"activeAt": "2022-01-11 22:32:45.707231+00",
3
"cancelledAt": "2022-01-11 22:33:03.78416+00",
4
"cancelledBy": "run20220111zlq2ig4",
5
"constraints": {
6
"labels": [
7
{
8
"key": "aws-region",
9
"value": "west-2"
10
}
11
]
12
},
13
"createdAt": "2022-01-11 22:32:45.601486+00",
14
"createdBy": "usr20220103zlufhym",
15
"failedAt": "2022-01-11 22:33:03.78416+00",
16
"id": "run20220111zlq2ig4",
17
"isPrivate": true,
18
"paramValues": {
19
"limit": "20",
20
"user": "eric"
21
},
22
"params": [],
23
"permissions": [
24
{
25
"action": "sessions.get",
26
"roleID": "team_admin",
27
"subGroupID": "grp20220222zaigy4h2bw3",
28
"subUserID": "usr20211123zz1dv7z"
29
}
30
],
31
"resources": {
32
"rest": "res20220208zmwoqk9"
33
},
34
"sessionID": "",
35
"status": "Succeeded",
36
"succeededAt": "2022-01-11 22:33:03.78416+00",
37
"taskID": "tsk20210728zxb2vxn",
38
"teamID": "tea20220103zvy4auu",
39
"timeout": 3600
40
}

Response

activeAtstring

When the run became active. Empty if this run has not started yet.

cancelledAtstring

When the run was cancelled. Empty if this run was not cancelled.

cancelledBystring

ID of the user who cancelled this run.

constraintsobject

Contraints for this run. More details.

 Show child attributes
createdAtstring

When this run was created.

createdBystring

ID of the user that created this run.

failedAtstring

When the run failed. Empty if this run did not fail.

idstring

Unique ID of this run.

isPrivateboolean

Whether or not this run is private.

paramValueskey value

Mapping of parameter name to value used in this run's execution.

paramsarray of object

Schema for the set of values users can provide when executing this run. More details.

permissionsarray of object

Explicit permissions of this run if it is private. More details.

 Show child attributes
resourceskey value

Mapping of resouce name to resource ID of the resources that were used for this run. More details.

sessionIDstring

ID of the session this run was spawned from if triggered by a session.

statusenum

Status of this run.

Possible Values
NotStarted
Queued
Active
Succeeded
Failed
succeededAtstring

When the run succeeded. Empty if this run did not succeed.

taskIDstring

ID of the task this run was spawned from if triggered by a task.

teamIDstring

ID of the team that owns this run.

timeoutinteger

Maximum amount of time in seconds the run could have executed for. More details.

Get Run Outputs

GET /v0/runs/getOutputs

Get outputs from an existing run.

Get Run Outputs
Copied
1
curl https://api.airplane.dev/v0/runs/getOutputs \
2
-H "X-Airplane-API-Key: $AIRPLANE_API_KEY" \
3
-d 'id=run20220215zv10o6s52qj' \
4
-G

Query Parameters

idstringREQUIRED

ID of the run to retrieve.

Response
Copied
1
{
2
"output": {
3
"element": "hydrogen",
4
"weight": "1.008"
5
}
6
}

Response

outputkey value

Outputs from this run. More details.