POST
/
v1
/
runs
/
bulk
Bulk Create Runs
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",
  "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
    }
  ],
  "count": 123,
  "sensitive_input_values": {},
  "session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "start_session": true
}'
{
  "created_runs": [
    {
      "workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "machine_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "organization_id": "<string>",
      "status": "scheduling",
      "error": [
        "<string>"
      ],
      "output_data": {},
      "input_attachment_ids": [
        "<string>"
      ],
      "output_attachment_ids": [
        "<string>"
      ],
      "run_message_history": [
        {}
      ],
      "input_values": {},
      "pool_ids": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ],
      "sensitive_input_aliases": {},
      "session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "session_alias": "<string>",
      "release_session_after": true,
      "created_at": "2023-11-07T05:31:56Z"
    }
  ],
  "failed_count": 0,
  "errors": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Schema for bulk creating runs

workflow_id
string<uuid>
required
count
integer
required

Number of runs to create (max 1000)

Required range: 0 < x <= 1000
machine_id
string<uuid> | null

Machine ID. If not provided, an available machine will be automatically selected.

pool_ids
string<uuid>[] | null

Pool IDs to filter available machines. Machine must belong to all of these pools (intersection). Ignored when machine_id is provided.

input_values
object | null

Input values for workflow variables

file_inputs
FileInput · object[] | null

Files to upload to the machine

sensitive_input_values
object | null

Sensitive input values to store in the secure vault per run. Not persisted in our database.

session_id
string<uuid> | null

Join an existing session; overrides machine_id/pool_ids for all runs

start_session
boolean | null
default:false

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.

Response

Successful Response

Response for bulk run creation

created_runs
RunResponse · object[]
required
failed_count
integer
default:0
errors
string[]