> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qoder.com/llms.txt
> Use this file to discover all available pages before exploring further.

# スケジュール実行を一覧表示する

> Schedule Run の実行レコードを一覧表示します。

`GET /api/v1/forward/schedule_runs`

Identity の Schedule Run を一覧表示します。`schedule_id` を渡すと、結果を 1 つの Schedule に絞り込めます。

## Headers

| Header          | Required | Description    |
| --------------- | -------- | -------------- |
| `Authorization` | Yes      | `Bearer <PAT>` |

## Query parameters

| Parameter      | Type    | Required | Default                      | Description                                                         |
| -------------- | ------- | -------- | ---------------------------- | ------------------------------------------------------------------- |
| `identity_id`  | string  | Yes      | 実行を所有する Forward Identity ID。 |                                                                     |
| `schedule_id`  | string  | No       | -                            | Schedule ID でフィルタリングします。                                            |
| `status`       | string  | No       | -                            | `pending`、`running`、`completed`、`failed`、または `skipped` でフィルタリングします。 |
| `trigger_type` | string  | No       | -                            | `schedule` または `manual` でフィルタリングします。                                |
| `has_error`    | boolean | No       | -                            | エラーの有無で実行をフィルタリングします。                                               |
| `limit`        | integer | No       | 20                           | 1 ページあたりの項目数。最大 100。                                                |
| `after_id`     | string  | No       | -                            | 指定した Run ID より後のレコードのカーソル。                                          |
| `before_id`    | string  | No       | -                            | 指定した Run ID より前のレコードのカーソル。                                          |

## Example request

```bash theme={null}
curl -s -X GET 'https://api.qoder.com/api/v1/forward/schedule_runs?identity_id=idn_019eabc123&schedule_id=sched_019f00112233445566778899aabbccdd&limit=20' \
  -H "Authorization: Bearer $QODER_PAT"
```

## Example response

**HTTP 200 OK**

```json theme={null}
{
  "data": [
    {
      "id": "srun_019f00112233445566778899aabbccdd",
      "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"
      },
      "error": null,
      "result_payload": "Today's technology highlights: ...",
      "push_sink": "im_channel",
      "push_status": "succeeded",
      "push_finished_at": "2026-06-22T01:00:21Z",
      "attempt": 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

| Field      | Type         | Description                  |
| ---------- | ------------ | ---------------------------- |
| `data`     | array        | 現在のページの Schedule Run オブジェクト。 |
| `first_id` | string\|null | このページの最初の実行の ID。             |
| `last_id`  | string\|null | このページの最後の実行の ID。             |
| `has_more` | boolean      | さらにレコードが残っているかどうか。           |

各 `data[]` 項目は Schedule Run オブジェクトで、`trigger_context`、`error`、`push_sink`、`push_status`、実行タイムスタンプを含む、Get Schedule Run で説明されているものと同じフィールドを持ちます。

## Errors

| HTTP | Type                    | Code                      | Trigger                     |
| ---- | ----------------------- | ------------------------- | --------------------------- |
| 400  | `invalid_request_error` | `invalid_identity`        | `identity_id` が欠落しているか無効です。 |
| 400  | `invalid_request_error` | `invalid_pagination`      | ページネーションパラメータが無効です。         |
| 401  | `authentication_error`  | `authentication_required` | PAT が無効または期限切れです。           |

## Notes

* Schedule Run は独立したリソースです。
* `completed`、`failed`、`skipped` は終了ステータスです。
* `push_status` は IM ストリーミング配信を表し、メインの実行 `status` とは独立しています。

## Related

<CardGroup cols={2}>
  <Card title="スケジュールを実行する" icon="play" href="/cloud-agents/api/forward/schedules/run" />

  <Card title="スケジュール実行を取得する" icon="file-lines" href="/cloud-agents/api/forward/schedule-runs/get" />
</CardGroup>
