Get Scenario job status
curl --request GET \
--url https://api.exec.com/rest/v1/scenario-studio/jobs/{job_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exec.com/rest/v1/scenario-studio/jobs/{job_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exec.com/rest/v1/scenario-studio/jobs/{job_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://api.exec.com/rest/v1/scenario-studio/jobs/{job_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 => [
"Authorization: Bearer <token>"
],
]);
$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://api.exec.com/rest/v1/scenario-studio/jobs/{job_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.exec.com/rest/v1/scenario-studio/jobs/{job_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exec.com/rest/v1/scenario-studio/jobs/{job_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "j1o2b3i4d5x6",
"status": "queued",
"scenario": null,
"error": null,
"created_at": "2024-03-01T10:00:00Z",
"started_at": null,
"completed_at": null,
"duration_seconds": null
}Scenario Studio
Get Scenario job status
Returns the current status and result of a scenario creation job.
Poll this endpoint to check job progress. Typical job duration is about 5 minutes.
Job statuses:
queued: Job is waiting to be processedprocessing: AI agent is actively creating the scenariocompleted: Scenario created successfully (checkscenariofield)failed: Job failed (checkerrorfield for details)cancelled: Job was cancelled via DELETE
GET
/
scenario-studio
/
jobs
/
{job_id}
Get Scenario job status
curl --request GET \
--url https://api.exec.com/rest/v1/scenario-studio/jobs/{job_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exec.com/rest/v1/scenario-studio/jobs/{job_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exec.com/rest/v1/scenario-studio/jobs/{job_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://api.exec.com/rest/v1/scenario-studio/jobs/{job_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 => [
"Authorization: Bearer <token>"
],
]);
$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://api.exec.com/rest/v1/scenario-studio/jobs/{job_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.exec.com/rest/v1/scenario-studio/jobs/{job_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exec.com/rest/v1/scenario-studio/jobs/{job_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "j1o2b3i4d5x6",
"status": "queued",
"scenario": null,
"error": null,
"created_at": "2024-03-01T10:00:00Z",
"started_at": null,
"completed_at": null,
"duration_seconds": null
}Authorizations
API key created in Settings > API.
Format: exec_live_ followed by 40 alphanumeric characters.
Path Parameters
The job ID returned from job creation
Response
Job status and result
Job identifier
Current job status
Available options:
queued, processing, completed, failed, cancelled Created scenario details (only present when status is "completed")
Show child attributes
Show child attributes
Error details (only present when status is "failed")
Show child attributes
Show child attributes
When the job was created
When the job started processing
When the job finished (success, failure, or cancelled)
Processing duration in seconds (only present when job has completed)