Skip to main content

create_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
ParameterInTypeRequiredDescription
projectpathstringyesThe project's public id.
namebodystringyesA name for the automation.
enabledbodybooleannoWhether it is active (default true).
triggerbodyobjectyes{ type: "schedule", cron, tz? } or { type: "event", kind?, filter? }.
actionbodyobjectyes{ type: "run_features", featureIds?, configName?, siteUrl? } or { type: "run_load", featureId, siteUrl? }.
conditionbodyobjectnoOptional gate, e.g. { "status": "failed" } (event triggers).
info

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"

Response

201 Created — the created automation object.

Errors

HTTPWhen
400 invalid_requestMissing 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_foundNo such project in this workspace.