Skip to main content

Update Corpus Enablement API Definition

The Update Corpus Enablement endpoint lets you enable or disable a corpus. This is useful to manage the availability of data within the system, such as when you need to take the corpus offline without having to delete the corpus.

This capability can help you utilize automated scripts to programatically control the availability of corpora based on certain conditions. For example, quickly disable a corpus for maintenance updates or in response to security incidents.

tip

Check out our interactive API Playground that lets you experiment with this REST endpoint to enable or disable corpora.

Update Corpus Enablement Request and Response

The request to enable or disable a corpus requires the following parameters:

  • Customer ID
  • Corpus ID

REST Example

Update Corpus Enablement REST Endpoint Address

Vectara exposes a REST endpoint at the following URL to update the status of a corpus:
https://api.vectara.io/v1/update-corpus-enablement

Update Corpus Enablement Request Example

In this example, you enable a corpus with the ID of 15.

{
"corpusId": "15",
"enable": true
}

Update Corpus Enablement Response Example

{
"status": {
"code": "OK",
"statusDetail": "",
"cause": null
}
}