---
title: Table query engine · Tallyfy Pro
description: Tallyfy's table query engine lets you sort, filter, search, group, count and page through the tasks, processes and templates you can see, read a full description or form field values on demand, and export the same rows to a CSV or XLSX file.
lastUpdated: 2026-12-03T00:00:00.000Z
source_url:
  html: https://tallyfy.com/products/pro/integrations/open-api/table-query-engine/
  md: https://tallyfy.com/products/pro/integrations/open-api/table-query-engine/index.md
---

## How do I read tasks, processes and templates as table rows?

The table query engine reads tasks, processes and templates the way a table shows them. You send one JSON body that names the columns you want, a filter, a sort and a page size. You get back lean rows that carry only those columns, a cursor for the next page, and a count when you ask for one.

The same body can also group the rows or export them to a CSV or XLSX file. Every answer holds only what you’re allowed to see in that organization.

## Which endpoints are there?

Every path below starts with `https://go.tallyfy.com/api/organizations/{org_id}/`. In the API, processes are `runs` and templates are `checklists`.

| Method and path | What it does |
| - | - |
| `GET tasks/query/columns` | Lists every task column and what it accepts |
| `POST tasks/query` | Returns one page of task rows, or one page of groups |
| `POST tasks/query/values` | Lists the values one column holds, with a count for each |
| `GET tasks/query/{task_id}/description` | Returns one task’s full description |
| `GET tasks/query/{task_id}/fields` | Returns one task’s form fields and their values |
| `POST tasks/query/export` | Exports the matching tasks as CSV or XLSX |
| `GET tasks/query/exports/{export_id}` | Returns a background export’s status |
| `GET tasks/query/exports/{export_id}/download` | Downloads a finished background export |

Processes have the same eight routes under `runs/query`. Templates have six of them under `checklists/query`, with no `values` or `fields` route, plus `GET checklists/query/{template_id}/starred-by`, which lists who else starred a template.

### Required headers

```text
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
X-Tallyfy-Client: APIClient
Content-Type: application/json
```

Send `Content-Type` with every `POST`. Replace `{org_id}` with your [organization ID](https://tallyfy.com/products/pro/miscellaneous/how-to-find-your-tallyfy-ids/). [Get & use a personal access token](https://tallyfy.com/products/pro/integrations/open-api/code-samples/authentication/personal-access-token/) shows where the token comes from.

## What goes in a query body?

Only `v` is required.

* `v` is the contract version, and it must be `1`.
* `columns` lists the columns you want. Each row also carries its `id`. Leave it out to get the catalog’s `default_columns`.
* `filter` is a tree of conditions, described below.
* `sort` lists up to 5 keys, each `{"column": ..., "dir": ...}`, where `dir` is `asc` or `desc`. The `id` is always added as the last key, so the order never ties. Empty values sort last in both directions. Leave it out to get the catalog’s `default_sort`.
* `search` is free text of up to 200 characters.
* `group_by` and `group_keys` group the rows, as the grouping section below explains.
* `cursor` is the `nextCursor` from the previous page.
* `page_size` is 1 to 100. The default is 50.
* `count` is `none`, `exact` or `estimate`. The default is `none`.
* `timezone` is an IANA time zone, such as `America/Chicago`. Whole-day date values are read in it, and the default is `UTC`.

Nothing is ignored. An unknown key at any level, an unknown column or operator, a wrong value, or anything over a limit gets a `422` that names the exact place in your body, such as `filter.filters[2].column`.

### How do I write a filter?

A condition is `{"column": ..., "operator": ..., "value": ...}`. A group is `{"logic": "and", "filters": [...]}`, where `logic` is `and`, `or` or `not`. A `not` group takes exactly one filter, an `or` group needs at least one, and an empty `and` group matches everything. A filter may nest 6 groups deep and hold 50 conditions.

Which operators a column takes usually depends on its type:

* Text: `eq`, `neq`, `contains`, `not_contains`, `starts_with`, `is_empty`, `is_not_empty`
* Number and date: `eq`, `neq`, `lt`, `lte`, `gt`, `gte`, `between`
* Enum and id: `eq`, `neq`, `in`, `not_in`
* Boolean: `eq`
* Assignee: `eq`, `neq`, `in`, `not_in`, `is_empty`, `is_not_empty`

A number, date, enum or id column takes `is_empty` and `is_not_empty` too when it can be empty. `between` takes a pair of values, `in` and `not_in` take a list of up to 100, and `is_empty` and `is_not_empty` take none. A text value can be up to 500 characters.

These are the usual sets, and a few columns differ. The task column `mentioned` takes only `eq`, and `step` takes only `eq` and `in`. A multiselect form field column also takes `in`. The `operators` list for each column in the catalog is the final word, and any other operator gets a `422` with the code `QUERY_UNKNOWN_OPERATOR`.

Two kinds of value are worked out when the query runs. A column whose catalog entry has `accepts_me` set takes `"me"`, which means you. A date column takes `"now"`, `"today"`, `"today+7"` or `"today-30"`, counted in the request’s time zone, up to 36,500 days either way.

### What does search match?

Search is always combined with the filter. It matches:

* For tasks, the searchable columns, the task id and a reference such as `task-123`
* For processes, the process name, the template name, the process id and a reference such as `process-123`
* For templates, the template title, the template id and a reference such as `template-123`

### How do I read archived items?

Rows leave archived items out. Add the condition `{"column": "archived", "operator": "eq", "value": true}` to read the archived ones instead. It has to be a condition every row must meet: the whole filter, or a condition inside `and` groups only.

## Which columns can I use?

Ask the catalog. It lists every column with its type, whether it can be empty, whether you can sort, filter, group or search on it, and its operators. An enum column also lists its allowed values.

```bash
curl "https://go.tallyfy.com/api/organizations/{org_id}/tasks/query/columns" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Accept: application/json" \
  -H "X-Tallyfy-Client: APIClient"
```

This answer is shortened to one column. The real one lists every column.

```json
{
  "v": 1,
  "dataset": "tasks",
  "columns": [
    {
      "name": "deadline",
      "type": "date",
      "nullable": true,
      "sortable": true,
      "filterable": true,
      "groupable": false,
      "distinct_values": false,
      "group_counts_overlap": false,
      "searchable": false,
      "operators": ["eq", "neq", "lt", "lte", "gt", "gte", "between", "is_empty", "is_not_empty"],
      "accepts_me": false
    }
  ],
  "default_columns": ["title", "status", "deadline", "assignees", "process"],
  "default_sort": [{ "column": "deadline", "dir": "asc" }],
  "tie_breaker": "id",
  "null_order": { "asc": "last", "desc": "last" },
  "count_modes": ["none", "exact", "estimate"],
  "relative_dates": ["now", "today", "today+<days>", "today-<days>"],
  "limits": {
    "page_size_default": 50,
    "page_size_max": 100,
    "filter_depth_max": 6,
    "filter_leaves_max": 50,
    "list_values_max": 100,
    "sort_keys_max": 5,
    "search_length_max": 200,
    "text_value_length_max": 500,
    "group_by_max": 3,
    "relative_days_max": 36500
  }
}
```

The task and process catalogs also carry `form_fields`. A form field is a column too, named `field:<timeline_id>`, and it sorts and filters as text, a number or a date. Templates have no form field columns.

## What does a lean row look like?

A row carries its `id` and the columns you asked for, and nothing else. Text such as a description comes as a short plain-text preview of about 140 characters, never HTML. A reference, such as a process, comes as `{"id": ..., "label": ...}`. Assignees come as a list of those, with ids such as `user:12`, `group:<id>` or `guest:7`. Form fields, comments and problems come as counts. Dates are ISO 8601 in UTC.

This request asks for open tasks due before the day a week from today, overdue ones included, soonest first, one row at a time:

```bash
curl -X POST "https://go.tallyfy.com/api/organizations/{org_id}/tasks/query" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Accept: application/json" \
  -H "X-Tallyfy-Client: APIClient" \
  -H "Content-Type: application/json" \
  -d '{
    "v": 1,
    "columns": ["title", "status", "deadline", "assignees", "process", "description", "fields_count", "comments_count"],
    "filter": {
      "logic": "and",
      "filters": [
        { "column": "status", "operator": "in", "value": ["not-started", "in-progress"] },
        { "column": "deadline", "operator": "lt", "value": "today+7" }
      ]
    },
    "sort": [{ "column": "deadline", "dir": "asc" }],
    "page_size": 1,
    "count": "exact",
    "timezone": "America/Chicago"
  }'
```

```json
{
  "v": 1,
  "data": [
    {
      "id": "3f2c8a17e0b94d6a9c51b7e2d4a8f603",
      "title": "Review the signed contract",
      "status": "in-progress",
      "deadline": "2026-12-10T17:00:00Z",
      "assignees": [
        { "id": "user:12", "label": "Jane Doe" },
        { "id": "group:a2d6f9c3e7b14d58b9e0c3f6a2d7b419", "label": "Legal team" }
      ],
      "process": { "id": "9b41d7c2a6e84f1db3c05e7a2f9d6c18", "label": "Onboarding Acme" },
      "description": "Check that both parties signed and that the start date matches the offer letter.",
      "fields_count": 2,
      "comments_count": 1
    }
  ],
  "meta": {
    "pageSize": 1,
    "hasMore": true,
    "nextCursor": "eyJ2IjoxLCJrIjpbXX0.c2lnbmVkLWN1cnNvcg",
    "count": 14,
    "countIsEstimate": false,
    "countIsAtLeast": false,
    "sort": [
      { "column": "deadline", "dir": "asc" },
      { "column": "id", "dir": "asc" }
    ]
  }
}
```

A process row works the same way. Its `template` and `owner` are `{"id": ..., "label": ...}`, and its progress is two numbers, `progress_complete` and `progress_total`. A template row’s `id` is the template’s timeline id, and its steps, kickoff fields and processes come as counts.

## How do I get a full description or form field values?

Rows leave these out on purpose. Ask for them one item at a time when you need them. Each answer carries `v` and the item’s `id`.

A description is the full rich text, as HTML, the same as the item’s own screen shows it. It’s `null` when the item has none. A task’s description has its variables filled in.

Fields come in the order the item’s screen lists them. Each field’s `id` is its timeline id. `value` is what was entered, or `null` when nothing was. For a table field, `columns` holds the table’s column definitions, which you need to read its value.

### Tasks

`GET tasks/query/{task_id}/description`

```json
{
  "v": 1,
  "id": "3f2c8a17e0b94d6a9c51b7e2d4a8f603",
  "description": "<p>Check that both parties signed and that the start date matches the offer letter.</p>"
}
```

`GET tasks/query/{task_id}/fields` returns the task’s step fields, or a one-off task’s own fields.

```json
{
  "v": 1,
  "id": "3f2c8a17e0b94d6a9c51b7e2d4a8f603",
  "fields": [
    {
      "id": "e5a1c9d7f3b24e68a0c4b2d6f8e1a937",
      "label": "Signed by",
      "field_type": "text",
      "position": 1,
      "required": true,
      "columns": null,
      "value": "Jane Doe"
    },
    {
      "id": "f8b3d1a6c2e94a57b0d3e6c9a1f4b285",
      "label": "Notes for legal",
      "field_type": "textarea",
      "position": 2,
      "required": false,
      "columns": null,
      "value": null
    }
  ]
}
```

### Processes

`GET runs/query/{process_id}/description`

```json
{
  "v": 1,
  "id": "9b41d7c2a6e84f1db3c05e7a2f9d6c18",
  "description": "<p>New client onboarding for Acme.</p>"
}
```

`GET runs/query/{process_id}/fields` returns the process’s kickoff fields.

```json
{
  "v": 1,
  "id": "9b41d7c2a6e84f1db3c05e7a2f9d6c18",
  "fields": [
    {
      "id": "b6d0f3a8c1e54b79a2c6d9f1b4e7a058",
      "label": "Client name",
      "field_type": "text",
      "position": 1,
      "required": true,
      "columns": null,
      "value": "Acme"
    }
  ]
}
```

### Templates

`GET checklists/query/{template_id}/description`

```json
{
  "v": 1,
  "id": "c7e2a9f4b1d84c36a5e0f2b7d9c3a618",
  "description": "<p>Every step for bringing on a new client.</p>"
}
```

`GET checklists/query/{template_id}/starred-by` lists the other members who starred the template, by name. It never lists you, a guest or a webhook. A member with no name is labeled by email.

```json
{
  "v": 1,
  "id": "c7e2a9f4b1d84c36a5e0f2b7d9c3a618",
  "members": [
    { "id": "12", "label": "Jane Doe" }
  ]
}
```

### What does a 404 mean here?

You get an item exactly when your own query could list it as a row, archived items included. Anything else gets the same `404` with the code `RESOURCE_NOT_FOUND`. That covers an id that never existed, a deleted item, and an item you can’t see. So a `404` never tells you whether a hidden item exists.

```json
{
  "type": "urn:tallyfy:problem:resource-not-found",
  "title": "Not found",
  "status": 404,
  "detail": "There is no such item, or you cannot see it.",
  "code": "RESOURCE_NOT_FOUND",
  "path": "id",
  "request_id": "8c3f2a1b9d7e6f50-ORD"
}
```

## How do I page through results?

Send the same body again with `cursor` set to the last answer’s `meta.nextCursor`. Keep going while `meta.hasMore` is `true`. On the last page, `nextCursor` is `null`.

```json
{
  "v": 1,
  "columns": ["title", "status", "deadline"],
  "filter": { "column": "status", "operator": "in", "value": ["not-started", "in-progress"] },
  "sort": [{ "column": "deadline", "dir": "asc" }],
  "cursor": "eyJ2IjoxLCJrIjpbXX0.c2lnbmVkLWN1cnNvcg"
}
```

A cursor only works with the same filter, sort, search and grouping it came from. You can change `columns` and `page_size` between pages. A cursor that was changed, or that belongs to another query, gets a `422` with the code `QUERY_BAD_CURSOR`, and you start again from the first page.

## How do I count rows?

Set `count` to `exact`. The answer’s `meta.count` is then the number of rows that match. Leave `count` at `none` on the request that fetches the first page, and ask for the count in a second request at the same time, so the page never waits for it.

Both `exact` and `estimate` try a true count first. When that takes too long:

* An administrator gets an estimate, and `meta.countIsEstimate` is `true`. It can be above or below the real number.
* Anyone else gets a count that stops at 10,000. When it reaches 10,000, `meta.countIsAtLeast` is `true`, so show it as 10,000+.
* If even that takes too long, `meta.count` is `null`.

With `count` at `none`, `meta.count` and both flags are `null`. A count only ever counts rows you can see.

## How do I group rows?

Name 1 to 3 columns in `group_by`, outermost first. The catalog marks which columns are `groupable`. No template column can be grouped yet.

With no `group_keys`, the answer is one page of groups, each with a `key`, a `label` and a `count`:

```json
{
  "v": 1,
  "group_by": ["status"],
  "count": "exact"
}
```

```json
{
  "v": 1,
  "data": [
    { "key": "completed", "label": "completed", "count": 120 },
    { "key": "in-progress", "label": "in-progress", "count": 31 },
    { "key": "not-started", "label": "not-started", "count": 54 }
  ],
  "meta": {
    "pageSize": 50,
    "hasMore": false,
    "nextCursor": null,
    "count": 3,
    "countIsEstimate": false,
    "countIsAtLeast": false,
    "sort": [
      { "column": "deadline", "dir": "asc" },
      { "column": "id", "dir": "asc" }
    ],
    "groupBy": ["status"],
    "groupKeys": [],
    "groupLevel": 0,
    "groupColumn": "status"
  }
}
```

In a page of groups, `meta.count` is the number of groups at that level, not the number of rows.

To open a group, send its `key` back in `group_keys`. With one key per `group_by` column, the answer is the rows of that group, paged like any query. With fewer keys than columns, it’s the next level’s groups. A `null` key opens the group of rows with no value.

```json
{
  "v": 1,
  "columns": ["title", "status"],
  "group_by": ["status"],
  "group_keys": ["in-progress"],
  "page_size": 25
}
```

A task with several assignees, tags or folders sits in the group of each one, so a level’s counts can add up to more than the tasks. The catalog marks such a column `group_counts_overlap`.

### How do I list a column’s values?

`POST tasks/query/values` and `POST runs/query/values` list the values one column holds, each with how many of your rows carry it. The catalog marks the columns that have them `distinct_values`. You can add a `filter`, a `search` on the label, a `cursor` and a `page_size`.

```json
{
  "v": 1,
  "column": "status"
}
```

```json
{
  "v": 1,
  "data": [
    { "value": "completed", "label": "completed", "count": 120 },
    { "value": "in-progress", "label": "in-progress", "count": 31 },
    { "value": "not-started", "label": "not-started", "count": 54 }
  ],
  "meta": {
    "column": "status",
    "pageSize": 50,
    "hasMore": false,
    "nextCursor": null
  }
}
```

## How do I export rows to a file?

Send an export body to `POST tasks/query/export`, `POST runs/query/export` or `POST checklists/query/export`. It’s the query body without `cursor`, `page_size`, `count`, `group_by` or `group_keys`, because an export always holds every matching row in one flat list. It adds these keys:

* `format` is `csv` or `xlsx`, and it’s required.
* `all_columns` set to `true` exports every column in catalog order.
* `labels` sets the header for each column, such as `{"deadline": "Due"}`, up to 200 characters each.
* `file_name` names the file, up to 100 characters. It becomes lower case words joined by hyphens, plus the date, such as `open-tasks-2026-12-03.csv`.
* `background` set to `true` builds the file in the background even when it’s small.

```json
{
  "v": 1,
  "format": "csv",
  "columns": ["title", "status", "deadline", "assignees"],
  "filter": { "column": "status", "operator": "in", "value": ["not-started", "in-progress"] },
  "sort": [{ "column": "deadline", "dir": "asc" }],
  "file_name": "Open tasks",
  "timezone": "America/Chicago"
}
```

What you get back depends on how many rows match:

* Up to 10,000 rows, the file comes straight back with `200`. Its `X-Export-Row-Count` header says how many rows it holds.
* Up to 50,000 rows, or with `background` set, you get `202` and the export’s status. The `Location` header is the status path.
* More than 50,000 rows gets a `422` with the code `EXPORT_TOO_LARGE`. Filter further and try again.

```json
{
  "data": {
    "id": "4c8e2a6f0b3d4e7a9c1f5b8d2e6a0c39",
    "dataset": "tasks",
    "format": "csv",
    "status": "queued",
    "row_count": 23410,
    "rows_written": null,
    "file_name": "open-tasks-2026-12-03.csv",
    "file_size": null,
    "created_at": "2026-12-03T18:30:00Z",
    "started_at": null,
    "completed_at": null,
    "expires_at": null,
    "download_url": null,
    "error": null
  }
}
```

Ask `GET tasks/query/exports/{export_id}` until `status` is `completed`, then download the file from `download_url`. The status is `queued`, `running`, `completed`, `failed` or `expired`. Tallyfy also sends you an in-app notification when the file is ready or has failed, and no email.

`download_url` and the `Location` header are API paths that start with `/organizations/`. Put `https://go.tallyfy.com/api` in front, and send the same headers as any other request.

The download gets `409` with `EXPORT_NOT_READY` until the export has finished, and `410` with `EXPORT_EXPIRED` once the file is gone. A file is kept for 7 days. Only the member who asked for an export can see or download it, and anyone else gets `404`.

A task or process export writes each cell as the tasks or processes page shows it: statuses in words, Yes or No for a flag, and dates to the minute in the request’s time zone. A CSV file is UTF-8 with a byte order mark, so Excel reads accented names correctly. Text that a spreadsheet would run as a formula gets a leading apostrophe in a CSV file. An XLSX file keeps that text as it is and marks the cell as plain text, so it never runs.

## Which rows can I see?

The engine shows you only the items you’re allowed to see, in one organization only.

* Tasks: an administrator sees every task, top secret ones included. Anyone else sees a top secret task only when it’s assigned to them, directly or through a group. A task in a process shows only when you can see that process: you own or started it, you or your group has read access, the process has no read limits set, or you’re assigned one of its tasks that wasn’t auto-skipped. That’s stricter than `GET tasks`, which doesn’t check process access, so the engine can show you fewer tasks.
* Processes: the processes you’d see when you list processes.
* Templates: the templates you’d see when you list templates, without archived and system templates unless you ask for archived ones.

A guest sees only the tasks assigned to them, through `POST guests/{guest_code}/tasks/query` and its catalog at `GET guests/{guest_code}/tasks/query/columns`. The guest code in the path is the only credential. Guest rows leave out member-only columns such as `archived`, `template`, `folder` and `tags`, and guests have no description, fields, values or export routes.

Groups, counts and values only ever come from rows you can see, so none of them can reveal a hidden item.

## What does an error look like?

The engine’s errors are problem documents, sent as `application/problem+json`. `code` is the stable value to check in your code. `path` says where in your body the problem is. `data`, when it’s there, adds detail, such as the operators a column does allow. Quote `request_id` when you contact Tallyfy support.

This body names a column that doesn’t exist:

```json
{
  "v": 1,
  "filter": { "column": "nonsense", "operator": "eq", "value": "x" }
}
```

```json
{
  "type": "urn:tallyfy:problem:query-unknown-column",
  "title": "Unknown column",
  "status": 422,
  "detail": "There is no column 'nonsense'.",
  "code": "QUERY_UNKNOWN_COLUMN",
  "path": "filter.column",
  "request_id": "8c3f2a1b9d7e6f50-ORD"
}
```

| Code | Status | What it means |
| - | - | - |
| `QUERY_UNSUPPORTED_VERSION` | 422 | `v` is missing or isn’t `1` |
| `QUERY_UNKNOWN_FIELD` | 422 | A key the body doesn’t define, at any level |
| `QUERY_UNKNOWN_COLUMN` | 422 | A column the dataset doesn’t have |
| `QUERY_COLUMN_NOT_ALLOWED` | 422 | A real column, used to sort, filter or group when the catalog says it can’t be |
| `QUERY_UNKNOWN_OPERATOR` | 422 | An operator that doesn’t exist, or doesn’t fit the column |
| `QUERY_BAD_VALUE` | 422 | A value of the wrong type or shape, or out of range |
| `QUERY_TOO_COMPLEX` | 422 | Too deep, or too many conditions, sort keys or list values |
| `QUERY_BAD_CURSOR` | 422 | A cursor that was changed, or that belongs to another query |
| `RESOURCE_NOT_FOUND` | 404 | No item or export you can see has this id |
| `EXPORT_TOO_LARGE` | 422 | More than 50,000 rows match the export |
| `EXPORT_NOT_READY` | 409 | The background export hasn’t finished, or it failed |
| `EXPORT_EXPIRED` | 410 | The export’s file is gone |

A missing or wrong token gets `401`, and a caller who isn’t an active member of the organization gets `403`. Those two come before the engine runs, so they use the API’s usual error format, not a problem document.

## Which other lists can I query this way?

These routes take the same kind of body. Each has a `columns` route beside it that lists what it accepts.

* `POST users/query` for members
* `POST guests/query` for guests
* `POST groups/query` for groups
* `POST tags/query` for tags
* `POST assets/query` for files
* `POST checklists/{template_id}/steps/query` for one template’s steps
* `POST system-log/query`, `POST email-log/query` and `POST ai-log/query` for the organization’s logs, for administrators only

## Related articles

[**Analytics > CSV file structure**](https://tallyfy.com/products/pro/integrations/analytics/how-is-the-csv-file-structured-in-tallyfy/)

Tallyfy’s CSV export flattens a running process into a 49-column spreadsheet. Each row…

[**Processes > Export process to CSV**](https://tallyfy.com/products/pro/tracking-and-tasks/processes/how-can-i-export-tallyfy-processes-to-csv/)

Tallyfy lets you export any running process to a 49-column CSV file with tasks, form answers…

[**Tasks > List organization tasks**](https://tallyfy.com/products/pro/integrations/open-api/code-samples/tasks/list-org-tasks/)

Retrieve and filter all tasks across your organization, including process-based and one-off…

[**Tasks > List process tasks**](https://tallyfy.com/products/pro/integrations/open-api/code-samples/tasks/list-process-tasks/)

Retrieve all tasks for a specific process run through Tallyfy’s API. Filter by status, deadline…
