Compute Corpus Size API Definition
The Compute Corpus Size API lets you view the amount of quota consumed by a corpus. This capability is useful for administrators to track and monitor the amount of usage for specific corpora. For example, you manage multiple tenants and determine that a user consumed too much quota and you might decide to disable the API keys associated with a specific corpus or corpora.
Check out our interactive API Playground that lets you experiment with this endpoint to compute the corpus size.
Compute Corpus Size Request and Response
The request to compute the corpus size provides information about what time
the size was calculated and the size of the corpus. This request also requires
the corpus_id
and customer_id
parameters.
The response includes a size
object that shows the epochSecs
and corpus size
values.
REST Example
Compute Corpus Size REST Endpoint Address
Vectara exposes a REST endpoint at the following URL to compute the size of a corpus:https://api.vectara.io/v1/compute-corpus-size
The API Playground shows the full Compute Corpus Size REST definition.
gRPC Example
You can find the full Compute Corpus Size gRPC definition at admin.proto.