For the complete documentation index, see llms.txt. This page is also available as Markdown.

create_automation

Create an automation.

Create an automation: a trigger (a cron schedule or a run event) plus an action (run a suite of features, or run a load test). For schedule triggers the next fire time is computed from the cron immediately.

Request

POST /api/v1/ops/projects/{project}/automations
Parameter
In
Type
Required
Description

project

path

string

yes

The project's public id.

name

body

string

yes

A name for the automation.

enabled

body

boolean

no

Whether it is active (default true).

trigger

body

object

yes

{ type: "schedule", cron, tz? } or { type: "event", kind?, filter? }.

action

body

object

yes

{ type: "run_features", featureIds?, configName?, siteUrl? } or { type: "run_load", featureId, siteUrl? }.

condition

body

object

no

Optional gate, e.g. { "status": "failed" } (event triggers).

A run_features action with no featureIds runs every feature with status generated — the whole runnable suite. The cron accepts 5-field (minute) or 6-field (with seconds) expressions; tz is an IANA timezone id (default UTC) so wall-clock schedules follow DST.

curl -X POST -H "Authorization: Bearer $TESTVIBE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Nightly smoke suite",
    "trigger": { "type": "schedule", "cron": "0 8 * * *", "tz": "America/New_York" },
    "action": { "type": "run_features", "featureIds": [12, 15] }
  }' \
  "$TESTVIBE_SERVER/api/v1/ops/projects/$PROJECT/automations"
testvibe automations create \
  --name "Nightly smoke suite" \
  --trigger schedule --cron "0 8 * * *" --tz America/New_York \
  --action run_features --features 12,15

# event trigger that runs the suite only when a run fails
testvibe automations create \
  --name "Re-run on failure" \
  --trigger event --onStatus failed \
  --action run_features

Tool create_automation — the trigger/action are flattened into discrete args: { "name": "Nightly smoke suite", "triggerType": "schedule", "cron": "0 8 * * *", "tz": "America/New_York", "actionType": "run_features", "featureIds": ["12", "15"] }.

Response

201 Created — the created automation object.

Errors

HTTP
When

400 invalid_request

Missing name/trigger/action, an unknown trigger.type/action.type, a missing/invalid cron on a schedule trigger, or a missing featureId on a run_load action.

404 not_found

No such project in this workspace.

Last updated

Was this helpful?