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

# GET /consumers/distribution

> Get distribution of consumer attribute values for visualization



## OpenAPI

````yaml /api/openapi/admin-api.json get /consumers/distribution
openapi: 3.1.0
info:
  description: Admin API for Fanfare
  title: Fanfare Admin API
  version: 1.0.0
servers:
  - description: Production
    url: https://admin.fanfare.io/api
  - description: Local development
    url: http://localhost:4800
security:
  - SecretKeyAuth: []
paths:
  /consumers/distribution:
    get:
      tags:
        - Consumers
      description: Get distribution of consumer attribute values for visualization
      operationId: getConsumersDistribution
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  buckets:
                    items:
                      properties:
                        maxValue:
                          anyOf:
                            - type: string
                            - type: number
                        minValue:
                          anyOf:
                            - type: string
                            - type: number
                        percentage:
                          type: number
                        range:
                          type: string
                        value:
                          type: number
                        x:
                          type: number
                      required:
                        - range
                        - value
                        - x
                        - percentage
                        - minValue
                        - maxValue
                      type: object
                    type: array
                  cachedAt:
                    format: date-time
                    type: string
                  field:
                    type: string
                  stats:
                    properties:
                      max:
                        anyOf:
                          - type: string
                          - type: number
                      mean:
                        anyOf:
                          - type: string
                          - type: number
                      median:
                        anyOf:
                          - type: string
                          - type: number
                      min:
                        anyOf:
                          - type: string
                          - type: number
                      stdDev:
                        anyOf:
                          - type: string
                          - type: number
                    required:
                      - min
                      - max
                      - mean
                      - median
                      - stdDev
                    type: object
                  totalCount:
                    type: number
                required:
                  - field
                  - buckets
                  - stats
                  - totalCount
                type: object
          description: Distribution calculated successfully
        '400':
          content:
            application/json:
              schema:
                properties:
                  error:
                    const: validation_error
                  issues:
                    items:
                      properties:
                        expected:
                          type: string
                        kind:
                          type: string
                        message:
                          type: string
                        path:
                          items:
                            properties:
                              input: {}
                              key:
                                type: string
                              origin:
                                type: string
                              type:
                                type: string
                            required:
                              - type
                              - origin
                              - input
                              - key
                            type: object
                          type: array
                        received:
                          type: string
                        type:
                          type: string
                      required:
                        - kind
                        - type
                        - expected
                        - received
                        - message
                        - path
                      type: object
                    type: array
                required:
                  - error
                  - issues
                type: object
          description: Bad Request - Invalid input schema
        '401':
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: string
                required:
                  - error
                type: object
          description: Unauthorized - Authentication required
        '403':
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: string
                required:
                  - error
                type: object
          description: Forbidden - User must be authenticated
        '500':
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: string
                required:
                  - error
                type: object
          description: Internal server error
components:
  securitySchemes:
    SecretKeyAuth:
      description: Fanfare secret key. Keep secret credentials on your server.
      scheme: bearer
      type: http

````