Automation API
Create rules with one event source, optional queries, AND/OR filters, and 1 to 8 ordered actions. The reference follows OpenAPI version 6.0.0.
Service URL
Use the Automation service URL supplied by your deployment. The source specification declares a relative server URL (/) and unversioned routes; it does not declare a production hostname. Before sending requests from the API reference, enter the full service URL, including https:// or http://, in the Server section. The browser remembers this address across Automation endpoints.
Download the OpenAPI JSON.
Authentication
Business routes require a CP-X-API-KEY header with the automation scope. Only health checks and CORS preflight are anonymous.
Rules and history belong to the authenticated Owner. Keys with the same Owner share ordinary management access. exec also requires a configured allowed Key ID. Read the current identity with GET /me.
Rule definition
| Field | Purpose |
|---|---|
source | Exactly one source: cron, incoming, or price. Price emits threshold crossings; the first quote only establishes a baseline. |
queries | Up to 8 named queries that add data to the event without starting a run. Currently supports price. |
filters | Optional AND/OR expressions using text_contains and number_compare. Reads /data/... and /queries/<id>/.... |
actions | 1 to 8 ordered webhook or exec actions. The singular action field is rejected. |
cooldown_minutes | Defaults to 0. Events inside the cooldown window are skipped. |
note | Optional note. Note-only edits do not increment the rule revision. |
Price sources and queries require server-side Oracle configuration. exec is available on Linux/macOS for allowed Key IDs. GET /types lists the types available to the current Key. X and email adapters are not implemented.
Operations
- Create a rule or list rules.
- Replace the full definition, pause, resume, or soft-delete a rule.
- Submit an incoming event: HTTP 202 means the event was saved, not that its actions completed. The caller must own the rule. Request bodies are limited to 64 KiB.
- Inspect source events and per-action execution results. Each action retries and records its result independently; failures continue, while cancellation stops remaining actions.
