> ## Documentation Index
> Fetch the complete documentation index at: https://docs.quiva.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get KV bucket details

> Retrieves information about a specific KV bucket



## OpenAPI

````yaml /api-reference/endpoint/storage/openapi.json get /storage/kv/{bucket}
openapi: 3.0.3
info:
  title: quiva.ai Gateway
  description: >-
    A comprehensive interface for managing key-value stores, object stores,
    streams, and search indexing
  contact:
    name: quiva.ai Support
    url: https://quiva.ai/help-center/
  version: 1.0.0
servers:
  - url: https://api.quiva.ai
    description: Production API server
security:
  - bearerAuth: []
  - apiKeyAuth: []
paths:
  /storage/kv/{bucket}:
    get:
      tags:
        - KV Buckets
      summary: Get KV bucket details
      description: Retrieves information about a specific KV bucket
      operationId: getKVBucket
      parameters:
        - $ref: '#/components/parameters/bucketName'
      responses:
        '200':
          description: Successfully retrieved bucket information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KVBucketResponse'
              example:
                body:
                  status:
                    backing_store: BStream
                    bucket: products
                    description: Product catalog
                    bytes: 52428800
                    history: 5
                    ttl: 0
                    is_compressed: true
                  config:
                    bucket: products
                    max_bytes: 10737418240
                    max_value_size: 1048576
                    history: 5
                    num_replicas: 3
                  stream_info:
                    cluster:
                      leader: node-1
                      name: quiva-cluster
                      replicas:
                        - active: 0
                          current: true
                          name: node-2
                        - active: 0
                          current: true
                          name: node-3
                    config:
                      name: KV_products
                      subjects:
                        - $KV.products.>
                      retention: Limits
                      storage: file
                      num_replicas: 3
                      discard: old
                    created: '2025-05-08T12:49:45.029Z'
                    state:
                      messages: 1250
                      bytes: 52428800
                      first_seq: 1
                      last_seq: 1250
                      consumer_count: 2
                      num_subjects: 1250
                metadata:
                  bucket: products
                  duration: 3ms
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    bucketName:
      name: bucket
      in: path
      description: Name of the bucket
      required: true
      schema:
        type: string
  schemas:
    KVBucketResponse:
      type: object
      properties:
        body:
          type: object
          properties:
            status:
              type: object
              properties:
                backing_store:
                  type: string
                bucket:
                  type: string
                description:
                  type: string
                bytes:
                  type: integer
                  format: uint64
                history:
                  type: integer
                  format: int64
                ttl:
                  type: integer
                  format: int64
                is_compressed:
                  type: boolean
            config:
              type: object
              properties:
                bucket:
                  type: string
                max_bytes:
                  type: integer
                  format: int64
                max_value_size:
                  type: integer
                  format: int32
                history:
                  type: integer
                  format: int64
                num_replicas:
                  type: integer
            stream_info:
              type: object
              properties:
                cluster:
                  type: object
                  properties:
                    leader:
                      type: string
                    name:
                      type: string
                    replicas:
                      type: array
                      items:
                        type: object
                        properties:
                          active:
                            type: integer
                            format: uint64
                          current:
                            type: boolean
                          name:
                            type: string
                config:
                  type: object
                  properties:
                    allow_direct:
                      type: boolean
                    allow_rollup_hdrs:
                      type: boolean
                    compression:
                      type: string
                    consumer_limits:
                      type: object
                      properties:
                        inactive_threshold:
                          type: integer
                          format: int64
                        max_ack_pending:
                          type: integer
                    deny_delete:
                      type: boolean
                    discard:
                      type: string
                      enum:
                        - old
                        - new
                    duplicate_window:
                      type: integer
                      format: int64
                    index_config:
                      type: object
                      properties:
                        engine:
                          type: string
                        idBy:
                          type: string
                        partitions:
                          type: integer
                        version:
                          type: integer
                    max_age:
                      type: integer
                      format: int64
                    max_bytes:
                      type: integer
                      format: int64
                    max_consumers:
                      type: integer
                    max_msg_size:
                      type: integer
                      format: int32
                    max_msgs:
                      type: integer
                      format: int64
                    max_msgs_per_subject:
                      type: integer
                      format: int64
                    mirror_direct:
                      type: boolean
                    name:
                      type: string
                    num_replicas:
                      type: integer
                    retention:
                      type: string
                      enum:
                        - Limits
                        - Interest
                        - WorkQueue
                    storage:
                      type: string
                      enum:
                        - file
                        - memory
                    subject_transform:
                      type: object
                      properties:
                        dest:
                          type: string
                        src:
                          type: string
                    subjects:
                      type: array
                      items:
                        type: string
                    metadata:
                      type: object
                      additionalProperties:
                        type: string
                created:
                  type: string
                  format: date-time
                state:
                  type: object
                  properties:
                    bytes:
                      type: integer
                      format: uint64
                    consumer_count:
                      type: integer
                    deleted:
                      type: array
                      items:
                        type: integer
                        format: uint64
                    first_seq:
                      type: integer
                      format: uint64
                    first_ts:
                      type: string
                      format: date-time
                    last_seq:
                      type: integer
                      format: uint64
                    last_ts:
                      type: string
                      format: date-time
                    messages:
                      type: integer
                      format: uint64
                    num_deleted:
                      type: integer
                    num_subjects:
                      type: integer
                      format: uint64
                    subjects:
                      type: object
        metadata:
          $ref: '#/components/schemas/Metadata'
    Metadata:
      type: object
      properties:
        bucket:
          type: string
          description: Bucket name
        duration:
          type: string
          description: Operation duration
        field:
          type: string
          description: Search field
        hits:
          type: integer
          description: Number of hits
        index_duration:
          type: string
          description: Index search duration
        index_hits:
          type: integer
          description: Number of index hits
        index_name:
          type: string
          description: Index name
        index_partitions:
          type: integer
          description: Number of index partitions
        key:
          type: string
          description: Entry key
        limit:
          type: integer
          description: Query limit
        partitions:
          type: integer
          description: Number of partitions
        search:
          type: string
          description: Search term
        stream:
          type: string
          description: Stream name
        subject:
          type: string
          description: Subject pattern
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message
  responses:
    BadRequestError:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: validation_error
    UnauthorizedError:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: unauthorized
    NotFoundError:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: not_found
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: internal_error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

````