Plan Automation
POST
/api/automations/{automation_alias}/plan
const url = 'https://example.com/api/automations/example/plan';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"agent_id":"example","agent_alias":"example","user_id":"example","prompt":"example","query":"example","prompt_template":{"name":"example","params":{"additionalProperty":"example"}},"automation_name":"example","description":"example","schedule":{"type":"example","cron_expression":"example","timezone":"UTC"},"document_template_name":"example","document_template_version":1,"template_id":"example","response_schema":{},"priority":1,"automation_id":"example","actions_config":{}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/automations/example/plan \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "agent_id": "example", "agent_alias": "example", "user_id": "example", "prompt": "example", "query": "example", "prompt_template": { "name": "example", "params": { "additionalProperty": "example" } }, "automation_name": "example", "description": "example", "schedule": { "type": "example", "cron_expression": "example", "timezone": "UTC" }, "document_template_name": "example", "document_template_version": 1, "template_id": "example", "response_schema": {}, "priority": 1, "automation_id": "example", "actions_config": {} }'Create and validate an automation execution plan.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”automation_alias
required
Automation Alias
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
AutomationValidateRequest
object
agent_alias
required
Agent Alias
string
user_id
required
User Id
string
prompt_template
Any of:
PromptTemplateRef
object
name
required
Name
string
params
Params
object
key
additional properties
string
null
automation_name
required
Automation Name
string
schedule
required
priority
Priority
integer
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
AutomationValidateResponse
object
success
required
Success
boolean
attempt_id
required
Attempt Id
string
business_trigger
required
Business Trigger
boolean
status
required
Status
string
plan
required
Plan
object
key
additional properties
any
schedule
required
Schedule
object
key
additional properties
any
api_response_time_seconds
required
Api Response Time Seconds
number
validation_warnings
Any of:
Array<string>
null
Examplegenerated
{ "success": true, "attempt_id": "example", "automation_alias": "example", "business_trigger": true, "status": "example", "deployment_status": "example", "deployment_status_reason": "example", "plan": {}, "schedule": {}, "api_response_time_seconds": 1, "validation_warnings": [ "example" ], "planner_type": "example", "planner_model": "example", "prompt_template_used": "example", "bundle_validation": {}}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}