API Reference
Trigger a task run
Creates a new run for the specified task and starts execution.
POST /api/runs/trigger/{taskId}
Creates a new run for the specified task and starts execution.
Operation ID: triggerRun
Authentication
Option 1
- BearerAuth (
http bearer) API key token. Create via POST /api/api-keys. Format:envoy_<hex>
Option 2
- CookieAuth (
apiKey) Session cookie set after login + TOTP verification
Path parameters
taskId—integer,requiredTask ID to run
Request body
application/json
- Type:
object - Properties:
arguments(object) — Runtime arguments passed to the task- Description: Runtime arguments passed to the task
- Additional properties: allowed
connector_mapping(object) — Map of connector slot name to connector ID- Description: Map of connector slot name to connector ID
- Additional properties:
- Type:
integer
- Type:
Success responses
201
Run created and started
Content type: application/json
- Reference:
Run- Type:
object - Properties:
id(integer)task_id(integer)task_version(integer)trigger_type(string)- Allowed values:
manual,cron,api
- Allowed values:
status(string)- Allowed values:
pending,running,success,completed,failed,cancelled
- Allowed values:
arguments(string | null) — JSON-encoded arguments- Description: JSON-encoded arguments
- Nullable: yes
connector_mapping(string | null) — JSON-encoded map of connector slot name to connector ID- Description: JSON-encoded map of connector slot name to connector ID
- Nullable: yes
started_at(string | null)- Format:
date-time - Nullable: yes
- Format:
completed_at(string | null)- Format:
date-time - Nullable: yes
- Format:
duration_ms(integer | null)- Nullable: yes
item_count(integer | null)- Nullable: yes
error_message(string | null)- Nullable: yes
log_file(string | null)- Nullable: yes
metrics_summary(string | null)- Nullable: yes
created_at(string)- Format:
date-time
- Format:
updated_at(string)- Format:
date-time
- Format:
- Type:
Error responses
404
Resource not found
Content type: application/json
- Reference:
Error- Type:
object - Properties:
error(string)- Example:
NOT_FOUND
- Example:
message(string)- Example:
Resource not found
- Example:
- Type:
Example:
{
"error": "NOT_FOUND",
"message": "Resource not found"
}Examples
cURL
curl --request POST \
--url 'https://your-envoy.example.com/api/runs/trigger/YOUR_TASK_ID' \
--header 'Authorization: Bearer $API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"arguments": {},
"connector_mapping": {}
}'JavaScript (fetch)
const response = await fetch('https://your-envoy.example.com/api/runs/trigger/YOUR_TASK_ID', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"arguments": {},
"connector_mapping": {}
}),
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = response.status === 204 ? null : await response.json();
console.log(data);