Skip to main content

Getting Started

This section explains how to interact with Tigris using HTTP APIs.

The Base URL

All HTTP API endpoints exists under the base URL /v1/.


All the databases related operations exists under the databases path which means to perform any operation on the database you need to use the following structure /v1/databases/<database-name>.

Here is a detail on all the supported operations on the databases.

Creating a database

Using the above structure, the first step is to create a database.

curl 'http://localhost:8081/v1/databases/catalogdb/create' \
-H 'Content-Type: application/json'


Similar to databases, operations performed on a collection exists under collections in the URL. This means the URL for operations on a collection looks like this /v1/databases/<database-name>/collections/<collection-name.

Here is a detail on all the supported operations on the collections.

Creating a collection

Taking the URL structure from above, let's create a catalog collection under catalogdb database.

curl 'http://localhost:8081/v1/databases/catalogdb/collections/catalog/createOrUpdate' \
-H 'Content-Type: application/json' \
-d '{
"description":"A collection of products",
"description":"A unique identifier for the product",
"description":"Name of the product",
"description":"Price of the product",
"description":"The brand of the product",
"description":"Labeling of the product",
"description":"Popularity score of the product",

This will create a collection named catalog under database catalogdb.

The schema is needed to create a collection. In the next section, on data modeling let's take a deeper look on how to model the collection.