> ## Documentation Index
> Fetch the complete documentation index at: https://upstash-cloud-4725.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Database Insights

> This endpoint returns the Insights series of a database: latency percentiles, engine, lock-wait, Lua and disk-load latency, keys loaded from disk, throughput and disk size, for the whole database, one replica or every region. Latencies are in milliseconds. Available for databases on a Pro plan or with the Production Pack.



## OpenAPI

````yaml /devops/developer-api/openapi.yaml get /redis/insights/{id}
openapi: 3.0.4
info:
  title: Developer API - Upstash
  description: >-
    This is a documentation to specify Developer API endpoints based on the
    OpenAPI 3.0 specification.
  contact:
    name: Support Team
    email: support@upstash.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.0
servers:
  - url: https://api.upstash.com/v2
security: []
tags:
  - name: redis
    description: Manage redis databases.
    externalDocs:
      description: Find out more
      url: https://upstash.com/docs/devops/developer-api/introduction
  - name: teams
    description: Manage teams and team members.
    externalDocs:
      description: Find out more
      url: https://upstash.com/docs/devops/developer-api/introduction
  - name: vector
    description: Manage vector indices.
    externalDocs:
      description: Find out more
      url: https://upstash.com/docs/devops/developer-api/introduction
  - name: search
    description: Manage search indices.
    externalDocs:
      description: Find out more
      url: https://upstash.com/docs/devops/developer-api/introduction
  - name: qstash
    description: Manage QStash.
    externalDocs:
      description: Find out more
      url: https://upstash.com/docs/devops/developer-api/introduction
externalDocs:
  description: Find out more about Upstash
  url: https://upstash.com/
paths:
  /redis/insights/{id}:
    get:
      tags:
        - redis
      summary: Get Database Insights
      description: >-
        This endpoint returns the Insights series of a database: latency
        percentiles, engine, lock-wait, Lua and disk-load latency, keys loaded
        from disk, throughput and disk size, for the whole database, one replica
        or every region. Latencies are in milliseconds. Available for databases
        on a Pro plan or with the Production Pack.
      operationId: getDatabaseInsights
      parameters:
        - name: id
          in: path
          description: The ID of the database
          required: true
          schema:
            type: string
        - name: period
          in: query
          description: >-
            The period of the series: 1h, 3h, 12h, 1d, 3d, 7d or 30d. Defaults
            to 3h.
          required: false
          schema:
            type: string
        - name: replica
          in: query
          description: Restrict the series to one replica, by its id from the groups list.
          required: false
          schema:
            type: string
        - name: by
          in: query
          description: Set to region to receive one series per region next to the total.
          required: false
          schema:
            type: string
            enum:
              - region
      responses:
        '200':
          description: Database insights retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatabaseInsights'
      security:
        - basicAuth: []
components:
  schemas:
    DatabaseInsights:
      type: object
      properties:
        groups:
          type: array
          description: Every group the database has, regardless of the scope requested
          items:
            $ref: '#/components/schemas/InsightGroup'
        metrics:
          type: object
          description: >-
            Metric name to group key to data points. The all group is always
            present; region groups are added with by=region. Metrics:
            latency_p50, latency_p90, latency_p99, command_latency_99,
            wait_latency_99, lua_latency_99, disk_load_latency_99, disk_loads,
            throughput and diskusage.
          additionalProperties:
            type: object
            additionalProperties:
              type: array
              items:
                type: object
                properties:
                  x:
                    type: string
                    description: Timestamp of the point
                  'y':
                    type: number
    InsightGroup:
      type: object
      properties:
        key:
          type: string
          description: >-
            The group key, used in the metrics map and as the replica query
            parameter
        label:
          type: string
        kind:
          type: string
          enum:
            - all
            - region
            - replica
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````