v3

latestOpenAPI 3.0.02026-08-081996601.2 MB
Corpora

Retrieve metadata about a corpus

Returns metadata about a corpus without performing a search. This operation does not search the corpus contents. Specify the corpus_key to identify the corpus whose metadata you want to retrieve.

This endpoint helps administrators review access control details and monitor the size of a corpus, such as the amount of quota consumed. You can also use this information to optimize search and storage use.

For example, you can track the read and write activity of a corpus and adjust your security strategy proactively. If a corpus has an API key with read/write access that only serves high volume reads, you may decide to switch to a read-only key.

You can also respond to a security incident by disabling a corpus based on information returned by this endpoint.

Get the number of documents or document parts in a corpus

Document usage metrics help administrators manage resource allocation, keep data usage within allocated quotas, and identify trends in document growth and document segmentation.

The limits object in the response describes the current usage and limits of a corpus. This includes the number of stored documents, document parts, and the character count.

get/v2/corpora/{corpus_key}

Path parameters

corpus_keystring required

A user-provided key for a corpus.

Example:my-corpus

The unique key identifying the corpus to retrieve.

Headers

Request-Timeoutinteger

The platform makes a best effort to complete the request in the specified seconds, or it times out.

Request-Timeout-Millisinteger

The platform makes a best effort to complete the request in the specified milliseconds, or it times out.

Response

The response includes details such as the corpus ID, key, name, description, enabled status, encoder information, filter attributes, custom dimensions, and usage limits.

idstring required

Vectara ID of the corpus.

keystring required

A user-provided key for a corpus.

namestring required

Name for the corpus. This value defaults to the key.

descriptionstring

Corpus description.

enabledboolean

Specifies whether the corpus is enabled or not.

chat_history_corpusboolean

Indicates that this corpus does not store documents and stores chats instead.

queries_are_answersboolean

Queries made to this corpus are considered answers, and not questions. This swaps the semantics of the encoder used at query time.

documents_are_questionsboolean

Documents inside this corpus are considered questions, and not answers. This swaps the semantics of the encoder used at indexing.

encoder_idstring

The encoder used by the corpus. Deprecated: Use encoder_name instead

encoder_namestring

The encoder used by the corpus, boomerang-2023-q3.

save_historyboolean

Indicates whether to save corpus queries to query history by default.

created_atstring date-time

Indicates when the corpus was created.

Example response

{
  "id": "crp_1",
  "key": "my-corpus",
  "name": "Vectara Content",
  "description": "Description about the Vectara Content corpus.",
  "encoder_name": "boomerang-2023-q3",
  "filter_attributes": [
    {
      "name": "Title",
      "level": "document",
      "description": "The title of the document.",
      "type": "text"
    }
  ],
  "custom_dimensions": [
    {
      "name": "importance",
      "description": "Product importance."
    }
  ],
  "limits": {
    "used_docs": 8,
    "used_parts": 3748,
    "used_bytes": 795790,
    "used_characters": 1839847,
    "max_metadata_bytes": 10485760
  }
}