Skip to main content

Read passages by ID.

GET/api/v1/passagesdocuments:search

Needs View Search Fragments and View Document Text. The text, page and document of the passages named by passage_id (repeat it for several), in the order asked: the clustering app's fragment drilldown. A passage that does not exist, or whose document the caller cannot read, is left out. passage_id is required.

Scopedocuments:search
AsynchronousNo
MCP toollist_passages
Portal permissionsview_search_fragments, view_document_text
Pagingsnapshot
Default orderposition
Sort fieldsposition
Filterspassage_id

Parameters​

NameInTypeRequiredDescription
limitqueryintegerOptionalDefault: 50; ≥ 1
cursorquerystringOptional
sortquerystringOptionalComma-separated sort fields, - for descending.
passage_idqueryarray of stringOptional
Docwize-Versionheaderstring (date)Optional
If-None-MatchheaderstringOptionalAnswers 304 when the representation is unchanged (resources that publish an ETag).

Responses​

StatusDescriptionBody
200Success.application/json object
304Not modified (If-None-Match matched the ETag).
400invalid_versionapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
410cursor_expiredapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422invalid_cursor, validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

200 body​

FieldTypeRequiredDescription
itemsarray of PassageRequired
next_cursorstring or nullRequired
warningsarray of objectRequired

Errors​

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

Schemas​

Passage​

FieldTypeRequiredDescription
distancenumber or nullRequiredHow far the chunk's meaning is from the query's: smaller is nearer. Set by a meaning search.
document_idstringRequired
end_offsetinteger or nullRequiredWhere the chunk ends in the document's text; null for an exact search, and in get_passage and list_passages.
highlightsarray of PassageHighlightRequiredSnippets with the matched words marked; read with include highlights.
pageinteger or nullRequiredThe page of the document the chunk starts on (0 when the document has no pages); read with include text, get_passage and list_passages.
passage_idstring or nullRequiredNames the chunk for get_passage and list_passages; null for an exact search, which finds whole document texts.
scorenumber or nullRequiredHow well the text matches the query's words: larger is better. Set by an exact search.
start_offsetinteger or nullRequiredWhere the chunk starts in the document's text; null for an exact search, and in get_passage and list_passages.
textstring or nullRequiredThe chunk's text; read with include text, get_passage and list_passages.

PassageHighlight​

FieldTypeRequiredDescription
htmlstringRequiredThe snippet, with the matched words in <span class="keyword">.