Typesense Monitoring API

Health checks, debug information, metrics, and API statistics.

OpenAPI Specification

typesense-monitoring-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Typesense Analytics Analytics Events Monitoring 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: Monitoring
  description: Health checks, debug information, metrics, and API statistics.
paths:
  /debug:
    get:
      operationId: getDebugInfo
      summary: Get Debug Information
      description: Returns debugging information about the Typesense server including version and state details.
      tags:
      - Monitoring
      responses:
        '200':
          description: Debug information
          content:
            application/json:
              schema:
                type: object
                properties:
                  state:
                    type: integer
                    description: Current node state.
                  version:
                    type: string
                    description: Typesense server version.
        '401':
          description: Unauthorized
  /health:
    get:
      operationId: checkHealth
      summary: Check Server Health
      description: Returns the health status of the Typesense server. Useful for load balancer health checks.
      tags:
      - Monitoring
      responses:
        '200':
          description: Server is healthy
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HealthStatus'
  /metrics.json:
    get:
      operationId: getMetrics
      summary: Get Server Metrics
      description: Returns RAM, CPU, disk, and network metrics for the Typesense server in Prometheus-compatible format.
      tags:
      - Monitoring
      responses:
        '200':
          description: Server metrics
          content:
            application/json:
              schema:
                type: object
        '401':
          description: Unauthorized
  /stats.json:
    get:
      operationId: getApiStats
      summary: Get API Endpoint Statistics
      description: Returns request count and latency statistics for each API endpoint.
      tags:
      - Monitoring
      responses:
        '200':
          description: API statistics
          content:
            application/json:
              schema:
                type: object
        '401':
          description: Unauthorized
components:
  schemas:
    HealthStatus:
      type: object
      properties:
        ok:
          type: boolean
          description: Whether the server is healthy and ready to accept requests.
  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