Skip to main content
POST
Query tasks from a Workstation (App) with powerful filtering capabilities. This endpoint allows you to filter by metadata (status, dates, tags) and by extracted data fields using MongoDB-style operators.

Basic Query

Query with Metadata Filters

Filter tasks by status, creation date, approval date, tags, and more.

Query by Extracted Data (outputQuery)

The most powerful feature is filtering by the data extracted from your documents. Use MongoDB-style operators to query any field in your task’s output.

Simple Equality

Comparison Operators

Querying Nested Arrays with $elemMatch

When your extracted data contains arrays (e.g., line items, categories, participants), use $elemMatch to query elements within those arrays.
$elemMatch supports nesting, so you can query deeply nested structures like categories[].items[].price.

More $elemMatch Examples

Select Specific Fields

Reduce response size by selecting only the fields you need from the extracted data.

Pagination

Use limit and offset for paginating through large result sets.

Request Body

Filters Object

Output Query Operators

Type Inference

The system automatically infers data types from values: Use $type to override when needed:

Response

Response Fields


Error Responses

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Provide exactly one of promptApplicationId or agentId.

promptApplicationId
string<uuid>
required

Workstation/App ID to query tasks from.

filters
Metadata filters · object
outputQuery
Output query · object

Map of field name → primitive value (equality; null is accepted) or operator object.

select
string[]

Fields to return from outputContent.content. If empty or omitted, the full outputContent is returned.

limit
integer
default:50
Required range: 1 <= x <= 100
offset
integer
default:0
Required range: x >= 0
orderBy
enum<string>
default:createdAt
Available options:
createdAt,
updatedAt,
approvedAt,
name
order
enum<string>
default:desc
Available options:
asc,
desc

Response

Matching tasks

data
object[]
required
meta
Pagination metadata · object
required

Pagination metadata. Links are always returned as objects ({ limit, offset }) for this endpoint.