curl --request POST \
--url https://api.cyberdesk.io/v1/runs/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"count": 123,
"machine_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pool_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"input_values": {},
"file_inputs": [
{
"filename": "<string>",
"content": "<string>",
"target_path": "<string>",
"cleanup_imports_after_run": false
}
],
"sensitive_input_values": {},
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start_session": false
}
'import requests
url = "https://api.cyberdesk.io/v1/runs/bulk"
payload = {
"workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"count": 123,
"machine_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pool_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"input_values": {},
"file_inputs": [
{
"filename": "<string>",
"content": "<string>",
"target_path": "<string>",
"cleanup_imports_after_run": False
}
],
"sensitive_input_values": {},
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start_session": False
}
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({
workflow_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
count: 123,
machine_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
pool_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
input_values: {},
file_inputs: [
{
filename: '<string>',
content: '<string>',
target_path: '<string>',
cleanup_imports_after_run: false
}
],
sensitive_input_values: {},
session_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
start_session: false
})
};
fetch('https://api.cyberdesk.io/v1/runs/bulk', 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.cyberdesk.io/v1/runs/bulk",
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([
'workflow_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'count' => 123,
'machine_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'pool_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'input_values' => [
],
'file_inputs' => [
[
'filename' => '<string>',
'content' => '<string>',
'target_path' => '<string>',
'cleanup_imports_after_run' => false
]
],
'sensitive_input_values' => [
],
'session_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'start_session' => false
]),
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.cyberdesk.io/v1/runs/bulk"
payload := strings.NewReader("{\n \"workflow_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"count\": 123,\n \"machine_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"pool_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"input_values\": {},\n \"file_inputs\": [\n {\n \"filename\": \"<string>\",\n \"content\": \"<string>\",\n \"target_path\": \"<string>\",\n \"cleanup_imports_after_run\": false\n }\n ],\n \"sensitive_input_values\": {},\n \"session_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"start_session\": false\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.cyberdesk.io/v1/runs/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workflow_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"count\": 123,\n \"machine_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"pool_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"input_values\": {},\n \"file_inputs\": [\n {\n \"filename\": \"<string>\",\n \"content\": \"<string>\",\n \"target_path\": \"<string>\",\n \"cleanup_imports_after_run\": false\n }\n ],\n \"sensitive_input_values\": {},\n \"session_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"start_session\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cyberdesk.io/v1/runs/bulk")
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 \"workflow_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"count\": 123,\n \"machine_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"pool_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"input_values\": {},\n \"file_inputs\": [\n {\n \"filename\": \"<string>\",\n \"content\": \"<string>\",\n \"target_path\": \"<string>\",\n \"cleanup_imports_after_run\": false\n }\n ],\n \"sensitive_input_values\": {},\n \"session_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"start_session\": false\n}"
response = http.request(request)
puts response.read_body{
"created_runs": [
{
"workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"machine_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "<string>",
"error": [
"<string>"
],
"output_data": {},
"input_attachment_ids": [
"<string>"
],
"output_attachment_ids": [
"<string>"
],
"run_message_history": [
{}
],
"input_values": {},
"main_prompt": "<string>",
"model_metadata": {
"main_agent_model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cache_detection_model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fallback_model_1_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fallback_model_2_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"pool_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"sensitive_input_aliases": {},
"usage_metadata": {},
"post_run_checks": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"post_run_check_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"snapshot_version": 123,
"name": "<string>",
"description": "<string>",
"order": 123,
"file_names": [
"<string>"
],
"file_name_regex": "<string>",
"expected_match_count": 123,
"expected_match_count_ref": "<string>",
"loop_input": "<string>",
"loop_item_filename_template": "<string>",
"allow_missing_attachments": false,
"check_prompt": "<string>",
"model": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"error_message": "<string>",
"messages": [
"<string>"
],
"matched_filenames": [
"<string>"
]
}
],
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"session_alias": "<string>",
"release_session_after": true,
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z"
}
],
"failed_count": 0,
"errors": [
"<string>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Bulk Create Runs
Create multiple runs with the same configuration.
This endpoint creates multiple runs efficiently:
- All runs are created in a single database transaction
- Temporal workflows are started asynchronously
- Returns immediately with created run details
Maximum 1000 runs can be created in a single request.
curl --request POST \
--url https://api.cyberdesk.io/v1/runs/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"count": 123,
"machine_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pool_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"input_values": {},
"file_inputs": [
{
"filename": "<string>",
"content": "<string>",
"target_path": "<string>",
"cleanup_imports_after_run": false
}
],
"sensitive_input_values": {},
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start_session": false
}
'import requests
url = "https://api.cyberdesk.io/v1/runs/bulk"
payload = {
"workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"count": 123,
"machine_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pool_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"input_values": {},
"file_inputs": [
{
"filename": "<string>",
"content": "<string>",
"target_path": "<string>",
"cleanup_imports_after_run": False
}
],
"sensitive_input_values": {},
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start_session": False
}
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({
workflow_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
count: 123,
machine_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
pool_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
input_values: {},
file_inputs: [
{
filename: '<string>',
content: '<string>',
target_path: '<string>',
cleanup_imports_after_run: false
}
],
sensitive_input_values: {},
session_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
start_session: false
})
};
fetch('https://api.cyberdesk.io/v1/runs/bulk', 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.cyberdesk.io/v1/runs/bulk",
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([
'workflow_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'count' => 123,
'machine_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'pool_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'input_values' => [
],
'file_inputs' => [
[
'filename' => '<string>',
'content' => '<string>',
'target_path' => '<string>',
'cleanup_imports_after_run' => false
]
],
'sensitive_input_values' => [
],
'session_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'start_session' => false
]),
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.cyberdesk.io/v1/runs/bulk"
payload := strings.NewReader("{\n \"workflow_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"count\": 123,\n \"machine_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"pool_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"input_values\": {},\n \"file_inputs\": [\n {\n \"filename\": \"<string>\",\n \"content\": \"<string>\",\n \"target_path\": \"<string>\",\n \"cleanup_imports_after_run\": false\n }\n ],\n \"sensitive_input_values\": {},\n \"session_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"start_session\": false\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.cyberdesk.io/v1/runs/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workflow_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"count\": 123,\n \"machine_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"pool_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"input_values\": {},\n \"file_inputs\": [\n {\n \"filename\": \"<string>\",\n \"content\": \"<string>\",\n \"target_path\": \"<string>\",\n \"cleanup_imports_after_run\": false\n }\n ],\n \"sensitive_input_values\": {},\n \"session_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"start_session\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cyberdesk.io/v1/runs/bulk")
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 \"workflow_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"count\": 123,\n \"machine_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"pool_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"input_values\": {},\n \"file_inputs\": [\n {\n \"filename\": \"<string>\",\n \"content\": \"<string>\",\n \"target_path\": \"<string>\",\n \"cleanup_imports_after_run\": false\n }\n ],\n \"sensitive_input_values\": {},\n \"session_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"start_session\": false\n}"
response = http.request(request)
puts response.read_body{
"created_runs": [
{
"workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"machine_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "<string>",
"error": [
"<string>"
],
"output_data": {},
"input_attachment_ids": [
"<string>"
],
"output_attachment_ids": [
"<string>"
],
"run_message_history": [
{}
],
"input_values": {},
"main_prompt": "<string>",
"model_metadata": {
"main_agent_model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cache_detection_model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fallback_model_1_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fallback_model_2_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"pool_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"sensitive_input_aliases": {},
"usage_metadata": {},
"post_run_checks": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"post_run_check_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"snapshot_version": 123,
"name": "<string>",
"description": "<string>",
"order": 123,
"file_names": [
"<string>"
],
"file_name_regex": "<string>",
"expected_match_count": 123,
"expected_match_count_ref": "<string>",
"loop_input": "<string>",
"loop_item_filename_template": "<string>",
"allow_missing_attachments": false,
"check_prompt": "<string>",
"model": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"error_message": "<string>",
"messages": [
"<string>"
],
"matched_filenames": [
"<string>"
]
}
],
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"session_alias": "<string>",
"release_session_after": true,
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z"
}
],
"failed_count": 0,
"errors": [
"<string>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Unique key for idempotent requests. If provided, the server ensures the request is processed at most once. Retries with the same key return the original response. SDKs auto-generate this for write requests.
"550e8400-e29b-41d4-a716-446655440000"
Body
Schema for bulk creating runs
Number of runs to create (max 1000)
x <= 1000Machine ID. If not provided, an available machine will be automatically selected.
Pool IDs to filter available machines. Machine must belong to all of these pools (intersection). Ignored when machine_id is provided.
Input values for workflow variables
Files to upload to the machine
Show child attributes
Show child attributes
Sensitive input values (supports nested objects) to store in the secure vault per run. Not persisted in our database. In workflow input_schema, sensitive root keys are validated under a '$' prefixed key.
Join an existing session; overrides machine_id/pool_ids for all runs
Start a new session for these runs; a new UUID will be generated and set on all runs. The first run will attempt to reserve a machine.
Was this page helpful?