v2

latestOpenAPI 3.0.02026-08-051996591.2 MB
Corpora

Update a corpus

Enables, disables, or updates the name and description of a corpus. Use this endpoint to manage the availability of data, such as taking a corpus offline without deleting it.

You can also use automated scripts to control the availability of corpora based on certain conditions. For example, quickly disable a corpus for maintenance updates or in response to security incidents.

patch/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 update.

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.

Request body

enabledboolean

Whether the corpus is enabled. If unset, the corpus remains in its current state.

namestring

The name for the corpus. If unset or null, the name remains unchanged.

descriptionstring

Description of the corpus. If unset or null, the description remains unchanged.

save_historyboolean

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

Example request

{
  "name": "new-corpus-name",
  "description": "New description of the corpus."
}

Response

Successfully updated the corpus.

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
  }
}