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

# Get Aggregated Trace View



## OpenAPI

````yaml https://api.galileo.ai/public/v2/openapi.json post /v2/projects/{project_id}/traces/aggregated
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.galileo.ai
    description: Galileo Public APIs - galileo-v2
security: []
paths:
  /v2/projects/{project_id}/traces/aggregated:
    post:
      tags:
        - trace
      summary: Get Aggregated Trace View
      operationId: >-
        get_aggregated_trace_view_v2_projects__project_id__traces_aggregated_post
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            format: uuid4
            title: Project Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AggregatedTraceViewRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AggregatedTraceViewResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
        - OAuth2PasswordBearer: []
        - HTTPBasic: []
components:
  schemas:
    AggregatedTraceViewRequest:
      properties:
        log_stream_id:
          type: string
          format: uuid4
          title: Log Stream Id
          description: Log stream id associated with the traces.
        filters:
          items:
            oneOf:
              - $ref: '#/components/schemas/LogRecordsIDFilter'
              - $ref: '#/components/schemas/LogRecordsDateFilter'
              - $ref: '#/components/schemas/LogRecordsNumberFilter'
              - $ref: '#/components/schemas/LogRecordsBooleanFilter'
              - $ref: '#/components/schemas/LogRecordsCollectionFilter'
              - $ref: '#/components/schemas/LogRecordsTextFilter'
              - $ref: '#/components/schemas/LogRecordsFullyAnnotatedFilter'
            discriminator:
              propertyName: type
              mapping:
                boolean:
                  $ref: '#/components/schemas/LogRecordsBooleanFilter'
                collection:
                  $ref: '#/components/schemas/LogRecordsCollectionFilter'
                date:
                  $ref: '#/components/schemas/LogRecordsDateFilter'
                fully_annotated:
                  $ref: '#/components/schemas/LogRecordsFullyAnnotatedFilter'
                id:
                  $ref: '#/components/schemas/LogRecordsIDFilter'
                number:
                  $ref: '#/components/schemas/LogRecordsNumberFilter'
                text:
                  $ref: '#/components/schemas/LogRecordsTextFilter'
          type: array
          title: Filters
          description: >-
            Filters to apply on the traces. Note: Only trace-level filters are
            supported.
      type: object
      required:
        - log_stream_id
      title: AggregatedTraceViewRequest
    AggregatedTraceViewResponse:
      properties:
        graph:
          $ref: '#/components/schemas/AggregatedTraceViewGraph'
        num_traces:
          type: integer
          title: Num Traces
          description: Number of traces in the aggregated view
        num_sessions:
          type: integer
          title: Num Sessions
          description: Number of sessions in the aggregated view
        start_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Start Time
          description: created_at of earliest record of the aggregated view
        end_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: End Time
          description: created_at of latest record of the aggregated view
        has_all_traces:
          type: boolean
          title: Has All Traces
          description: Whether all traces were returned
      type: object
      required:
        - graph
        - num_traces
        - num_sessions
        - has_all_traces
      title: AggregatedTraceViewResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    LogRecordsIDFilter:
      properties:
        column_id:
          type: string
          title: Column Id
          description: ID of the column to filter.
        operator:
          type: string
          enum:
            - eq
            - ne
            - one_of
            - not_in
            - contains
          title: Operator
          default: eq
        value:
          anyOf:
            - type: string
              format: uuid4
            - items:
                anyOf:
                  - type: string
                    format: uuid4
                  - type: string
              type: array
            - type: string
          title: Value
        type:
          type: string
          const: id
          title: Type
          default: id
      type: object
      required:
        - column_id
        - value
      title: LogRecordsIDFilter
    LogRecordsDateFilter:
      properties:
        column_id:
          type: string
          title: Column Id
          description: ID of the column to filter.
        operator:
          type: string
          enum:
            - eq
            - ne
            - gt
            - gte
            - lt
            - lte
          title: Operator
        value:
          type: string
          format: date-time
          title: Value
        type:
          type: string
          const: date
          title: Type
          default: date
      type: object
      required:
        - column_id
        - operator
        - value
      title: LogRecordsDateFilter
    LogRecordsNumberFilter:
      properties:
        column_id:
          type: string
          title: Column Id
          description: ID of the column to filter.
        operator:
          type: string
          enum:
            - eq
            - ne
            - gt
            - gte
            - lt
            - lte
            - between
          title: Operator
        value:
          anyOf:
            - type: integer
            - type: number
            - items:
                type: integer
              type: array
            - items:
                type: number
              type: array
          title: Value
        type:
          type: string
          const: number
          title: Type
          default: number
      type: object
      required:
        - column_id
        - operator
        - value
      title: LogRecordsNumberFilter
    LogRecordsBooleanFilter:
      properties:
        column_id:
          type: string
          title: Column Id
          description: ID of the column to filter.
        operator:
          type: string
          enum:
            - eq
            - ne
          title: Operator
          default: eq
        value:
          type: boolean
          title: Value
        type:
          type: string
          const: boolean
          title: Type
          default: boolean
      type: object
      required:
        - column_id
        - value
      title: LogRecordsBooleanFilter
    LogRecordsCollectionFilter:
      properties:
        column_id:
          type: string
          title: Column Id
          description: ID of the column to filter.
        operator:
          type: string
          enum:
            - eq
            - contains
            - one_of
            - not_in
          title: Operator
        value:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
          title: Value
        case_sensitive:
          type: boolean
          title: Case Sensitive
          default: true
        type:
          type: string
          const: collection
          title: Type
          default: collection
      type: object
      required:
        - column_id
        - operator
        - value
      title: LogRecordsCollectionFilter
    LogRecordsTextFilter:
      properties:
        column_id:
          type: string
          title: Column Id
          description: ID of the column to filter.
        operator:
          type: string
          enum:
            - eq
            - ne
            - contains
            - one_of
            - not_in
          title: Operator
        value:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
          title: Value
        case_sensitive:
          type: boolean
          title: Case Sensitive
          default: true
        type:
          type: string
          const: text
          title: Type
          default: text
      type: object
      required:
        - column_id
        - operator
        - value
      title: LogRecordsTextFilter
    LogRecordsFullyAnnotatedFilter:
      properties:
        column_id:
          type: string
          const: fully_annotated
          title: Column Id
          description: >-
            Queue-scoped filter identifier. This filter only works for
            annotation-queue searches that provide queue context.
          default: fully_annotated
        type:
          type: string
          const: fully_annotated
          title: Type
          default: fully_annotated
        user_ids:
          anyOf:
            - items:
                type: string
                format: uuid4
              type: array
              minItems: 1
            - type: 'null'
          title: User Ids
          description: >-
            Optional queue member IDs to require for full annotation in a
            queue-scoped search. If omitted, all tracked queue members visible
            to the requester are used.
      type: object
      title: LogRecordsFullyAnnotatedFilter
      description: Queue-scoped filter for records rated across all queue templates.
    AggregatedTraceViewGraph:
      properties:
        nodes:
          items:
            $ref: '#/components/schemas/AggregatedTraceViewNode'
          type: array
          title: Nodes
        edges:
          items:
            $ref: '#/components/schemas/AggregatedTraceViewEdge'
          type: array
          title: Edges
        edge_occurrences_histogram:
          anyOf:
            - $ref: '#/components/schemas/Histogram'
            - type: 'null'
          description: Histogram of edge occurrence counts across the graph
      type: object
      required:
        - nodes
        - edges
      title: AggregatedTraceViewGraph
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    AggregatedTraceViewNode:
      properties:
        id:
          type: string
          title: Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        type:
          $ref: '#/components/schemas/StepType'
        occurrences:
          type: integer
          title: Occurrences
        parent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Id
        has_children:
          type: boolean
          title: Has Children
        metrics:
          additionalProperties:
            $ref: '#/components/schemas/SystemMetricInfo'
          type: object
          title: Metrics
        trace_count:
          type: integer
          title: Trace Count
        weight:
          type: number
          title: Weight
        insights:
          items:
            $ref: '#/components/schemas/InsightSummary'
          type: array
          title: Insights
      type: object
      required:
        - id
        - name
        - type
        - occurrences
        - has_children
        - metrics
        - trace_count
        - weight
      title: AggregatedTraceViewNode
    AggregatedTraceViewEdge:
      properties:
        source:
          type: string
          title: Source
        target:
          type: string
          title: Target
        weight:
          type: number
          title: Weight
        occurrences:
          type: integer
          title: Occurrences
        trace_count:
          type: integer
          title: Trace Count
        trace_ids:
          items:
            type: string
            format: uuid4
          type: array
          title: Trace Ids
      type: object
      required:
        - source
        - target
        - weight
        - occurrences
        - trace_count
        - trace_ids
      title: AggregatedTraceViewEdge
    Histogram:
      properties:
        strategy:
          $ref: '#/components/schemas/HistogramStrategy'
          description: The binning strategy used to create this histogram
        edges:
          items:
            type: number
          type: array
          title: Edges
          description: >-
            List of bin edges (monotonically increasing, length = number of
            buckets + 1)
        buckets:
          items:
            $ref: '#/components/schemas/HistogramBucket'
          type: array
          title: Buckets
          description: List of histogram buckets containing the binned data
        total:
          type: integer
          title: Total
          description: Total number of data points in the histogram
      type: object
      required:
        - strategy
        - edges
        - buckets
        - total
      title: Histogram
    StepType:
      type: string
      enum:
        - llm
        - retriever
        - tool
        - workflow
        - agent
        - control
        - trace
        - session
      title: StepType
    SystemMetricInfo:
      properties:
        name:
          type: string
          title: Name
          description: Unique identifier for the metric
        label:
          type: string
          title: Label
          description: Human-readable display name for the metric
        unit:
          anyOf:
            - $ref: '#/components/schemas/DataUnit'
            - type: 'null'
          description: Unit of measurement, if any
        values:
          items:
            type: number
          type: array
          title: Values
          description: Raw metric values used to compute statistics and histograms
        mean:
          anyOf:
            - type: number
            - type: 'null'
          title: Mean
          description: Arithmetic mean of the metric values
        median:
          anyOf:
            - type: number
            - type: 'null'
          title: Median
          description: Median (50th percentile) of the metric values
        p5:
          anyOf:
            - type: number
            - type: 'null'
          title: P5
          description: 5th percentile of the metric values
        p25:
          anyOf:
            - type: number
            - type: 'null'
          title: P25
          description: 25th percentile (first quartile) of the metric values
        p75:
          anyOf:
            - type: number
            - type: 'null'
          title: P75
          description: 75th percentile (third quartile) of the metric values
        p95:
          anyOf:
            - type: number
            - type: 'null'
          title: P95
          description: 95th percentile of the metric values
        min:
          anyOf:
            - type: number
            - type: 'null'
          title: Min
          description: Minimum value in the metric dataset
        max:
          anyOf:
            - type: number
            - type: 'null'
          title: Max
          description: Maximum value in the metric dataset
        histogram:
          anyOf:
            - $ref: '#/components/schemas/Histogram'
            - type: 'null'
          description: Histogram representation of the metric distribution
      type: object
      required:
        - name
        - label
      title: SystemMetricInfo
    InsightSummary:
      properties:
        id:
          type: string
          format: uuid4
          title: Id
        title:
          type: string
          title: Title
        observation:
          type: string
          title: Observation
        details:
          type: string
          title: Details
        suggested_action:
          type: string
          title: Suggested Action
        priority:
          type: integer
          title: Priority
        priority_category:
          anyOf:
            - type: string
              enum:
                - error
                - warning
                - info
            - type: 'null'
          title: Priority Category
      type: object
      required:
        - id
        - title
        - observation
        - details
        - suggested_action
        - priority
      title: InsightSummary
    HistogramStrategy:
      type: string
      enum:
        - fixed
        - trimmed
        - quantile
      title: HistogramStrategy
    HistogramBucket:
      properties:
        lower:
          type: number
          title: Lower
          description: Lower bound of the histogram bucket (inclusive)
        upper:
          type: number
          title: Upper
          description: >-
            Upper bound of the histogram bucket (exclusive, but inclusive for
            the last bucket)
        count:
          type: integer
          title: Count
          description: Number of data points that fall within this bucket
      type: object
      required:
        - lower
        - upper
        - count
      title: HistogramBucket
    DataUnit:
      type: string
      enum:
        - percentage
        - nano_seconds
        - milli_seconds
        - dollars
        - count_and_total
      title: DataUnit
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: Galileo-API-Key
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: https://api.galileo.ai/login
    HTTPBasic:
      type: http
      scheme: basic

````