Needs View Saved Document Searches. The caller's own saved searches, newest first, each with its search, its status (pending while the background task caches the result set, completed, failed, needs_rerun for a search saved before result sets were cached, needs_resaving for one that cannot be run as it was stored), the number of documents it matched and a plain-language summary.
| |
|---|
| Scope | documents:search |
| Asynchronous | No |
| MCP tool | list_saved_searches |
| Portal permissions | view_saved_document_searches |
| Company capability | search |
| Paging | snapshot |
| Default order | -created_at, saved_search_id |
| Sort fields | created_at, saved_search_id |
Parameters
| Name | In | Type | Required | Description |
|---|
limit | query | integer | Optional | Default: 50; ≥ 1 |
cursor | query | string | Optional | |
sort | query | string | Optional | Comma-separated sort fields, - for descending. |
Docwize-Version | header | string (date) | Optional | |
If-None-Match | header | string | Optional | Answers 304 when the representation is unchanged (resources that publish an ETag). |
Responses
200 body
| Field | Type | Required | Description |
|---|
items | array of SavedSearch | Required | |
next_cursor | string or null | Required | |
warnings | array of object | Required | |
Errors
The problem codes this operation can answer with. Each code links to its page.
Schemas
SavedSearch
| Field | Type | Required | Description |
|---|
cached_hit_count | integer | Required | The documents cached so far while the run is pending. ≥ -2147483648; ≤ 2147483647 |
created_at | string (date-time) or null | Required | |
description | string | Required | |
name | string | Required | |
needs_rerun | boolean | Required | Saved before result sets were cached: run it again to read its result. |
needs_resaving | boolean | Required | The stored search cannot be run as it was stored: save it again. |
reason | string or null | Required | Why the search needs re-saving. |
saved_search_id | string | Required | |
search | SavedSearchSpec or null | Required | The search; null when it needs re-saving. |
status | string | Required | pending, completed, failed, needs_rerun or needs_resaving. |
summary | string or null | Required | The plain-language summary written when the search was saved. |
total_hit_count | integer | Required | The documents the last run matched. ≥ -2147483648; ≤ 2147483647 |
SavedSearchSpec
| Field | Type | Required | Description |
|---|
date_ranges | array of SearchDateRange | Required | Keep the documents whose dates fall in every range. |
document_number_prefixes | array of string | Required | Keep the documents whose number starts with one of these, ignoring case. |
exclude_duplicates | boolean or null | Required | Hide the documents that duplicate another document's number. |
facet_filters | array of SearchFacetFilter | Required | Keep the documents whose folder, tag, location, file author and so on hold one of the values. The values are the ones POST /documents/aggregate lists. |
query | string or null | Required | Full text, as in POST /documents/search. |
reference_numbers | array of string | Required | Keep the documents whose reference number contains one of these, ignoring case. |
weights | SearchWeights or null | Required | How much each field counts towards the score of a match of the query. 0 leaves a field out. |
SearchDateRange
| Field | Type | Required | Description |
|---|
field | string | Required | One of document_date, created_at, file_created_at, file_modified_at. |
from | string (date) or null | Required | The first day; open when left out. |
to | string (date) or null | Required | The last day; open when left out. |
SearchFacetFilter
| Field | Type | Required | Description |
|---|
facet | string | Required | One of document_type, document_sub_type, from, to, project, folder, location, tag, created_by, file_content_type, file_author, file_last_author, file_producer, file_title. |
values | array of SearchFacetValue | Required | Alternatives: a document is kept when its facet holds any of them. |
SearchFacetValue
| Field | Type | Required | Description |
|---|
include_children | boolean | Required | With match exact, also select the values under this one in a hierarchy (a folder's subfolders): the facet starts with the value, ignoring case. |
match | string or null | Required | exact (the default: the facet equals the value) or contains (the facet contains the text, ignoring case). |
value | string | Required | A value as the facet lists it. An empty string selects the documents with no value. |
SearchWeights
| Field | Type | Required | Description |
|---|
ccs | integer or null | Required | |
content | integer or null | Required | |
description | integer or null | Required | |
document_number | integer or null | Required | |
folders | integer or null | Required | |
from | integer or null | Required | |
other_number | integer or null | Required | |
reference_number | integer or null | Required | |
to | integer or null | Required | |