# listScheduledTasks

Every scheduled task in your organization (yours first, then teammates', newest first), each a chat that runs Ask Goliath on a schedule as its owner: title, `status` (ACTIVE, PAUSED, PAUSED_ERRORS after repeated failures, EXHAUSTED when finished), `cadence` (ONE_OFF or RECURRING), `schedule` in words, `nextRunAt`, `lastRunAt`, `runCount`, owner, tags, and `canEdit`. Narrow by `ownerUserId`, `tag`, `statuses` or `cadence`. getScheduledTask reads one with its instruction.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "listScheduledTasks", "variables": {...} }`
- Scope: `READ`
- Type: query
- Idempotency: a read; rejects `Idempotency-Key`
- Rate-limited: no

## Variables

- `ownerUserId`: `ID`
- `tag`: `String`
- `statuses`: `[ScheduledTaskStatus!]` (one of `ACTIVE`, `PAUSED`, `PAUSED_ERRORS`, `EXHAUSTED`)
- `cadence`: `ScheduledTaskCadence` (one of `ONE_OFF`, `RECURRING`)

## Response (data, an example)

```json
{
  "scheduledTaskQuery": {
    "scheduledTasks": [
      {
        "id": "<ID>",
        "title": "…",
        "status": "ACTIVE",
        "cadence": "ONE_OFF",
        "schedule": "…",
        "nextRunAt": "2026-01-01T00:00:00.000Z",
        "lastRunAt": "2026-01-01T00:00:00.000Z",
        "runCount": 0,
        "ownerUserId": "<ID>",
        "ownerName": "…",
        "tags": [
          "…"
        ],
        "mine": true,
        "canEdit": true,
        "running": true
      }
    ]
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "operationId": "listScheduledTasks",
    "variables": {}
  }'
```
