Skip to main content
Menu

Blog Post

Application Development

Managing Multi-tenancy with Vectara’s New Management APIs

Today, we’re excited to announce the GA release of Vectara’s account and corpus details APIs.

Today, we’re excited to announce the GA release of Vectara’s account and corpus details APIs.  This is the third in the set of recent API releases: on December 14, we released APIs for managing API keys, and on December 19, we released APIs for managing users and teams.  With this release, you can now do nearly everything you can do in our Console via APIs in your own applications.  The latest set of APIs available in Vectara lets administrators track usage of their accounts and corpora.  As a result, it’s now easier than ever to build applications on behalf of your own customers.  In this blog post, we’ll discuss how and why and what it means.

 

Account and Corpora Details

Vectara now has a few new public APIs:

  1. Read Account Size: Can be used to understand how much of the quota you’ve consumed across the entire account
  2. Compute Corpus Size: Can be used to understand how much a corpus has consumed
  3. Read Corpus: Can be used to read a variety of aspects about a corpus, including the last computed size, what API keys are associated with the corpus, and any filter attributes
  4. Enable/Disable Corpus: Can be used to enforce external quotas by disabling corpora without deleting them

In concert with the previously released APIs, this now means several new workflows are available to users.  For the purposes of demonstration, let’s imagine you’re working for central IT at your organization or offering a service that uses Vectara and has many tenants.  We’ll walk through a common workflow that we hear about that is now possible to control programmatically.

You have a new user or tenant and you want complete resource isolation for that tenant.  You can:

  1. Create a corpus programmatically for that tenant.  Corpora in Vectara are completely isolated from one another, so this tenant’s data cannot mix with other tenant’s data.
  2. Create an indexing and/or serving API key for that tenant and assign the API key to the corpus for the tenant.  Now you can give the tenant access to adding data to the corpus or searching it without them ever needing to log into Vectara’s administrative console.  (Of course, if you do want to give them Console access, you can also do that programmatically.)

You can do a number of things on behalf of the user as well:

  • If their key(s) gets compromised, or if you want to enforce a credential rotation policy, you can do so by deleting and then creating new keys for the tenant.
  • If the user ever wants to delete their account, you can first “soft delete” it by disabling any of their API keys and then disabling their corpus, giving them time to recover from deletion in case of an accident.  If you then need to reinstate their API key(s) and corpora, you can do so with the same APIs, but choosing to enable instead of disable.
  • You can fully delete a tenant, all of their data with the delete corpus API and delete API key API.

Knowing which API keys to disable or remove is now easier than ever: you can simply call the read corpus API to understand the API keys that are associated with the corpus.

 

Monitoring and Managing Tenant Quotas

And another thing you can now do that some of our customers have been asking us for is that you can now track a tenant’s usage, and if they go over some quota that you’ve determined for them, you have a number of options:

  • You can simply revoke their ability to add more data or perform more searches by disabling their API key(s).
  • You can completely disable one or more corpora in the same way that you might in a soft-deletion use case before removal.

To determine if a user has gone over their quota, you can use the Compute Corpus Size API and you can monitor the consumption of your entire account with the new read account size API to ensure you’re staying on top of your consumption.

We hope this helps you build even more interesting applications on top of Vectara.  As always, we’d love to hear your feedback!  Connect with us on our forums or on our Discord.  If you’d like to see what Vectara can offer you for retrieval augmented generation on your application or website, sign up for an account.

Recommended Content

Session Replay

SonoSim + Vectara: Success Story [Video]

Today, we’re incredibly excited to announce that we’re announcing the GA release of Vectara’s user and team management capabilities, including our new public APIs for them!

Watch Video
Resource Image
Close Menu