Skip to main content

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.

Scopedocuments:search
AsynchronousNo
MCP toolrerun_saved_search
Portal permissionsexecute_saved_document_searches
Company capabilitysearch

Parameters​

NameInTypeRequiredDescription
saved_search_idpathstringRequired
Docwize-Versionheaderstring (date)Optional
Idempotency-KeyheaderstringOptionalmax 255

Responses​

StatusDescriptionBody
200Success.application/json SavedSearch
400invalid_versionapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
404not_foundapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
409idempotency_in_progressapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422idempotency_key_reused, unsupported_for_tenant, validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

Errors​

The problem codes this operation can answer with. Each code links to its page.

Schemas​

SavedSearch​

FieldTypeRequiredDescription
cached_hit_countintegerRequiredThe documents cached so far while the run is pending. ≥ -2147483648; ≤ 2147483647
created_atstring (date-time) or nullRequired
descriptionstringRequired
namestringRequired
needs_rerunbooleanRequiredSaved before result sets were cached: run it again to read its result.
needs_resavingbooleanRequiredThe stored search cannot be run as it was stored: save it again.
reasonstring or nullRequiredWhy the search needs re-saving.
saved_search_idstringRequired
searchSavedSearchSpec or nullRequiredThe search; null when it needs re-saving.
statusstringRequiredpending, completed, failed, needs_rerun or needs_resaving.
summarystring or nullRequiredThe plain-language summary written when the search was saved.
total_hit_countintegerRequiredThe documents the last run matched. ≥ -2147483648; ≤ 2147483647

SavedSearchSpec​

FieldTypeRequiredDescription
date_rangesarray of SearchDateRangeRequiredKeep the documents whose dates fall in every range.
document_number_prefixesarray of stringRequiredKeep the documents whose number starts with one of these, ignoring case.
exclude_duplicatesboolean or nullRequiredHide the documents that duplicate another document's number.
facet_filtersarray of SearchFacetFilterRequiredKeep 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.
querystring or nullRequiredFull text, as in POST /documents/search.
reference_numbersarray of stringRequiredKeep the documents whose reference number contains one of these, ignoring case.
weightsSearchWeights or nullRequiredHow much each field counts towards the score of a match of the query. 0 leaves a field out.

SearchDateRange​

FieldTypeRequiredDescription
fieldstringRequiredOne of document_date, created_at, file_created_at, file_modified_at.
fromstring (date) or nullRequiredThe first day; open when left out.
tostring (date) or nullRequiredThe last day; open when left out.

SearchFacetFilter​

FieldTypeRequiredDescription
facetstringRequiredOne 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.
valuesarray of SearchFacetValueRequiredAlternatives: a document is kept when its facet holds any of them.

SearchFacetValue​

FieldTypeRequiredDescription
include_childrenbooleanRequiredWith match exact, also select the values under this one in a hierarchy (a folder's subfolders): the facet starts with the value, ignoring case.
matchstring or nullRequiredexact (the default: the facet equals the value) or contains (the facet contains the text, ignoring case).
valuestringRequiredA value as the facet lists it. An empty string selects the documents with no value.

SearchWeights​

FieldTypeRequiredDescription
ccsinteger or nullRequired
contentinteger or nullRequired
descriptioninteger or nullRequired
document_numberinteger or nullRequired
foldersinteger or nullRequired
frominteger or nullRequired
other_numberinteger or nullRequired
reference_numberinteger or nullRequired
tointeger or nullRequired