Schedules
4 endpoints at https://api.kosa8.com, sent with Authorization: Bearer $KOSA8_API_KEY. Generated from the API's own OpenAPI description, which a test holds to the router.
The sandbox's schedules, each with its last run#
GET
Parameters/v1/sandboxes/{id}/schedulesscope sandboxes:readidrequiredpath · stringSandbox id (sbx_…)
200401403404
curl -s -X GET https://api.kosa8.com/v1/sandboxes/$SBX/schedules \ -H "Authorization: Bearer $KOSA8_API_KEY"
Run a command in the sandbox on a cron schedule (UTC)#
POST
/v1/sandboxes/{id}/schedulesscope sandboxes:writeRun by the control plane's minute tick as a buffered exec (stopped at 90 s). A run that would wake the sandbox is held to the wake rules (payment, spending cap, running limit); one refused is recorded as skipped. At most 10 per sandbox.
Parametersidrequiredpath · stringSandbox id (sbx_…)
cronrequiredstring—
cmdrequiredarray of string—
envarray of stringNAME=value
namestringMax length 64.
wakebooleanWake the sandbox for a run due while it sleeps (default true); false skips that run
201400401403404409
curl -s -X POST https://api.kosa8.com/v1/sandboxes/$SBX/schedules \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json
Stop and remove a schedule#
DELETE
Parameters/v1/sandboxes/{id}/schedules/{sid}scope sandboxes:writeidrequiredpath · stringSandbox id (sbx_…)
sidrequiredpath · stringSchedule id (sch_…)
200401403404
curl -s -X DELETE https://api.kosa8.com/v1/sandboxes/$SBX/schedules/$SID \ -H "Authorization: Bearer $KOSA8_API_KEY"
Run a schedule now, under the same rules; its next time is unchanged#
POST
Parameters/v1/sandboxes/{id}/schedules/{sid}/runscope sandboxes:writeidrequiredpath · stringSandbox id (sbx_…)
sidrequiredpath · stringSchedule id (sch_…)
200401403404
curl -s -X POST https://api.kosa8.com/v1/sandboxes/$SBX/schedules/$SID/run \ -H "Authorization: Bearer $KOSA8_API_KEY"