Save a search.
POST/api/v1/saved-searchesdocuments:search
注記
このページの操作の説明は、API の OpenAPI 文書のとおり英語で記載しています。
Needs Create Saved Document Searches and Execute Saved Document Searches; the saved search is shown with View Saved Document Searches, otherwise the answer is the write receipt. Saves a search under a name (up to 255 characters) and a description, and caches its result set in the background: the saved search is pending until list_saved_searches shows it completed. The search takes the members of POST /documents/search that its Search app engine reads.
| スコープ | documents:search |
| 非同期 | いいえ |
| MCP ツール | create_saved_search |
| Portal の権限 | create_saved_document_searches, execute_saved_document_searches |
| 会社に必要な機能 | search |
パラメーター
| 名前 | 場所 | 型 | 必須 | 説明 |
|---|---|---|---|---|
Docwize-Version | header | string (date) | 任意 | |
Idempotency-Key | header | string | 任意 | max 255 |
リクエスト本文
| Content-Type | 型 |
|---|---|
application/json | SavedSearchCreateInput |
応答
| ステータス | 説明 | 本文 |
|---|---|---|
201 | Success. | application/json SavedSearch または object |
400 | invalid_version, malformed_json | application/problem+json Problem |
401 | token_expired, unauthenticated | application/problem+json Problem |
403 | forbidden, insufficient_scope, token_owner_inactive | 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 |
413 | payload_too_large | application/problem+json Problem |
415 | unsupported_media_type | 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 |
エラー
この操作が返す可能性のある problem のコードです。各コードからそのページに移動できます。
スキーマ
SavedSearch
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
cached_hit_count | integer | 必須 | The documents cached so far while the run is pending. ≥ -2147483648; ≤ 2147483647 |
created_at | string (date-time) または null | 必須 | |
description | string | 必須 | |
name | string | 必須 | |
needs_rerun | boolean | 必須 | Saved before result sets were cached: run it again to read its result. |
needs_resaving | boolean | 必須 | The stored search cannot be run as it was stored: save it again. |
reason | string または null | 必須 | Why the search needs re-saving. |
saved_search_id | string | 必須 | |
search | SavedSearchSpec または null | 必須 | The search; null when it needs re-saving. |
status | string | 必須 | pending, completed, failed, needs_rerun or needs_resaving. |
summary | string または null | 必須 | The plain-language summary written when the search was saved. |
total_hit_count | integer | 必須 | The documents the last run matched. ≥ -2147483648; ≤ 2147483647 |
SavedSearchCreateInput
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
description | string または null | 任意 | Up to 255 characters. |
name | string | 必須 | Up to 255 characters. |
search | SavedSearchSpecInput | 必須 | What to search for. |
SavedSearchSpec
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
date_ranges | SearchDateRange の配列 | 必須 | Keep the documents whose dates fall in every range. |
document_number_prefixes | string の配列 | 必須 | Keep the documents whose number starts with one of these, ignoring case. |
exclude_duplicates | boolean または null | 必須 | Hide the documents that duplicate another document's number. |
facet_filters | SearchFacetFilter の配列 | 必須 | 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 または null | 必須 | Full text, as in POST /documents/search. |
reference_numbers | string の配列 | 必須 | Keep the documents whose reference number contains one of these, ignoring case. |
weights | SearchWeights または null | 必須 | How much each field counts towards the score of a match of the query. 0 leaves a field out. |
SavedSearchSpecInput
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
date_ranges | SearchDateRangeInput の配列 | 任意 | Keep the documents whose dates fall in every range. |
document_number_prefixes | string の配列 | 任意 | Keep the documents whose number starts with one of these, ignoring case. |
exclude_duplicates | boolean または null | 任意 | Hide the documents that duplicate another document's number. |
facet_filters | SearchFacetFilterInput の配列 | 任意 | 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 または null | 任意 | Full text, as in POST /documents/search. |
reference_numbers | string の配列 | 任意 | Keep the documents whose reference number contains one of these, ignoring case. |
weights | SearchWeightsInput または null | 任意 | How much each field counts towards the score of a match of the query. 0 leaves a field out. |
SearchDateRange
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
field | string | 必須 | One of document_date, created_at, file_created_at, file_modified_at. |
from | string (date) または null | 必須 | The first day; open when left out. |
to | string (date) または null | 必須 | The last day; open when left out. |
SearchDateRangeInput
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
field | string | 必須 | One of document_date, created_at, file_created_at, file_modified_at. |
from | string (date) または null | 任意 | The first day; open when left out. |
to | string (date) または null | 任意 | The last day; open when left out. |
SearchFacetFilter
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
facet | string | 必須 | 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 | SearchFacetValue の配列 | 必須 | Alternatives: a document is kept when its facet holds any of them. |
SearchFacetFilterInput
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
facet | string | 必須 | 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 | SearchFacetValueInput の配列 | 必須 | Alternatives: a document is kept when its facet holds any of them. |
SearchFacetValue
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
include_children | boolean | 必須 | 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 または null | 必須 | exact (the default: the facet equals the value) or contains (the facet contains the text, ignoring case). |
value | string | 必須 | A value as the facet lists it. An empty string selects the documents with no value. |
SearchFacetValueInput
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
include_children | boolean | 任意 | 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 または null | 任意 | exact (the default: the facet equals the value) or contains (the facet contains the text, ignoring case). |
value | string | 必須 | A value as the facet lists it. An empty string selects the documents with no value. |
SearchWeights
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
ccs | integer または null | 必須 | |
content | integer または null | 必須 | |
description | integer または null | 必須 | |
document_number | integer または null | 必須 | |
folders | integer または null | 必須 | |
from | integer または null | 必須 | |
other_number | integer または null | 必須 | |
reference_number | integer または null | 必須 | |
to | integer または null | 必須 |
SearchWeightsInput
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
ccs | integer または null | 任意 | |
content | integer または null | 任意 | |
description | integer または null | 任意 | |
document_number | integer または null | 任意 | |
folders | integer または null | 任意 | |
from | integer または null | 任意 | |
other_number | integer または null | 任意 | |
reference_number | integer または null | 任意 | |
to | integer または null | 任意 |