curl --request GET \
--url https://{sandbox_key}.{domain}/executions/{execution_id} \
--header 'X-Access-Token: <api-key>'import requests
url = "https://{sandbox_key}.{domain}/executions/{execution_id}"
headers = {"X-Access-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Access-Token': '<api-key>'}};
fetch('https://{sandbox_key}.{domain}/executions/{execution_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{sandbox_key}.{domain}/executions/{execution_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Access-Token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{sandbox_key}.{domain}/executions/{execution_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Access-Token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{sandbox_key}.{domain}/executions/{execution_id}")
.header("X-Access-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{sandbox_key}.{domain}/executions/{execution_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Access-Token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"execution_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sandbox_id": "<string>",
"status": "pending",
"exit_code": 123,
"stdout": "<string>",
"stderr": "<string>",
"stdout_truncated": true,
"stderr_truncated": true,
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"request_id": "<string>"
}{
"code": "Execution.InvalidRequest",
"message": "<string>",
"request_id": "<string>",
"details": {}
}{
"code": "Execution.InvalidRequest",
"message": "<string>",
"request_id": "<string>",
"details": {}
}{
"code": "Execution.InvalidRequest",
"message": "<string>",
"request_id": "<string>",
"details": {}
}{
"code": "Execution.InvalidRequest",
"message": "<string>",
"request_id": "<string>",
"details": {}
}{
"code": "Execution.InvalidRequest",
"message": "<string>",
"request_id": "<string>",
"details": {}
}Get a sandbox execution
curl --request GET \
--url https://{sandbox_key}.{domain}/executions/{execution_id} \
--header 'X-Access-Token: <api-key>'import requests
url = "https://{sandbox_key}.{domain}/executions/{execution_id}"
headers = {"X-Access-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Access-Token': '<api-key>'}};
fetch('https://{sandbox_key}.{domain}/executions/{execution_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{sandbox_key}.{domain}/executions/{execution_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Access-Token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{sandbox_key}.{domain}/executions/{execution_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Access-Token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{sandbox_key}.{domain}/executions/{execution_id}")
.header("X-Access-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{sandbox_key}.{domain}/executions/{execution_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Access-Token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"execution_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sandbox_id": "<string>",
"status": "pending",
"exit_code": 123,
"stdout": "<string>",
"stderr": "<string>",
"stdout_truncated": true,
"stderr_truncated": true,
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"request_id": "<string>"
}{
"code": "Execution.InvalidRequest",
"message": "<string>",
"request_id": "<string>",
"details": {}
}{
"code": "Execution.InvalidRequest",
"message": "<string>",
"request_id": "<string>",
"details": {}
}{
"code": "Execution.InvalidRequest",
"message": "<string>",
"request_id": "<string>",
"details": {}
}{
"code": "Execution.InvalidRequest",
"message": "<string>",
"request_id": "<string>",
"details": {}
}{
"code": "Execution.InvalidRequest",
"message": "<string>",
"request_id": "<string>",
"details": {}
}Authorizations
Sandbox data-plane token — the sandbox_access_token returned by the create/connect endpoints. Used for /files, Sandbox-Exec, and other data-plane endpoints; the control plane (/api/v2) does not accept it, and conversely the control plane's Authorization: Bearer is invalid on the data plane.
The token is bound to its sandbox: using sandbox A's token against sandbox B's host fails. It stays valid until the sandbox's lifetime ends; there is no separate rotation endpoint (rotate_traffic_token rotates the port traffic token traffic_access_token and does not affect this one).
Headers
Optional request correlation identifier echoed in the response.
1 - 128Path Parameters
Public execution identifier returned by the create operation.
Response
Current execution status and any available output.
Echo of the data-plane addressing key (i.e. sandbox_key; the data plane identifies the instance by the key in the host).
Public lifecycle status of a sandbox execution.
pending, running, canceling, succeeded, failed, canceled Process exit code; null while non-terminal or when canceled.
Captured standard output, or null while not yet available.
Captured standard error, or null while not yet available.
Echo of X-Request-ID when supplied.