---
title: "List tasks with filters"
method: GET
path: "/api/tasks"
tags: ["Tasks"]
---

# List tasks with filters

`GET /api/tasks`

Returns tasks with the full `task` text replaced by a bounded `taskPreview` and completion/integration blobs dropped by default — list views only need the preview. Pass `fields=full` to restore the full `AgentTask`. Fetch a single task in full via `GET /api/tasks/{id}`.

## Query parameters

- `status` string
- `agentId` string
- `scheduleId` string
- `key` string — Non-unique asset directory namespace (for example shared/ or personal/<user-id>/drafts/). Runtime write boundaries normalize and validate the canonical form.
- `keyPrefix` string — Non-unique asset directory namespace (for example shared/ or personal/<user-id>/drafts/). Runtime write boundaries normalize and validate the canonical form.
- `search` string
- `includeHeartbeat` 'true' | 'false'
- `createdAfter` string, date-time
- `createdBefore` string, date-time
- `source` string
- `requestedByUserId` string
- `orderBy` 'lastUpdatedAt' | 'createdAt'
- `limit` integer, nullable
- `offset` integer, nullable
- `fields` 'full' | 'slim'

## Response `200`

Paginated task list

## Other responses

- `400` — Validation error (e.g. unknown status token)

## Changes

- **2026-08-03** `bd94290478fb` — 1 info
  - added the new optional `query` request parameter `requestedByUserId`
- **2026-07-11** `f1022d5edb0d` — 2 info
  - added the new optional `query` request parameter `key`
  - added the new optional `query` request parameter `keyPrefix`
- **2026-07-09** `d12af41bc255` — 2 info
  - added the new optional `query` request parameter `createdBefore`
  - added the new optional `query` request parameter `orderBy`
- **2026-07-02** `0c910612f9ac` — 4 warning
  - deleted the `query` request parameter `createdBefore`
  - deleted the `query` request parameter `key`
  - deleted the `query` request parameter `keyPrefix`
  - deleted the `query` request parameter `orderBy`

[Change history](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/changes/api/tasks/get.md)

---

[API](https://skmtc.dev/desplega-ai/apis/agent-swarm-api.md) · [All operations](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/desplega-ai/agent-swarm-api/revisions/92a1dcbd2fc7/schema)
