REST APIs
While gRPC provides low latency and excellent scalability, REST APISs provide a more traditional and sometimes simpler integration path. REST is often the choice for web-based applications that do not require real-time communication.
API Formatting Guidelines
You can find all of our APIs at https:///<version>/<api-endpoint>
The API endpoints are outlined in the various subsections of this API Reference
section. These endpoints are automatically derived from the protobuf definitions
and take the same parameters. At a high level, the api-endpoint derives from
services.proto
specifically, and the API parameters are in other .proto files.
The translation from the protobuf definitions to REST is:
- The only
versioncurrently available isv1. api-endpointis lowercase and has hyphens. For example, the gRPC callCreateCorpusin services.proto is/create-corpus.- API parameters can be sent in either
camelCaseor lowercase withunderscores.
For example, you could submit eithernumResultsornum_resultsin the Search API. - JSON responses are always returned in
camelCaseform.
API Authentication
All APIs are authenticated. Indexing and Search APIs can be authenticated via API Keys. However, Admin actions for creating and 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 REST API specifications are automatically derived from the gRPC protobuf definitions as well.
You can use these with tools of your choosing like Insomnia or Postman.
- Download the OpenAPI YAML file.
- Import the file into Insomonia or Postman.
- Start making API calls directly from the tool.
Want to try the REST APIs live in your browser? Head over to our our API Playground and make real-time API calls from your browser.