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

# 피드백 통계

> 시간 버킷별로 집계된 피드백 통계를 반환합니다.



## OpenAPI

````yaml /ko/weave/reference/service-api/openapi.json post /feedback/stats
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /feedback/stats:
    post:
      tags:
        - Feedback
      summary: 피드백 통계
      description: 시간 버킷별로 집계된 피드백 통계를 반환합니다.
      operationId: feedback_stats_feedback_stats_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FeedbackStatsReq'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FeedbackStatsRes'
          description: 성공 응답
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: 검증 오류
      security:
        - HTTPBasic: []
        - HTTPBearer: []
components:
  schemas:
    FeedbackStatsReq:
      additionalProperties: false
      description: 시간 버킷별로 집계된 피드백 통계 요청입니다.
      properties:
        end:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: 종료 시간(미포함, UTC, ISO 8601)입니다. 생략하면 현재 시간이 기본값으로 사용됩니다.
          title: End
        feedback_type:
          anyOf:
            - type: string
            - type: 'null'
          description: feedback_type으로 필터링합니다.
          title: Feedback Type
        granularity:
          anyOf:
            - type: integer
            - type: 'null'
          description: 버킷 크기(초 단위)입니다. 생략하면 시간 범위를 기준으로 자동 선택됩니다.
          title: Granularity
        metrics:
          description: payload_dump에서 집계할 메트릭입니다.
          items:
            $ref: '#/components/schemas/FeedbackMetricSpec'
          title: Metrics
          type: array
        project_id:
          title: Project Id
          type: string
        start:
          description: 시작 시간(포함, UTC, ISO 8601)입니다.
          format: date-time
          title: Start
          type: string
        timezone:
          default: UTC
          description: 버킷 정렬에 사용할 IANA 시간대입니다.
          title: Timezone
          type: string
        trigger_ref:
          anyOf:
            - type: string
            - type: 'null'
          description: trigger_ref로 필터링합니다(all-versions의 경우 정확히 일치 또는 접두사 일치).
          title: Trigger Ref
      required:
        - project_id
        - start
      title: FeedbackStatsReq
      type: object
    FeedbackStatsRes:
      description: 시계열 피드백 통계를 포함한 응답입니다.
      properties:
        buckets:
          description: >-
            시간 버킷별 집계입니다. 각 dict에는 'timestamp'(ISO 문자열), 'count'(int), 그리고 요청된 각
            메트릭+집계에 대한 '{agg}_{slug}' 키가 포함됩니다.
          items:
            additionalProperties: true
            type: object
          title: Buckets
          type: array
        end:
          description: 확정된 종료 시간입니다(요청한 시간대와 관계없이 항상 UTC).
          format: date-time
          title: End
          type: string
        granularity:
          description: 사용된 버킷 크기(초 단위)입니다.
          title: Granularity
          type: integer
        start:
          description: 확정된 시작 시간입니다(요청한 시간대와 관계없이 항상 UTC).
          format: date-time
          title: Start
          type: string
        timezone:
          description: 버킷 정렬에 사용된 시간대입니다.
          title: Timezone
          type: string
        window_stats:
          anyOf:
            - additionalProperties:
                additionalProperties:
                  anyOf:
                    - type: number
                    - type: 'null'
                type: object
              type: object
            - type: 'null'
          description: >-
            전체 쿼리 기간에 대한 집계이며, 메트릭 슬러그(예: 'output_score')를 키로 사용합니다. 각 값은 agg
            이름을 결과에 매핑합니다.
          title: Window Stats
      required:
        - start
        - end
        - granularity
        - timezone
      title: FeedbackStatsRes
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    FeedbackMetricSpec:
      additionalProperties: false
      description: 집계할 피드백 페이로드 metric의 사양입니다.
      properties:
        aggregations:
          description: >-
            계산할 집계 함수입니다. 비어 있으면 value_type을 기준으로 기본값이 선택됩니다:
            numeric->avg/min/max, boolean->count_true/count_false.
          items:
            $ref: '#/components/schemas/AggregationType'
          title: Aggregations
          type: array
        json_path:
          description: 'payload_dump 내의 점 경로입니다(예: ''output'', ''output.score'').'
          title: Json Path
          type: string
        percentiles:
          description: >-
            계산할 백분위수 값(0–100)입니다(예: [5, 50, 95]). numeric value_type 필드에만 적용되며
            boolean/categorical에는 무시됩니다.
          items:
            type: number
          title: Percentiles
          type: array
        value_type:
          default: numeric
          description: >-
            경로에 있는 값의 유형입니다. numeric: avg/min/max, boolean:
            count_true/count_false.
          enum:
            - numeric
            - boolean
            - categorical
          title: Value Type
          type: string
      required:
        - json_path
      title: FeedbackMetricSpec
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    AggregationType:
      description: 피드백 및 호출 통계 메트릭에서 지원되는 집계 함수입니다.
      enum:
        - sum
        - avg
        - min
        - max
        - count
        - count_true
        - count_false
      title: AggregationType
      type: string
  securitySchemes:
    HTTPBasic:
      scheme: basic
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````