Start a run
Initiates a new run of the specified agent with the provided configuration parameters.
Sample request:
{
"inputParameters": {
"param1": "value1",
"param2": "value2"
},
"parallelism": 1,
"parallelMaxConcurrency": 2,
"parallelExport": true,
"proxyPoolId": 123,
"isExclusive": false,
"isWaitOnFailure": true,
"logLevel": "Info",
"logMode": "Normal"
}
Encrypted input parameters
Prefix a parameter name with ? to have its value encrypted at rest and hidden in
the Run log — for example "?apiKey" instead of "apiKey". The name you send decides
this. Sending a name without the ? prefix stores and logs the value in clear text,
even when the Agent defines that parameter as encrypted. Omitting a parameter
entirely leaves the Agent’s own definition in effect, encryption included.
If you send both "name" and "?name", the ?-prefixed entry is used and the plain
one is discarded. The request still succeeds.
Call GET /api/v1/agent/{agentId}/input-parameters to see which parameters an Agent
defines as encrypted.
curl --request POST \
--url https://api.example.com/api/v1/agent/{agentId}/start \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"parallelism": 123,
"parallelMaxConcurrency": 123,
"proxyPoolId": 123,
"inputParameters": "<string>",
"timeout": 123,
"isExclusive": true,
"isWaitOnFailure": true,
"isRunSynchronously": true
}
'import requests
url = "https://api.example.com/api/v1/agent/{agentId}/start"
payload = {
"parallelism": 123,
"parallelMaxConcurrency": 123,
"proxyPoolId": 123,
"inputParameters": "<string>",
"timeout": 123,
"isExclusive": True,
"isWaitOnFailure": True,
"isRunSynchronously": True
}
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({
parallelism: 123,
parallelMaxConcurrency: 123,
proxyPoolId: 123,
inputParameters: '<string>',
timeout: 123,
isExclusive: true,
isWaitOnFailure: true,
isRunSynchronously: true
})
};
fetch('https://api.example.com/api/v1/agent/{agentId}/start', 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.example.com/api/v1/agent/{agentId}/start",
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([
'parallelism' => 123,
'parallelMaxConcurrency' => 123,
'proxyPoolId' => 123,
'inputParameters' => '<string>',
'timeout' => 123,
'isExclusive' => true,
'isWaitOnFailure' => true,
'isRunSynchronously' => true
]),
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.example.com/api/v1/agent/{agentId}/start"
payload := strings.NewReader("{\n \"parallelism\": 123,\n \"parallelMaxConcurrency\": 123,\n \"proxyPoolId\": 123,\n \"inputParameters\": \"<string>\",\n \"timeout\": 123,\n \"isExclusive\": true,\n \"isWaitOnFailure\": true,\n \"isRunSynchronously\": true\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.example.com/api/v1/agent/{agentId}/start")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"parallelism\": 123,\n \"parallelMaxConcurrency\": 123,\n \"proxyPoolId\": 123,\n \"inputParameters\": \"<string>\",\n \"timeout\": 123,\n \"isExclusive\": true,\n \"isWaitOnFailure\": true,\n \"isRunSynchronously\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/agent/{agentId}/start")
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 \"parallelism\": 123,\n \"parallelMaxConcurrency\": 123,\n \"proxyPoolId\": 123,\n \"inputParameters\": \"<string>\",\n \"timeout\": 123,\n \"isExclusive\": true,\n \"isWaitOnFailure\": true,\n \"isRunSynchronously\": true\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"configId": 123,
"configName": "<string>",
"spaceId": 123,
"organizationId": 123,
"organizationName": "<string>",
"sequence": 123,
"parallelism": 123,
"parallelMaxConcurrency": 123,
"parallelExport": "Combined",
"parallelSet": 123,
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"created": "2023-11-07T05:31:56Z",
"status": 0,
"message": "<string>",
"configVersion": 123,
"actionCount": 123,
"pageCount": 123,
"dynamicPageCount": 123,
"requestCount": 123,
"dataCount": 123,
"inputCount": 123,
"errorCount": 123,
"exportCount": 123,
"traffic": 123,
"runTimeSec": 123,
"serverName": "<string>",
"tableType": "<string>"
}{
"statusCode": 123,
"statusDescription": "<string>",
"message": "<string>",
"severity": 0,
"errorCode": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Authorizations
API Key authorization header. Example: "Authorization: ApiKey {your-api-key}"
OAuth 2.0 Bearer token. Example: "Authorization: Bearer {access-token}"
Path Parameters
The ID of the agent to run
Body
The configuration parameters for the run
0 = Combined; 1 = Separated
Combined, Separated 0 = Fatal; 1 = Error; 2 = Warning; 3 = Info
Fatal, Error, Warning, Info 0 = Text; 1 = TextAndHtml
Text, TextAndHtml Response
Returns the ID of the newly created run
0 = Combined; 1 = Separated
Combined, Separated 0 = Invalid; 1 = Running; 2 = Exporting; 3 = Starting; 4 = Queuing; 5 = Stopping; 6 = Failure; 7 = Failed; 8 = Stopped; 9 = Completed; 10 = Success; 11 = Skipped; 12 = Waiting
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12