Skip to main content

REST APIs

While gRPC provides low latency and excellent scalability, in some scenarios it may be simpler to integrate using REST APIs.

API Formatting Guidelines

All of the APIs can be found at https://api.vectara.io/<version>/<api-endpoint>ee

The API endpoints are outlined in the various subsections of this API Reference section. These are automatically derived from the protobuf definitions and take the same parameters. At a high level, the api-endpoints are derived from services.proto specifically, and the API parameters are in other .proto files. The translation from the protobuf definitions to REST is:

  • The only version currently available is v1
  • api-endpoint is lowercase and has hyphens. For example, the gRPC call CreateCorpus in services.proto is /create-corpus
  • API parameters can be sent in either camelCase or lowercase with underscores. For example, you could submit either numResults or num_results in the Search API
  • JSON responses are always returned in camelCase form

API Authentication

All Vectara APIs are authenticated. Indexing and Search APIs can be authenticated via API Keys however, Admin actions (creating/deleting corpora) must be done via OAuth 2.0.

API Playground and OpenAPI Specifications

You can find up-to-date OpenAPI specifications at https://docs.vectara.com/vectara-oas.yaml. These are automatically derived from the gRPC protobuf definitions as well.

You can use these with tools of your choosing like Insomnia or Postman

If you'd like to try out the REST APIs live in your browser, you can do so in our API Playground, which also make use of.