> ## 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 /ja/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: 時系列フィードバック統計を含むResponse。
      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: >-
            クエリ期間全体に対する集約。メトリクス slug（例: '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: 集約するフィードバックペイロードメトリクスの仕様。
      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: フィードバックおよび Call 統計メトリクスでサポートされる集約関数。
      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

````