Before you begin
- A few documents to find. The examples work with employment agreements carrying a category and a metadata definition, created as in Store structured data on a document.
Step 1: List documents with filters
The documents collection is filtered with query parameters:Request
Response
- Every filter you add narrows the result further — a document is returned only if it matches all of them. Repeat one parameter to widen it instead:
?category=Contract&category=Leasereturns documents in either category. - Documents come back newest first, or best match first when you search with
query, each one the same representationGET /documents/{id}returns. totalcounts every match, not just this page.paginationdescribes the page you got.
limit and the opaque cursor rather than a growing offset — Page through collections covers both.
Step 2: Search on metadata values
The values of metadata-definition fields do not fit into query parameters, so the search endpoint takes the same filters in a request body and addsmetadataFields:
Request
Response
Both endpoints search your active documents. Pass
trashed to search what you have thrown away instead.Step 3: List your saved views
A view is a set of filters saved in the Circularo web app. Your own are listed on your account:Request
Response
Step 4: Apply the saved view
Pass the identifier asviewId:
Request
Response
400, while limit and offset work as usual.
Complete example
Pulling every match of one search, page by page, as a Node.js script. Error handling is minimal for brevity — in production, inspect the error envelope of non-2xx responses.Next steps
- Store the values you later search on — Store structured data on a document.
- Walk large result sets safely — Page through collections.