> ## 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 Traffic

> This endpoint reports where a database's traffic comes from. Available for databases on a Pro plan or with the Production Pack.



## OpenAPI

````yaml /devops/developer-api/openapi.yaml get /redis/traffic/{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/traffic/{id}:
    get:
      tags:
        - redis
      summary: Get Database Traffic
      description: >-
        This endpoint reports where a database's traffic comes from. Available
        for databases on a Pro plan or with the Production Pack.
      operationId: getDatabaseTraffic
      parameters:
        - name: id
          in: path
          description: The ID of the database
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Database traffic retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatabaseTraffic'
      security:
        - basicAuth: []
components:
  schemas:
    DatabaseTraffic:
      type: object
      properties:
        database_region:
          type: string
          description: Primary region of the database, to compare client regions against
        client_network_window:
          type: string
          example: 1h
        client_networks:
          type: array
          items:
            $ref: '#/components/schemas/ClientNetwork'
        client_network_evictions:
          type: number
          description: >-
            Networks the proxies pushed out of their sampling tables. A value
            comparable to the observations means the list is a sample of the
            traffic rather than a ranking.
        telemetry_window:
          type: string
          example: today
        telemetry:
          type: object
          properties:
            sdks:
              type: array
              items:
                $ref: '#/components/schemas/TelemetryShare'
            platforms:
              type: array
              items:
                $ref: '#/components/schemas/TelemetryShare'
            runtimes:
              type: array
              items:
                $ref: '#/components/schemas/TelemetryShare'
            retries:
              type: object
              properties:
                requests:
                  type: number
                retried:
                  type: number
                rate:
                  type: number
        routes_window:
          type: string
          example: today
        routes:
          type: array
          items:
            $ref: '#/components/schemas/TrafficRoute'
        entry_regions:
          type: array
          items:
            type: object
            properties:
              region:
                type: string
              share:
                type: number
        cross_region_share:
          type: number
          description: >-
            Share of bytes served by a replica in another region than the entry
            region
        commands:
          type: object
          description: Today's exact command counts, absent until the database saw commands
          properties:
            rest_commands:
              type: number
              description: Commands received over REST
            script_commands:
              type: number
              description: Commands that Lua scripts ran internally
    ClientNetwork:
      type: object
      properties:
        prefix:
          type: string
          description: Client network masked to /24 for IPv4 or /48 for IPv6
          example: 203.0.113.0/24
        provider:
          type: string
          description: >-
            aws, gcp, cloudflare, or internet when the address is not in a
            published range
        region:
          type: string
          description: Provider region, empty for internet
        count:
          type: number
          description: Observations in the last hour, a lower bound
        weight:
          type: number
          description: Estimated observations, an upper bound
        share:
          type: number
          description: Share of all sampled observations, 0 to 1
        idle_seconds:
          type: number
          description: Seconds since the network was last seen
    TelemetryShare:
      type: object
      properties:
        name:
          type: string
          example: '@upstash/redis@1.34.0'
        count:
          type: number
        share:
          type: number
    TrafficRoute:
      type: object
      properties:
        proxy_region:
          type: string
          description: Region the requests entered in
        member_region:
          type: string
          description: Region of the replica that served them
        http_requests:
          type: number
        tcp_connections_opened:
          type: number
        tcp_connections:
          type: number
          description: Connections open now
        ingress_bytes:
          type: number
          description: Bytes clients sent
        egress_bytes:
          type: number
          description: Bytes clients received
        errors:
          type: number
        cross_region:
          type: boolean
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````