Skip to main content

Get schedule run

Retrieve one Schedule Run by ID.

GET /api/v1/forward/schedule_runs/{run_id} Returns a single Schedule Run execution record. identity_id may be provided as an additional ownership constraint. To retrieve the input selected for this Run, pass include_initial_events=true. This endpoint only allows a PAT or administrator SAT; an Identity-bound SAT cannot call it even when specifying its own identity_id.

Headers

HeaderRequiredDescription
AuthorizationYesBearer <PAT or administrator SAT>

Path parameters

ParameterTypeRequiredDescription
run_idstringYesSchedule Run ID.

Query parameters

ParameterTypeRequiredDefaultDescription
identity_idstringNo-Optional additional ownership constraint.
include_initial_eventsbooleanNofalseWhen true, returns the bound input snapshot for the current attempt when available.

Example request

curl -s -X GET 'https://api.qoder.com/api/v1/forward/schedule_runs/srun_019f00112233445566778899aabbccdd' \
  -H "Authorization: Bearer $QODER_ACCESS_TOKEN"

Example response

HTTP 200 OK
{
  "id": "srun_019f00112233445566778899aabbccdd",
  "source": "tool",
  "source_session_id": "sess_origin",
  "schedule_id": "sched_019f00112233445566778899aabbccdd",
  "identity_id": "idn_019eabc123",
  "template_id": "tmpl_support",
  "session_id": "sess_019ec55a68b37e1e8d660691af161ab4",
  "status": "completed",
  "trigger_context": {
    "type": "schedule",
    "scheduled_at": "2026-06-22T01:00:00Z"
  },
  "result_payload": "Today's technology highlights: ...",
  "push_sink": "im_channel",
  "push_status": "succeeded",
  "push_finished_at": "2026-06-22T01:00:21Z",
  "attempt": 2,
  "initial_events_version": 1,
  "triggered_at": "2026-06-22T01:00:00Z",
  "started_at": "2026-06-22T01:00:03Z",
  "completed_at": "2026-06-22T01:00:20Z",
  "duration_ms": 17000,
  "created_at": "2026-06-22T01:00:00Z"
}

Response fields

Returns the complete Schedule Run object. Trigger context and error types are also defined in the shared schemas.

Query input snapshot

curl -s 'https://api.qoder.com/api/v1/forward/schedule_runs/srun_019f00112233445566778899aabbccdd?include_initial_events=true' \
  -H "Authorization: Bearer $QODER_PAT"
When the input is bound and can be confirmed, the response additionally includes initial_events, as in this response excerpt:
{
  "attempt": 2,
  "initial_events_version": 1,
  "initial_events": [
    {
      "type": "user.message",
      "content": "Summarize today's technology highlights."
    }
  ]
}
  • initial_events is the bound input for the Run's current or final attempt, corresponding to initial_events_version. It is not the current Schedule configuration and does not list inputs for historical attempts.
  • If input is not yet bound, a historical record cannot be confirmed, or the binding is invalid, initial_events is omitted. It is not replaced with null, an empty array, or the current Schedule input.
  • A snapshot records the selected input; it does not prove that the runtime received it or executed successfully.
  • Omitting the parameter, passing false, or passing an empty value preserves the default response. Run lists, manual-run responses, and Webhooks do not include the full input.

Errors

HTTPTypeCodeTrigger
400invalid_request_errorinvalid_include_initial_eventsinclude_initial_events is not a valid boolean value.
404not_found_errorschedule_run_not_foundThe Run does not exist, does not belong to the current owner, or does not satisfy the identity_id constraint.
401authentication_error-The PAT or SAT is invalid or expired.
403permission_error-An Identity-bound SAT calls an endpoint that only allows a PAT or administrator SAT; message is admin service account token required, and the response does not include error.code.

Notes

  • error.type=concurrency_limit_reached means a run was recorded but skipped due to max_concurrent_runs.
  • Poll this endpoint until status enters a terminal state.