Skip to main content

List schedule runs

List Schedule Run execution records.

GET /api/v1/forward/schedule_runs Lists Schedule Runs for an Identity. Pass schedule_id to narrow results to one Schedule. 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>

Query parameters

ParameterTypeRequiredDefaultDescription
identity_idstringYes-Forward Identity ID that owns the runs.
schedule_idstringNo-Filter by Schedule ID.
statusstringNo-Filter by pending, running, completed, failed, or skipped.
trigger_typestringNo-Filter by schedule or manual.
has_errorbooleanNo-Filter to runs with or without an error.
limitintegerNo20Items per page. Maximum 100.
after_idstringNo-Cursor for records after the given Run ID.
before_idstringNo-Cursor for records before the given Run ID.
sort_bystringNocreated_atSort field: created_at or triggered_at.
orderstringNodescSort direction: asc or desc.

Example request

curl -s -X GET 'https://api.qoder.com/api/v1/forward/schedule_runs?identity_id=idn_019eabc123&sort_by=triggered_at&order=desc&limit=20' \
  -H "Authorization: Bearer $QODER_ACCESS_TOKEN"

Example response

HTTP 200 OK
{
  "data": [
    {
      "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"
    }
  ],
  "first_id": "srun_019f00112233445566778899aabbccdd",
  "last_id": "srun_019f00112233445566778899aabbccdd",
  "has_more": false
}

Response fields

FieldTypeDescription
dataArray of Schedule Run objectRecords on the current page.
first_idstring|nullID of the first run on this page.
last_idstring|nullID of the last run on this page.
has_morebooleanWhether more records remain.

Errors

HTTPTypeCodeTrigger
400invalid_request_errorinvalid_identityidentity_id is missing or empty.
400invalid_request_errorinvalid_requeststatus, trigger_type, sort_by, or order is invalid, both after_id and before_id are supplied, or a string such as identity_id, schedule_id, or a cursor contains unsupported control characters.
400invalid_request_errorinvalid_has_errorhas_error cannot be parsed as a boolean.
400invalid_request_errorinvalid_limitlimit is outside 1–100 or is not an integer.
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

  • Schedule Runs are independent resources.
  • By default, results are sorted by (created_at, run_id) in descending order. With sort_by=triggered_at, results use (triggered_at, run_id) as a stable sort key.
  • Do not supply after_id and before_id together. Cursors are interpreted under the current sort_by and order; restart pagination when changing the sort.
  • For v1 compatibility, a non-empty cursor without control characters that cannot be found under the current owner or Identity is ignored and the first page for the current filters and sort is returned. Do not depend on this fallback. Replay only first_id or last_id returned for the same owner or Identity, sort_by, and order.
  • completed, failed, and skipped are terminal statuses.
  • push_status describes IM streaming delivery and is independent from the main run status.