Run a saved search again.
POST/api/v1/saved-searches/{saved_search_id}/rerundocuments:search
Needs Execute Saved Document Searches and View Saved Document Searches. Discards the cached result set and caches a new one in the background; the saved search is pending until list_saved_searches shows it completed. A search saved before result sets were cached is converted when it can be, and refused when it needs re-saving.
| Scope | documents:search |
| Asynchronous | No |
| MCP tool | rerun_saved_search |
| Portal permissions | execute_saved_document_searches |
| Company capability | search |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
saved_search_id | path | string | Required | |
Docwize-Version | header | string (date) | Optional | |
Idempotency-Key | header | string | Optional | max 255 |
Responses
| Status | Description | Body |
|---|---|---|
200 | Success. | application/json SavedSearch |
400 | invalid_version | application/problem+json Problem |
401 | token_expired, unauthenticated | application/problem+json Problem |
403 | forbidden, insufficient_scope, token_owner_inactive | application/problem+json Problem |
404 | not_found | application/problem+json Problem |
405 | method_not_allowed | application/problem+json Problem |
406 | not_acceptable | application/problem+json Problem |
409 | idempotency_in_progress | application/problem+json Problem |
421 | wrong_region | application/problem+json Problem |
422 | idempotency_key_reused, unsupported_for_tenant, validation_failed | application/problem+json Problem |
500 | internal_error | application/problem+json Problem |
503 | tenant_unavailable, unavailable | application/problem+json Problem |
504 | timeout | application/problem+json Problem |
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 |