Start a task or workflow and track it after the initiating request ends. Add a schedule for recurring work.
Steps
- Choose a task for one operation or a workflow for coordinated steps.
- Create the target definition.
- Create a schedule for recurring execution, or start a run for one-off work.
- Inspect run status, output and events.
Try it with REST
Create a task:
POST /projects/{project_reference}/tasks
curl -X POST https://api.veryfront.com/projects/support-assistant/tasks \
-H "Authorization: Bearer $VERYFRONT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"id": "daily-summary",
"name": "Daily summary",
"schedulable": true
}'Create a workflow:
POST /projects/{project_reference}/workflows
curl -X POST https://api.veryfront.com/projects/support-assistant/workflows \
-H "Authorization: Bearer $VERYFRONT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"id": "support-triage",
"description": "Classify new support requests and assign next steps.",
"schedulable": true
}'Create a recurring schedule for the task:
POST /projects/{project_reference}/schedules
curl -X POST https://api.veryfront.com/projects/support-assistant/schedules \
-H "Authorization: Bearer $VERYFRONT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Daily summary",
"target": {
"kind": "task",
"id": "daily-summary"
},
"schedule": "0 8 * * *",
"timezone": "Etc/UTC",
"concurrency_policy": "Forbid"
}'Start a one-off durable run. Set VERYFRONT_PROJECT_ID to the project's UUID first.
POST /runs
Use a new idempotency key for each logical run and reuse it when retrying that request.
RUN_IDEMPOTENCY_KEY="$(uuidgen)"
curl -X POST https://api.veryfront.com/runs \
-H "Authorization: Bearer $VERYFRONT_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $RUN_IDEMPOTENCY_KEY" \
-d "{
\"project_id\": \"$VERYFRONT_PROJECT_ID\",
\"target\": { \"type\": \"task\", \"id\": \"daily-summary\" }
}"Verify
Confirm the task and workflow appear in the project's lists and the schedule targets the intended definition. Inspect the run's final status and output. A failed or cancelled run is terminal, but the work has not succeeded.