Skip to main content

Get a passage.

GET/api/v1/passages/{passage_id}documents:search

Needs View Search Fragments and View Document Text. A passage's text, page and document. The start and end offsets are not read here (search_passages has them). 404 when the passage does not exist or its document is not readable to the caller.

Scopedocuments:search
AsynchronousNo
MCP toolget_passage
Portal permissionsview_search_fragments, view_document_text

Parameters​

NameInTypeRequiredDescription
passage_idpathstringRequired
Docwize-Versionheaderstring (date)Optional
If-None-MatchheaderstringOptionalAnswers 304 when the representation is unchanged (resources that publish an ETag).

Responses​

StatusDescriptionBody
200Success.application/json Passage
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
404not_foundapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422validation_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​

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">.