Skip to main content

Tigris API Reference (0.0.1)

Download OpenAPI specification:Download

License: Apache License

Overview

This section is organized around HTTP APIs. The APIs accepts JSON requests and returns JSON-encoded responses.The APIs conforms to standard HTTP status codes.

Errors

Tigris uses conventional HTTP response codes to indicate the success or failure of an API request.The response will contain an error code or other information that reveals the reason of the error. The error response is in JSON format and is structured like this:

 {
   "error": {
     "code": "ALREADY_EXISTS",
     "message": "row already exists"
   }
 }

Status 2xx

HTTP Code Reason
200 - OK Everything worked as expected.

Status 4xx

Status codes in the 400-499 range indicate errors that have been caused by the requesting application (e.g., a malformed request body has been sent). Retrying such requests with the same request body is pointless and will result in the same status code again. Some 4xx errors can be handled programmatically. Change the request accordingly before retrying. Below you can find the most frequent 4XX errors and how to fix them.

HTTP Code Tigris Code Reason
400 - Bad Request INVALID_ARGUMENT The request was unacceptable, often due to missing a required parameter.
Examples:
  • Missing documents for write request
  • Collection or Database name is not following the allowed characters
  • 401 - Unauthorized UNAUTHENTICATED No valid API key provided. Check that your api_key and api_secret are correct.
    403 - Forbidden PERMISSION_DENIED The API key doesn't have permissions to perform the request.
    404 - Not Found NOT_FOUND The requested resource doesn't exist.
    Examples:
  • Database or Collection doesn't exists
  • Access Token missing in the request header
  • 409 - Conflict ALREADY_EXISTS TThe request conflicts with another request (perhaps due to using the same idempotent key).
    Examples:
  • Trying to insert document again for the primary key that already exists
  • Creating a database that already exists
  • 429 - Too Many Requests RESOURCE_EXHAUSTED Too many requests hit the API too quickly. We recommend an exponential backoff of your requests.

    Status 5xx

    The 5xx range indicate an error with Tigris servers (these are rare).

    HTTP Code Tigris Code Reason
    500 - Internal Server Error UNKNOWN Something went wrong on Tigris server side.
    501 - Not Implemented UNIMPLEMENTED Not supported by the Tigris server and cannot be handled.
    502 - Bad Gateway BAD_GATEWAY The API key doesn't have permissions to perform the request.
    503 - Service Unavailable UNAVAILABLE The server is not ready to handle the request. Common causes are a server that is down for maintenance or that is overloaded.
    504 - Gateway Timeout DEADLINE_EXCEEDED Tigris server is unable to process the request timely. Common causes are that request is expensive, or server is overloaded.

    Idempotent Requests

    Tigris provides idempotency guarantees when an API call is disrupted and either no response is returned or an HTTP Status code 429,500,501,502,503 is returned. These errors ensure that the request is not committed and retrying the same request will have the same effect.

    Limitations

  • Do not rely on case to distinguish between databases or collections names.
  • Database Name and Collection Name cannot be empty and can only have the characters matches the regex: ^[a-zA-Z]+[a-zA-Z0-9_]+$.
  • Duplicate field names are not allowed.
  • The maximum allowed document size is 100KB.
  • The maximum allowed transaction size is 10MB.
  • Authentication

    The auth section of API provides open authorization (OAuth 2.0) APIs. Tigris supports pluggable OAuth provider. Pass the token in the headers for authentication, as an example -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6I"(replace it with your token). All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

    Access Token

    Endpoint for receiving access token from Tigris Server. The endpoint requires Grant Type(grant_type) which has two possible values "REFRESH_TOKEN" or "CLIENT_CREDENTIALS" based on which either Refresh token(refresh_token) needs to be set or client credentials(client_id, client_secret).

    Authorizations:
    BearerAuth
    Request Body schema: x-www-form-urlencoded
    grant_type
    string <enum>
    Enum: "REFRESH_TOKEN" "CLIENT_CREDENTIALS"
    refresh_token
    string

    Refresh token is required when grant type is set as REFRESH_TOKEN.

    client_id
    string

    Client Id is required when grant type is set as CLIENT_CREDENTIALS.

    client_secret
    string

    Your Tigris API Key is required when grant type is set as CLIENT_CREDENTIALS.

    Responses

    Response samples

    Content type
    application/json
    {
    • "access_token": "string",
    • "refresh_token": "string",
    • "expires_in": 0
    }

    Collections

    The Collections section provide APIs that can be used to manage collections. A collection can have one or more documents.

    Create or update a collection

    Creates a new collection or atomically upgrades the collection to the new schema provided in the request. Schema changes are applied atomically and immediately without any downtime. Tigris Offers two types of collections:

  • DOCUMENTS: Offers rich CRUD APIs.
  • MESSAGES: Offers event streaming APIs.

  • Authorizations:
    BearerAuth
    path Parameters
    db
    required
    string

    Database name where to create collection.

    collection
    required
    string

    Collection name to create.

    Request Body schema: application/json
    schema
    object

    The schema specifications are same as JSON schema specification defined here. The schema of the documents collection differs from the schema of topic collection as topic collection does not have any concept of primary_key. The server recognizes type of the collection by the collection_type set in the schema.

    Schema example of documents: { "title": "user", "description": "Collection of documents with details of users", "properties": { "id": { "description": "A unique identifier for the user", "type": "integer" }, "name": { "description": "Name of the user", "type": "string", "maxLength": 100 }, "balance": { "description": "User account balance", "type": "number" } }, "primary_key": ["id"] }

    Note: The collection_type is not set as default is documents.

    Schema example of topic: { "title": "user_events", "description": "Topic for user events", "properties": { "event_id": { "description": "A id for the event", "type": "integer" }, "event_type": { "description": "Type of the Event", "type": "string", "maxLength": 100 } "event_details": { "description": "Details about the Event", "type": "string" } }, "collection_type": "topic" }

    Note: The collection_type is set as "topic".

    only_create
    boolean

    If set to true then the update schema request to the collection will fail by returning a conflict with HTTP Status code 409. The default is false.

    options
    object (CollectionOptions)

    Collection requests modifying options.

    Responses

    Request samples

    Content type
    application/json
    {
    • "schema": { },
    • "only_create": true,
    • "options": { }
    }

    Response samples

    Content type
    application/json
    {
    • "message": "string",
    • "status": "string"
    }

    Describe Collection

    Returns the information related to the collection. This can be used to retrieve the schema or size of the collection.

    Authorizations:
    BearerAuth
    path Parameters
    db
    required
    string

    Name of the database.

    collection
    required
    string

    Name of the collection.

    Request Body schema: application/json
    db
    string

    Name of the database.

    collection
    string

    Name of the collection.

    schema_format
    string

    Return schema in the requested format. Format can be JSON, Go, TypeScript, Java. Default is JSON.

    options
    object (CollectionOptions)

    Collection requests modifying options.

    Responses

    Request samples

    Content type
    application/json
    {
    • "db": "string",
    • "collection": "string",
    • "schema_format": "string",
    • "options": { }
    }

    Response samples

    Content type
    application/json
    {
    • "collection": "string",
    • "metadata": { },
    • "schema": { },
    • "size": 0
    }

    Drop Collection

    Drop the collection inside this database. This API deletes all of the documents inside this collection and any metadata associated with it.

    Authorizations:
    BearerAuth
    path Parameters
    db
    required
    string

    Database name of the collection.

    collection
    required
    string

    Collection name to drop.

    Request Body schema: application/json
    options
    object (CollectionOptions)

    Collection requests modifying options.

    Responses

    Request samples

    Content type
    application/json
    {
    • "options": { }
    }

    Response samples

    Content type
    application/json
    {
    • "message": "string",
    • "status": "string"
    }

    Databases

    The Databases section provide APIs that can be used to manage databases. A single database can have one or more collections.

    List Databases

    List returns all the databases.

    Authorizations:
    BearerAuth

    Responses

    Response samples

    Content type
    application/json
    {
    • "databases": [
      ]
    }

    List Collections

    List all the collections present in the database passed in the request.

    Authorizations:
    BearerAuth
    path Parameters
    db
    required
    string

    List collection in this database.

    Request Body schema: application/json
    options
    object (CollectionOptions)

    Collection requests modifying options.

    Responses

    Request samples

    Content type
    application/json
    {
    • "options": { }
    }

    Response samples

    Content type
    application/json
    {
    • "db": "string",
    • "collections": [
      ]
    }

    Create Database

    Creates a new database. Returns an AlreadyExists error with a status code 409 if the database already exists.

    Authorizations:
    BearerAuth
    path Parameters
    db
    required
    string

    Create database with this name.

    Request Body schema: application/json
    options
    object (DatabaseOptions)

    Database requests modifying options.

    Responses

    Request samples

    Content type
    application/json
    {
    • "options": { }
    }

    Response samples

    Content type
    application/json
    {
    • "message": "string",
    • "status": "string"
    }

    Describe Database

    This API returns information related to the database along with all the collections inside the database. This can be used to retrieve the size of the database or to retrieve schemas and the size of all the collections present in this database.

    Authorizations:
    BearerAuth
    path Parameters
    db
    required
    string

    Name of the database.

    Request Body schema: application/json
    db
    string

    Name of the database.

    schema_format
    string

    Return schema in the requested format. Format can be JSON, Go, TypeScript, Java. Default is JSON.

    Responses

    Request samples

    Content type
    application/json
    {
    • "db": "string",
    • "schema_format": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "db": "string",
    • "metadata": { },
    • "collections": [
      ],
    • "size": 0
    }

    Drop Database

    Drop database deletes all the collections in this database along with all of the documents, and associated metadata for these collections.

    Authorizations:
    BearerAuth
    path Parameters
    db
    required
    string

    Drop database with this name. Note: Deletes all the collections in the database. Use with caution.

    Request Body schema: application/json
    options
    object (DatabaseOptions)

    Database requests modifying options.

    Responses

    Request samples

    Content type
    application/json
    {
    • "options": { }
    }

    Response samples

    Content type
    application/json
    {
    • "message": "string",
    • "status": "string"
    }

    Documents

    The Documents section provide APIs to manage documents insides a collection. Uniqueness of documents are enforced by the primary key.

    Delete Documents

    Delete a range of documents in the collection using the condition provided in the filter.

    Authorizations:
    BearerAuth
    path Parameters
    db
    required
    string

    Database name where to insert documents.

    collection
    required
    string

    Collection name where to insert documents.

    Request Body schema: application/json
    filter
    object

    Delete documents which matching specified filter. A filter can simply be key, value where key is the field name and value would be the value for this field. Or a filter can be logical where two or more fields can be logically joined using $or and $and. A few examples of filter:

  • To delete a user document where the id has a value 1: {"id": 1 }
  • To delete all the user documents where the key "id" has a value 1 or 2 or 3: {"$or": [{"id": 1}, {"id": 2}, {"id": 3}]}

  • object (DeleteRequestOptions)

    Additional options for deleted requests.

    Responses

    Request samples

    Content type
    application/json
    {
    • "filter": { },
    • "options": {
      }
    }

    Response samples

    Content type
    application/json
    {
    • "metadata": {
      },
    • "status": "string"
    }

    Insert Documents

    Inserts new documents in the collection and returns an AlreadyExists error if any of the documents in the request already exists. Insert provides idempotency by returning an error if the document already exists. To replace documents, use REPLACE API instead of INSERT.

    Authorizations:
    BearerAuth
    path Parameters
    db
    required
    string

    Database name where to insert documents.

    collection
    required
    string

    Collection name where to insert documents.

    Request Body schema: application/json
    documents
    Array of objects

    Array of documents to insert. Each document is a JSON object.

    object (InsertRequestOptions)

    additional options for insert requests.

    Responses

    Request samples

    Content type
    application/json
    {
    • "documents": [
      ],
    • "options": {
      }
    }

    Response samples

    Content type
    application/json
    {
    • "metadata": {
      },
    • "status": "string",
    • "keys": [
      ]
    }

    Read Documents

    Reads a range of documents from the collection, or messages from a collection in case of event streaming. Tigris does not require you to index any fields and automatically index all the fields which means you can filter by any field in the document. An empty filter will trigger reading all the documents inside this collection. The API supports pagination that can be used by passing Limit/Skip parameters. The skip parameter skips the number of documents from the start and the limit parameter is used to specify the number of documents to read. You can find more detailed documentation of the Read API here.

    Authorizations:
    BearerAuth
    path Parameters
    db
    required
    string

    Database name to read documents from.

    collection
    required
    string

    Collection name to read documents from.

    Request Body schema: application/json
    filter
    object

    Returns documents matching this filter. A filter can simply be a key, value pair where a key is the field name and the value would be the value for this field. Tigris also allows complex filtering by passing logical expressions. Logical filters are applied on two or more fields using $or and $and. A few examples of filters:

  • To read a user document where the id has a value 1: {"id": 1 }
  • To read all the user documents where the key "id" has a value 1 or 2 or 3: {"$or": [{"id": 1}, {"id": 2}, {"id": 3}]} Filter allows setting collation on an individual field level. To set collation for all the fields see options. The detailed documentation of the filter is here.

  • fields
    object

    To read specific fields from a document. Default is all.

    object (ReadRequestOptions)

    Options that can be used to modify the results, for example "limit" to control the number of documents returned by the server.

    sort
    string <byte>

    Array of fields and corresponding sort orders to order the results. Ex: 1 [{ "salary": "$desc" }], Ex: 2 [{ "salary": "$asc"}]

    Responses

    Request samples

    Content type
    application/json
    {
    • "filter": { },
    • "fields": { },
    • "options": {
      },
    • "sort": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "result": {
      },
    • "error": {
      }
    }

    Insert or Replace Documents

    Inserts the documents or replaces the existing documents in the collections.

    Authorizations:
    BearerAuth
    path Parameters
    db
    required
    string

    Database name where to replace documents.

    collection
    required
    string

    Collection name where to replace documents.

    Request Body schema: application/json
    documents
    Array of objects

    Array of documents to be replaced. Each document is a JSON object.

    object (ReplaceRequestOptions)

    Additional options for replace requests.

    Responses

    Request samples

    Content type
    application/json
    {
    • "documents": [
      ],
    • "options": {
      }
    }

    Response samples

    Content type
    application/json
    {
    • "metadata": {
      },
    • "status": "string",
    • "keys": [
      ]
    }

    Update Documents

    Update a range of documents in the collection using the condition provided in the filter.

    Authorizations:
    BearerAuth
    path Parameters
    db
    required
    string

    Database name where to update documents

    collection
    required
    string

    Collection name where to update documents

    Request Body schema: application/json
    fields
    object

    Fields contains set of fields with the values which need to be updated. Should be proper JSON object.

    filter
    object

    Update documents which matching specified filter. A filter can simply be key, value where key is the field name and value would be the value for this field. Or a filter can be logical where two or more fields can be logically joined using $or and $and. A few examples of filter:

  • To update a user document where the id has a value 1: {"id": 1 }
  • To update all the user documents where the key "id" has a value 1 or 2 or 3: {"$or": [{"id": 1}, {"id": 2}, {"id": 3}]}

  • object (UpdateRequestOptions)

    Additional options for update requests.

    Responses

    Request samples

    Content type
    application/json
    {
    • "fields": { },
    • "filter": { },
    • "options": {
      }
    }

    Response samples

    Content type
    application/json
    {
    • "metadata": {
      },
    • "modified_count": 0,
    • "status": "string"
    }

    Event Streaming

    Tigris has built-in event streaming support. This functionality is enabled for the Messages collection type. This type of collection is referred as Topic and has endpoints that allows you to both subscribe and publish to a topic which enable building event-driven applications. Ordering is guaranteed on a partition level

    Publish Messages to a Topic

    Endpoint for publishing messages to a topic.

    Authorizations:
    BearerAuth
    path Parameters
    db
    required
    string

    Database name where to publish messages.

    collection
    required
    string

    Topic name where to publish messages.

    Request Body schema: application/json
    db
    string

    Database name where to publish messages.

    collection
    string

    Topic name where to publish messages.

    messages
    Array of objects

    An array of JSON messages to publish.

    object (PublishRequestOptions)

    Responses

    Request samples

    Content type
    application/json
    {
    • "db": "string",
    • "collection": "string",
    • "messages": [
      ],
    • "options": {
      }
    }

    Response samples

    Content type
    application/json
    {
    • "metadata": {
      },
    • "status": "string",
    • "keys": [
      ]
    }

    Subscribe to a Topic

    Endpoint for subscribing to a topic to receive a stream of messages. The partition can be set to stream only from a specific partition.

    Authorizations:
    BearerAuth
    path Parameters
    db
    required
    string

    Database name.

    collection
    required
    string

    Topic name.

    Request Body schema: application/json
    db
    string

    Database name.

    collection
    string

    Topic name.

    object (SubscribeRequestOptions)
    filter
    object

    Filter allows you to subscribe only for events that you need. Filter syntax is similar to ReadRequest.filter.

    Responses

    Request samples

    Content type
    application/json
    {
    • "db": "string",
    • "collection": "string",
    • "options": {
      },
    • "filter": { }
    }

    Response samples

    Content type
    application/json
    {
    • "result": {
      },
    • "error": {
      }
    }

    Management

    The Management section provide APIs that can be used to manage users, and applications.

    Creates the Application

    Create an application.

    Authorizations:
    BearerAuth
    Request Body schema: application/json
    name
    string

    A human readable app name

    description
    string

    A human readable app description

    Responses

    Request samples

    Content type
    application/json
    {
    • "name": "string",
    • "description": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "created_application": {
      }
    }

    Deletes the Application

    Delete an application.

    Authorizations:
    BearerAuth
    Request Body schema: application/json
    id
    string

    application id

    Responses

    Request samples

    Content type
    application/json
    {
    • "id": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "deleted": true
    }

    List Applications

    Lists all application visible to requesting actor.

    Authorizations:
    BearerAuth
    Request Body schema: application/json
    object (ListApplicationsRequest)

    Request listing of all the application those are visible to requesting actor

    Responses

    Request samples

    Content type
    application/json
    { }

    Response samples

    Content type
    application/json
    {
    • "applications": [
      ]
    }

    Rotates the Application Secret

    Endpoint is used to rotate the secret for the application.

    Authorizations:
    BearerAuth
    Request Body schema: application/json
    id
    string

    application id

    Responses

    Request samples

    Content type
    application/json
    {
    • "id": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "application": {
      }
    }

    Updates the Application

    Update an application.

    Authorizations:
    BearerAuth
    Request Body schema: application/json
    id
    string

    application id

    name
    string

    A new human readable app name

    description
    string

    A new human readable app description

    Responses

    Request samples

    Content type
    application/json
    {
    • "id": "string",
    • "name": "string",
    • "description": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "updated_application": {
      }
    }

    Reads the Namespace Metadata

    GetNamespaceMetadata inserts the user metadata object

    Authorizations:
    BearerAuth
    path Parameters
    metadataKey
    required
    string
    Request Body schema: application/json
    metadataKey
    string
    value
    object

    Responses

    Request samples

    Content type
    application/json
    {
    • "metadataKey": "string",
    • "value": { }
    }

    Response samples

    Content type
    application/json
    {
    • "metadataKey": "string",
    • "namespaceId": 0,
    • "value": { }
    }

    Inserts Namespace Metadata

    InsertNamespaceMetadata inserts the namespace metadata object

    Authorizations:
    BearerAuth
    path Parameters
    metadataKey
    required
    string
    Request Body schema: application/json
    metadataKey
    string
    value
    object

    Responses

    Request samples

    Content type
    application/json
    {
    • "metadataKey": "string",
    • "value": { }
    }

    Response samples

    Content type
    application/json
    {
    • "metadataKey": "string",
    • "namespaceId": 0,
    • "value": { }
    }

    Updates Namespace Metadata

    UpdateNamespaceMetadata updates the user metadata object

    Authorizations:
    BearerAuth
    path Parameters
    metadataKey
    required
    string
    Request Body schema: application/json
    metadataKey
    string
    value
    object

    Responses

    Request samples

    Content type
    application/json
    {
    • "metadataKey": "string",
    • "value": { }
    }

    Response samples

    Content type
    application/json
    {
    • "metadataKey": "string",
    • "namespaceId": 0,
    • "value": { }
    }

    Reads the User Metadata

    GetUserMetadata inserts the user metadata object

    Authorizations:
    BearerAuth
    path Parameters
    metadataKey
    required
    string
    Request Body schema: application/json
    metadataKey
    string
    value
    object

    Responses

    Request samples

    Content type
    application/json
    {
    • "metadataKey": "string",
    • "value": { }
    }

    Response samples

    Content type
    application/json
    {
    • "metadataKey": "string",
    • "userId": "string",
    • "namespaceId": 0,
    • "value": "string"
    }

    Inserts User Metadata

    insertUserMetadata inserts the user metadata object

    Authorizations:
    BearerAuth
    path Parameters
    metadataKey
    required
    string
    Request Body schema: application/json
    metadataKey
    string
    value
    object

    Responses

    Request samples

    Content type
    application/json
    {
    • "metadataKey": "string",
    • "value": { }
    }

    Response samples

    Content type
    application/json
    {
    • "metadataKey": "string",
    • "userId": "string",
    • "namespaceId": 0,
    • "value": { }
    }

    Updates User Metadata

    updateUserMetadata updates the user metadata object

    Authorizations:
    BearerAuth
    path Parameters
    metadataKey
    required
    string
    Request Body schema: application/json
    metadataKey
    string
    value
    object

    Responses

    Request samples

    Content type
    application/json
    {
    • "metadataKey": "string",
    • "value": { }
    }

    Response samples

    Content type
    application/json
    {
    • "metadataKey": "string",
    • "userId": "string",
    • "namespaceId": 0,
    • "value": { }
    }

    Namespaces

    The Namespaces section provide APIs that can be used to manage namespaces. A single namespace can have one or more databases.

    Creates a Namespace

    Creates a new namespace, if it does not exist

    Authorizations:
    BearerAuth
    Request Body schema: application/json
    code
    integer <uint32>

    Optional: unique id

    id
    string

    Optional: unique string id

    name
    string

    Required: The display name for namespace.

    Responses

    Request samples

    Content type
    application/json
    {
    • "code": 0,
    • "id": "string",
    • "name": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "message": "string",
    • "status": "string",
    • "namespace": {
      }
    }

    Describe the details of all namespaces

    Get details for all namespaces

    Authorizations:
    BearerAuth

    Responses

    Response samples

    Content type
    application/json
    {
    • "data": {
      }
    }

    Lists all Namespaces

    List all namespace

    Authorizations:
    BearerAuth

    Responses

    Response samples

    Content type
    application/json
    {
    • "namespaces": [
      ]
    }

    Observability

    The Observability section has APIs that provides full visibility into the health, metrics, and monitoring of the Server.

    Health Check

    This endpoint can be used to check the liveness of the server.

    Responses

    Response samples

    Content type
    application/json
    {
    • "response": "string"
    }

    Information about the server

    Provides the information about the server. This information includes returning the server version, etc.

    Authorizations:
    BearerAuth

    Responses

    Response samples

    Content type
    application/json
    {
    • "server_version": "string"
    }

    Queries time series metrics

    Queries time series metrics

    Authorizations:
    BearerAuth
    Request Body schema: application/json
    db
    string
    collection
    string
    from
    integer <int64>
    to
    integer <int64>
    metric_name
    string
    tigris_operation
    string <enum>
    Enum: "ALL" "READ" "WRITE" "METADATA"
    space_aggregation
    string <enum>
    Enum: "AVG" "MIN" "MAX" "SUM"
    space_aggregated_by
    Array of strings
    function
    string <enum>
    Enum: "RATE" "COUNT" "NONE"
    quantile
    number <float>
    Array of objects (AdditionalFunction)

    Responses

    Request samples

    Content type
    application/json
    {
    • "db": "string",
    • "collection": "string",
    • "from": 0,
    • "to": 0,
    • "metric_name": "string",
    • "tigris_operation": "ALL",
    • "space_aggregation": "AVG",
    • "space_aggregated_by": [
      ],
    • "function": "RATE",
    • "quantile": 0,
    • "additionalFunctions": [
      ]
    }

    Response samples

    Content type
    application/json
    {
    • "from": 0,
    • "to": 0,
    • "query": "string",
    • "series": [
      ]
    }

    Queries current namespace quota limits

    Returns current namespace quota limits

    Authorizations:
    BearerAuth
    Request Body schema: application/json
    object (QuotaLimitsRequest)

    Request current namespace quota limits

    Responses

    Request samples

    Content type
    application/json
    { }

    Response samples

    Content type
    application/json
    {
    • "ReadUnits": 0,
    • "WriteUnits": 0,
    • "StorageSize": 0
    }

    Queries current namespace quota usage

    Returns current namespace quota limits

    Authorizations:
    BearerAuth
    Request Body schema: application/json
    object (QuotaUsageRequest)

    Request current namespace quota usage

    Responses

    Request samples

    Content type
    application/json
    { }

    Response samples

    Content type
    application/json
    {
    • "ReadUnits": 0,
    • "WriteUnits": 0,
    • "StorageSize": 0,
    • "ReadUnitsThrottled": 0,
    • "WriteUnitsThrottled": 0,
    • "StorageSizeThrottled": 0
    }

    Transactions

    Transactional APIs are used to control the state of the transaction by explicitly starting a transaction and ending it using the commit/rollback endpoint. All operations performed in a transaction acts as a single unit. Tigris offers global transactions, with ACID properties and strict serializability.

    Begin a transaction

    Starts a new transaction and returns a transactional object. All reads/writes performed within a transaction will run with serializable isolation.

    Authorizations:
    BearerAuth
    path Parameters
    db
    required
    string

    Database name this transaction belongs to.

    Request Body schema: application/json
    options
    object (TransactionOptions)

    Options that can be used to modify the transaction semantics.

    Responses

    Request samples

    Content type
    application/json
    {
    • "options": { }
    }

    Response samples

    Content type
    application/json
    {
    • "tx_ctx": {
      }
    }

    Commit a Transaction

    Atomically commit all the changes performed in the context of the transaction. Commit provides all or nothing semantics by ensuring no partial updates are in the database due to a transaction failure.

    Authorizations:
    BearerAuth
    path Parameters
    db
    required
    string

    Database name this transaction belongs to.

    Request Body schema: application/json
    object (CommitTransactionRequest)

    Commit transaction with the given ID

    Responses

    Request samples

    Content type
    application/json
    { }

    Response samples

    Content type
    application/json
    {
    • "status": "string"
    }

    Rollback a transaction

    Rollback transaction discards all the changes performed in the transaction

    Authorizations:
    BearerAuth
    path Parameters
    db
    required
    string

    Database name this transaction belongs to.

    Request Body schema: application/json
    object (RollbackTransactionRequest)

    Rollback transaction with the given ID

    Responses

    Request samples

    Content type
    application/json
    { }

    Response samples

    Content type
    application/json
    {
    • "status": "string"
    }