Count the document texts a passage filter matches.
POST/api/v1/passages/aggregatedocuments:search
Needs Search Document Metadata and View Document Metadata. The clustering app's row count for a filter: the number of document texts (one per document, or per page or image of one) that have passages and match filter, among the documents the caller can read. filter is the one of search_passages; without it every text the caller can read is counted.
| Scope | documents:search |
| Asynchronous | No |
| MCP tool | aggregate_passages |
| Portal permissions | search_document_metadata, view_document_metadata |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Docwize-Version | header | string (date) | Optional |
Request body
| Content type | Type |
|---|---|
application/json | PassageAggregateInput |
Responses
| Status | Description | Body |
|---|---|---|
200 | Success. | application/json PassageAggregateResult |
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 |
413 | payload_too_large | application/problem+json Problem |
415 | unsupported_media_type | application/problem+json Problem |
421 | wrong_region | application/problem+json Problem |
422 | 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
PassageAggregateInput
| Field | Type | Required | Description |
|---|---|---|---|
filter | object or null | Optional | The filter of search_passages; without it every text the caller can read is counted. |
PassageAggregateResult
| Field | Type | Required | Description |
|---|---|---|---|
total_count | integer | Required | The document texts that have passages and match the filter. ≥ -2147483648; ≤ 2147483647 |