Export selected live Tool state as reusable scenario source
curl --request POST \
--url https://api.firedrill.run/v1/projects/{projectId}/sessions/{sessionId}/scenario-export \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"expectedLeaseGeneration": 4503599627370495,
"includeSensitiveData": true,
"title": "<string>",
"packages": [
"<string>"
]
}
'import requests
url = "https://api.firedrill.run/v1/projects/{projectId}/sessions/{sessionId}/scenario-export"
payload = {
"id": "<string>",
"expectedLeaseGeneration": 4503599627370495,
"includeSensitiveData": True,
"title": "<string>",
"packages": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
expectedLeaseGeneration: 4503599627370495,
includeSensitiveData: true,
title: '<string>',
packages: ['<string>']
})
};
fetch('https://api.firedrill.run/v1/projects/{projectId}/sessions/{sessionId}/scenario-export', 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://api.firedrill.run/v1/projects/{projectId}/sessions/{sessionId}/scenario-export",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '<string>',
'expectedLeaseGeneration' => 4503599627370495,
'includeSensitiveData' => true,
'title' => '<string>',
'packages' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.firedrill.run/v1/projects/{projectId}/sessions/{sessionId}/scenario-export"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"expectedLeaseGeneration\": 4503599627370495,\n \"includeSensitiveData\": true,\n \"title\": \"<string>\",\n \"packages\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.firedrill.run/v1/projects/{projectId}/sessions/{sessionId}/scenario-export")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"expectedLeaseGeneration\": 4503599627370495,\n \"includeSensitiveData\": true,\n \"title\": \"<string>\",\n \"packages\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firedrill.run/v1/projects/{projectId}/sessions/{sessionId}/scenario-export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"expectedLeaseGeneration\": 4503599627370495,\n \"includeSensitiveData\": true,\n \"title\": \"<string>\",\n \"packages\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"schemaVersion": 1,
"scope": "tool-state",
"organizationId": "<string>",
"projectId": "<string>",
"sessionId": "<string>",
"worldInstanceId": "<string>",
"buildHash": "<string>",
"packageLockHash": "<string>",
"leaseGeneration": 4503599627370495,
"generation": 4503599627370495,
"evidenceSequence": 0,
"sourceHash": "<string>",
"packages": [
"<string>"
],
"recordCount": 25000,
"deletionCount": 25000,
"scenario": {
"schemaVersion": 1,
"id": "<string>",
"actors": [
{}
],
"state": [
{
"action": "upsert",
"packageId": "<string>",
"namespace": "<string>",
"rowId": "<string>",
"value": {}
}
],
"faults": [
{}
],
"initialEvents": [
{}
],
"title": "<string>"
},
"omitted": [
"actors"
],
"redaction": "none",
"runtimeChanged": false
}{
"code": "<string>",
"message": "<string>",
"correlationId": "<string>",
"retryable": true,
"source": "platform",
"retryAfterMs": 123,
"operationId": "<string>",
"issues": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"details": {},
"evidence": {
"sessionId": "<string>",
"runId": "<string>",
"journalSeq": 4503599627370495,
"buildHash": "<string>"
}
}Export selected live Tool state as reusable scenario source
Reads the current lease without changing it. Explicit sensitive-data consent is required. The source omits clock, actors, pending work and history; it is not a runtime snapshot.
Export selected live Tool state as reusable scenario source
curl --request POST \
--url https://api.firedrill.run/v1/projects/{projectId}/sessions/{sessionId}/scenario-export \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"expectedLeaseGeneration": 4503599627370495,
"includeSensitiveData": true,
"title": "<string>",
"packages": [
"<string>"
]
}
'import requests
url = "https://api.firedrill.run/v1/projects/{projectId}/sessions/{sessionId}/scenario-export"
payload = {
"id": "<string>",
"expectedLeaseGeneration": 4503599627370495,
"includeSensitiveData": True,
"title": "<string>",
"packages": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
expectedLeaseGeneration: 4503599627370495,
includeSensitiveData: true,
title: '<string>',
packages: ['<string>']
})
};
fetch('https://api.firedrill.run/v1/projects/{projectId}/sessions/{sessionId}/scenario-export', 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://api.firedrill.run/v1/projects/{projectId}/sessions/{sessionId}/scenario-export",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '<string>',
'expectedLeaseGeneration' => 4503599627370495,
'includeSensitiveData' => true,
'title' => '<string>',
'packages' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.firedrill.run/v1/projects/{projectId}/sessions/{sessionId}/scenario-export"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"expectedLeaseGeneration\": 4503599627370495,\n \"includeSensitiveData\": true,\n \"title\": \"<string>\",\n \"packages\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.firedrill.run/v1/projects/{projectId}/sessions/{sessionId}/scenario-export")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"expectedLeaseGeneration\": 4503599627370495,\n \"includeSensitiveData\": true,\n \"title\": \"<string>\",\n \"packages\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firedrill.run/v1/projects/{projectId}/sessions/{sessionId}/scenario-export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"expectedLeaseGeneration\": 4503599627370495,\n \"includeSensitiveData\": true,\n \"title\": \"<string>\",\n \"packages\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"schemaVersion": 1,
"scope": "tool-state",
"organizationId": "<string>",
"projectId": "<string>",
"sessionId": "<string>",
"worldInstanceId": "<string>",
"buildHash": "<string>",
"packageLockHash": "<string>",
"leaseGeneration": 4503599627370495,
"generation": 4503599627370495,
"evidenceSequence": 0,
"sourceHash": "<string>",
"packages": [
"<string>"
],
"recordCount": 25000,
"deletionCount": 25000,
"scenario": {
"schemaVersion": 1,
"id": "<string>",
"actors": [
{}
],
"state": [
{
"action": "upsert",
"packageId": "<string>",
"namespace": "<string>",
"rowId": "<string>",
"value": {}
}
],
"faults": [
{}
],
"initialEvents": [
{}
],
"title": "<string>"
},
"omitted": [
"actors"
],
"redaction": "none",
"runtimeChanged": false
}{
"code": "<string>",
"message": "<string>",
"correlationId": "<string>",
"retryable": true,
"source": "platform",
"retryAfterMs": 123,
"operationId": "<string>",
"issues": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"details": {},
"evidence": {
"sessionId": "<string>",
"runId": "<string>",
"journalSeq": 4503599627370495,
"buildHash": "<string>"
}
}Authorizations
Opaque control credential
Path Parameters
Pattern:
^prj_[0-9a-z]{12,32}$Pattern:
^ses_[0-9a-z]{12,32}$Body
application/json
Required string length:
1 - 96Pattern:
^[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*$Required range:
0 < x <= 9007199254740991Explicit consent to export raw selected Tool data, which may contain sensitive values. Review before sharing. No redaction is performed.
Available options:
true Required string length:
1 - 200Required array length:
1 - 256 elementsRequired string length:
1 - 96Pattern:
^[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*$Response
Captured scenario source and provenance
Available options:
1 Available options:
tool-state Pattern:
^org_[0-9a-z]{12,32}$Pattern:
^prj_[0-9a-z]{12,32}$Pattern:
^ses_[0-9a-z]{12,32}$Pattern:
^world_[A-Za-z0-9][A-Za-z0-9_-]{5,95}$Pattern:
^sha256:[0-9a-f]{64}$Pattern:
^sha256:[0-9a-f]{64}$Required range:
0 < x <= 9007199254740991The hosted session lease generation at capture, not a reusable source version.
Required range:
0 < x <= 9007199254740991Required range:
-9007199254740991 <= x <= 9007199254740991Pattern:
^sha256:[0-9a-f]{64}$Required array length:
1 - 256 elementsRequired string length:
1 - 96Pattern:
^[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*$Required range:
0 <= x <= 50000Required range:
0 <= x <= 50000Show child attributes
Show child attributes
Required array length:
8 elementsAvailable options:
actors, clock, faults, pending events, callbacks, history, random position, idempotency receipts Available options:
none Available options:
false