Scheduled tasks
Create scheduled tasks, which start a recurring mission from a stored prompt and a schedule.
Query Parameters
Only the scheduled tasks of this project. A project that the caller cannot reach gives an empty list.
1 <= lengthResponse Body
application/json
application/json
curl -X GET "https://example.com/scheduled-tasks"{ "data": [ { "createdByUserId": "string", "id": "string", "orgId": "string", "projectId": "string", "name": "string", "prompt": "string", "templateKey": "string", "triggers": [ { "kind": "schedule", "schedule": { "interval": "daily", "time": "string", "timezone": "string", "weekday": "monday", "dayOfMonth": 1 } } ], "labels": [ "string" ], "skipIfPreviousOpen": true, "enabled": true, "nextRunAt": 0, "lastRunAt": 0, "createdAt": 0, "updatedAt": 0 } ], "nextCursor": "string"}Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/scheduled-tasks" \ -H "Content-Type: application/json" \ -d '{ "projectId": "string", "name": "string", "prompt": "string", "triggers": [ { "kind": "schedule", "schedule": { "interval": "daily", "time": "string", "timezone": "string" } } ] }'{ "createdByUserId": "string", "id": "string", "orgId": "string", "projectId": "string", "name": "string", "prompt": "string", "templateKey": "string", "triggers": [ { "kind": "schedule", "schedule": { "interval": "daily", "time": "string", "timezone": "string", "weekday": "monday", "dayOfMonth": 1 } } ], "labels": [ "string" ], "skipIfPreviousOpen": true, "enabled": true, "nextRunAt": 0, "lastRunAt": 0, "createdAt": 0, "updatedAt": 0}curl -X GET "https://example.com/scheduled-tasks/templates"{ "data": [ { "key": "string", "name": "string", "blurb": "string", "prompt": "string", "suggestedSchedule": { "interval": "daily", "time": "string", "timezone": "string", "weekday": "monday", "dayOfMonth": 1 } } ]}curl -X GET "https://example.com/scheduled-tasks/string"{ "createdByUserId": "string", "id": "string", "orgId": "string", "projectId": "string", "name": "string", "prompt": "string", "templateKey": "string", "triggers": [ { "kind": "schedule", "schedule": { "interval": "daily", "time": "string", "timezone": "string", "weekday": "monday", "dayOfMonth": 1 } } ], "labels": [ "string" ], "skipIfPreviousOpen": true, "enabled": true, "nextRunAt": 0, "lastRunAt": 0, "createdAt": 0, "updatedAt": 0}Path Parameters
1 <= lengthRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/scheduled-tasks/string" \ -H "Content-Type: application/json" \ -d '{}'{ "createdByUserId": "string", "id": "string", "orgId": "string", "projectId": "string", "name": "string", "prompt": "string", "templateKey": "string", "triggers": [ { "kind": "schedule", "schedule": { "interval": "daily", "time": "string", "timezone": "string", "weekday": "monday", "dayOfMonth": 1 } } ], "labels": [ "string" ], "skipIfPreviousOpen": true, "enabled": true, "nextRunAt": 0, "lastRunAt": 0, "createdAt": 0, "updatedAt": 0}Path Parameters
1 <= lengthResponse Body
application/json
application/json
application/json
curl -X DELETE "https://example.com/scheduled-tasks/string"{ "ok": true, "id": "string"}Path Parameters
1 <= lengthQuery Parameters
Runs on one page, 1 to 200 (default 50).
1 <= value <= 20050nextCursor from the previous page. Leave it out for the newest runs.
1 <= lengthResponse Body
application/json
application/json
application/json
curl -X GET "https://example.com/scheduled-tasks/string/runs"{ "data": [ { "billingActorUserId": "string", "id": "string", "scheduledTaskId": "string", "projectId": "string", "scheduledFor": 0, "kind": "scheduled", "status": "dispatching", "issueId": "string", "issueUrl": "string", "reason": "string", "lastError": "string", "createdAt": 0, "updatedAt": 0, "missionProgress": "string", "missionActivity": "string", "missionCostUsd": 0, "missionCostIncomplete": true, "missionTitle": "string" } ], "nextCursor": "string"}Path Parameters
1 <= lengthResponse Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/scheduled-tasks/string/run"{ "ok": true, "runId": "string", "issueId": "string", "status": "dispatching"}How is this page?