Skip to content

Search API

All list operations in Authpipe use a unified search pattern via POST /search endpoints. This provides filtering, sorting, cursor-based pagination, and full-text search across all resource types.

EndpointResource
POST /api/providers/searchProvider catalog (includes custom providers)
POST /api/provider-configs/searchProvider configs
POST /api/installations/searchInstallations
POST /api/connections/searchConnections
POST /api/events/searchEvents
{
"filter": {
"tenant_id": { "eq": "org_acme" },
"status": { "in": ["active", "needs_reauth"] }
},
"sort": [
{ "field": "created_at", "direction": "desc" }
],
"query": "search text",
"cursor": "cursor_token",
"limit": 25,
"fields": ["id", "status", "tenant_id"]
}

All fields are optional. An empty request body returns the first page of results with default sorting.

OperatorDescriptionExample
eqEquals{ "status": { "eq": "active" } }
neqNot equals{ "status": { "neq": "revoked" } }
inIn list{ "status": { "in": ["active", "needs_reauth"] } }
gtGreater than{ "created_at": { "gt": "2026-01-01T00:00:00Z" } }
gteGreater than or equal{ "created_at": { "gte": "2026-01-01T00:00:00Z" } }
ltLess than{ "created_at": { "lt": "2026-12-31T23:59:59Z" } }
lteLess than or equal{ "created_at": { "lte": "2026-12-31T23:59:59Z" } }

Multiple filters are combined with AND logic.

Sort by one or more fields with asc or desc direction:

{
"sort": [
{ "field": "created_at", "direction": "desc" },
{ "field": "name", "direction": "asc" }
]
}

Default direction is asc if omitted.

Authpipe uses cursor-based pagination for consistent results across pages.

{
"data": [...],
"has_more": true,
"next_cursor": "eyJpZCI6Ijk5OSJ9",
"limit": 25
}
let cursor: string | undefined;
do {
const resp = await authpipe.searchConnections({
filter: { tenant_id: { eq: "org_acme" } },
limit: 100,
cursor,
});
for (const conn of resp.data) {
console.log(conn.id, conn.status);
}
cursor = resp.next_cursor;
} while (cursor);

The query parameter performs full-text search. Available on provider search — matches against names, descriptions, and tags with relevance ranking.

const resp = await authpipe.searchProviders({
query: "email marketing",
limit: 10,
});

Use fields to return only specific fields, reducing response size:

{
"fields": ["id", "status", "tenant_id"],
"limit": 100
}

For simple use cases, offset-based pagination is also supported:

{
"offset": 50,
"limit": 25
}

Cursor pagination is preferred for large datasets as it provides consistent results when data changes between pages.