Typesense Cluster Management API

Create, retrieve, update, and terminate Typesense Cloud clusters. Manage cluster lifecycle and generate Typesense Server API keys.

OpenAPI Specification

typesense-cluster-management-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Typesense Analytics Analytics Events Cluster Management API
  description: The Typesense Analytics API allows developers to track and analyze search behavior by recording click, conversion, and visit events. It provides endpoints for creating analytics rules, logging events with metadata tags, and retrieving popular queries and queries with no results. This data can be used to improve search relevance through query suggestions, curations, and understanding user search patterns.
  version: '30.1'
  contact:
    name: Typesense Support
    url: https://typesense.org/support
  license:
    name: GPL-3.0
    url: https://www.gnu.org/licenses/gpl-3.0.html
  termsOfService: https://typesense.org/terms
servers:
- url: '{protocol}://{hostname}:{port}'
  description: Typesense Server
  variables:
    protocol:
      default: http
      enum:
      - http
      - https
    hostname:
      default: localhost
    port:
      default: '8108'
security:
- api_key_header: []
tags:
- name: Cluster Management
  description: Create, retrieve, update, and terminate Typesense Cloud clusters. Manage cluster lifecycle and generate Typesense Server API keys.
paths:
  /clusters:
    post:
      operationId: createCluster
      summary: Create A New Cluster
      description: Provisions a new Typesense Cloud cluster. Cluster creation is asynchronous and typically takes 4-5 minutes. Poll the single cluster endpoint to check when the status changes from provisioning to in_service.
      tags:
      - Cluster Management
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClusterCreateSchema'
      responses:
        '201':
          description: Cluster provisioning initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cluster'
        '400':
          description: Bad request - invalid cluster configuration
        '401':
          description: Unauthorized - invalid or missing management API key
    get:
      operationId: listClusters
      summary: List All Clusters
      description: Retrieves all clusters under your Typesense Cloud account.
      tags:
      - Cluster Management
      responses:
        '200':
          description: List of clusters
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Cluster'
        '401':
          description: Unauthorized
  /clusters/{clusterId}:
    parameters:
    - $ref: '#/components/parameters/clusterId'
    get:
      operationId: getCluster
      summary: Retrieve A Cluster
      description: Retrieves detailed information about a specific cluster including its current status, configuration, hostnames, and region details.
      tags:
      - Cluster Management
      responses:
        '200':
          description: Cluster details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cluster'
        '401':
          description: Unauthorized
        '404':
          description: Cluster not found
    patch:
      operationId: updateCluster
      summary: Update A Cluster
      description: Updates cluster settings such as the cluster name and auto-upgrade configuration.
      tags:
      - Cluster Management
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClusterUpdateSchema'
      responses:
        '200':
          description: Cluster updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cluster'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Cluster not found
    delete:
      operationId: terminateCluster
      summary: Terminate A Cluster
      description: Terminates a running cluster permanently. This action cannot be undone. Once terminated, all data in the cluster is destroyed permanently as a security and privacy measure.
      tags:
      - Cluster Management
      responses:
        '200':
          description: Cluster terminated
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Whether the termination was initiated.
        '401':
          description: Unauthorized
        '404':
          description: Cluster not found
  /clusters/{clusterId}/generate-api-key:
    parameters:
    - $ref: '#/components/parameters/clusterId'
    post:
      operationId: generateApiKey
      summary: Generate Typesense Server API Keys
      description: Generates Typesense Server API keys for the cluster. This endpoint is only available once the cluster status changes to in_service. Returns the admin and search-only API keys needed to interact with the Typesense Server running on the cluster.
      tags:
      - Cluster Management
      responses:
        '200':
          description: API keys generated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClusterApiKeys'
        '400':
          description: Cluster is not yet in service
        '401':
          description: Unauthorized
        '404':
          description: Cluster not found
components:
  schemas:
    Cluster:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the cluster.
        cluster_name:
          type: string
          description: Friendly name of the cluster.
        memory:
          type: string
          description: Memory allocation.
        vcpu:
          type: string
          description: vCPU configuration.
        gpu:
          type: boolean
          description: Whether the cluster is GPU-enabled.
        high_performance_disk:
          type: string
          description: High-performance disk configuration.
        typesense_server_version:
          type: string
          description: Typesense Server version running on the cluster.
        high_availability:
          type: string
          description: Whether high availability is enabled.
        search_delivery_network:
          type: string
          description: Whether search delivery network is enabled.
        load_balancing:
          type: string
          description: Whether load balancing is enabled.
        regions:
          type: array
          description: Regions the cluster is deployed in.
          items:
            type: string
        status:
          type: string
          description: Current status of the cluster.
          enum:
          - provisioning
          - in_service
          - terminating
          - terminated
        hostnames:
          type: object
          description: Hostnames for connecting to the cluster nodes.
        auto_upgrade_capacity:
          type: boolean
          description: Whether auto-upgrade is enabled.
        created_at:
          type: string
          format: date-time
          description: When the cluster was created.
    ClusterApiKeys:
      type: object
      properties:
        admin_key:
          type: string
          description: Admin API key with full access to the Typesense Server.
        search_only_key:
          type: string
          description: Search-only API key for client-side use.
    ClusterCreateSchema:
      type: object
      required:
      - memory
      - typesense_server_version
      - regions
      properties:
        memory:
          type: string
          description: Memory allocation for the cluster, such as 0.5_gb, 1_gb, 2_gb, 4_gb, 8_gb, 16_gb, 32_gb, 64_gb, 96_gb, 128_gb, 192_gb, 256_gb, or 384_gb.
        vcpu:
          type: string
          description: vCPU configuration for the cluster, such as 2_vcpus_2_hr_burst_per_day or dedicated vCPU options.
        gpu:
          type: boolean
          description: Whether to provision a GPU-enabled cluster for embedding generation.
        high_performance_disk:
          type: string
          description: High-performance disk configuration.
        typesense_server_version:
          type: string
          description: Typesense Server version to deploy on the cluster.
        high_availability:
          type: string
          description: Whether to enable high availability with 3-node replication.
          enum:
          - 'yes'
          - 'no'
        search_delivery_network:
          type: string
          description: Whether to enable search delivery network for global distribution.
          enum:
          - 'yes'
          - 'no'
        load_balancing:
          type: string
          description: Whether to enable load balancing.
          enum:
          - 'yes'
          - 'no'
        regions:
          type: array
          description: Cloud regions to deploy the cluster in.
          items:
            type: string
        cluster_name:
          type: string
          description: Optional friendly name for the cluster.
        auto_upgrade_capacity:
          type: boolean
          description: Whether to automatically upgrade cluster capacity when needed.
    ClusterUpdateSchema:
      type: object
      properties:
        cluster_name:
          type: string
          description: Updated friendly name for the cluster.
        auto_upgrade_capacity:
          type: boolean
          description: Updated auto-upgrade setting.
  parameters:
    clusterId:
      name: clusterId
      in: path
      required: true
      description: Unique identifier of the cluster.
      schema:
        type: string
  securitySchemes:
    api_key_header:
      type: apiKey
      in: header
      name: X-TYPESENSE-API-KEY
      description: API key for authenticating requests to the Typesense server.
externalDocs:
  description: Typesense Analytics Documentation
  url: https://typesense.org/docs/30.1/api/analytics-query-suggestions.html