temperDocs
Menu

API reference

Schedules

Recurring schedules and quotas registered by the Agent itself from inside the VM (the Agent's own scheduled tasks).

List an environment's recurring schedules

GET/v1/environments/{id}/schedules

Those registered by the Agent inside the VM (source = agent) and the developer's, sorted by source and key, not paginated. For one-time wakeups see /wakeups.

Responses

  • 200Schedules ScheduleList
  • 401Missing, invalid or revoked key
  • 404Does not exist, or does not belong to this developer (`no such resource`); for a nonexistent route `message` is `no such route`
  • 500Internal error (details are recorded only in server logs)

Cancel a schedule (including ones registered by the Agent)

DELETE/v1/environments/{id}/schedules/{schedule}

Records a schedule_cancelled event (by: developer). Returns 404 if already deleted.

Responses

  • 204Cancelled
  • 401Missing, invalid or revoked key
  • 404Does not exist, or does not belong to this developer (`no such resource`); for a nonexistent route `message` is `no such route`
  • 500Internal error (details are recorded only in server logs)

Update the Agent's self-scheduling quotas, or turn self-scheduling off

PATCH/v1/environments/{id}/agent

All fields are optional; omitted ones are left unchanged. Returns all quotas after the change (send {} to read the current values). After scheduling: false, any keep-awake the Agent currently holds ends immediately. Calls the developer makes through the API are not subject to these quotas. A destroyed environment returns 409 environment_destroyed.

Request body application/json · AgentSettingsPatch

FieldTypeDescription
schedulingboolean

false = the Agent cannot register schedules or keep-awake

max_schedulesinteger
min_interval_secsinteger
keep_awake_max_secsinteger
keep_awake_daily_secsinteger

Responses

  • 200Current quotas AgentSettings
  • 400Invalid parameters: validation failed, the body is not valid JSON, or the query string could not be parsed (all returned in the same JSON shape).
  • 401Missing, invalid or revoked key
  • 404Does not exist, or does not belong to this developer (`no such resource`); for a nonexistent route `message` is `no such route`
  • 409State conflict; `error` holds the specific code
  • 415Missing `Content-Type: application/json` (`unsupported_media_type`)
  • 422The JSON does not match the schema: a missing field, a wrong type or enum value, or an unknown field (`invalid_body`)
  • 500Internal error (details are recorded only in server logs)