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

# Get Session Analytics

> Time-series session statistics.

Auth: `Bearer` + `X-Project-ID` | `X-API-Key` + `X-Project-Name`



## OpenAPI

````yaml /openapi.json get /sessions/analytics
openapi: 3.1.0
info:
  title: PandaProbe API
  description: >-
    Open-source agent engineering platform — trace LLM calls, evaluate agent
    performance, and monitor AI pipelines.
  version: 0.1.0
  contact:
    name: PandaProbe
    url: https://www.pandaprobe.com
    email: support@pandaprobe.com
servers:
  - url: https://api.pandaprobe.com
    description: Production
security: []
tags:
  - name: health
    description: Service health and readiness probes.
  - name: user
    description: Authenticated user profile.
  - name: traces
    description: Trace ingestion, querying, updating, and analytics.
  - name: sessions
    description: Session-based trace aggregation and analytics.
  - name: evaluations
    description: Evaluation runs, scores, analytics, and monitoring.
  - name: organizations
    description: Organization management and membership.
  - name: projects
    description: Project CRUD within organizations.
  - name: api-keys
    description: API key lifecycle management.
paths:
  /sessions/analytics:
    get:
      tags:
        - sessions
      summary: Get Session Analytics
      description: |-
        Time-series session statistics.

        Auth: `Bearer` + `X-Project-ID` | `X-API-Key` + `X-Project-Name`
      operationId: get_session_analytics_sessions_analytics_get
      parameters:
        - name: granularity
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/AnalyticsGranularity'
            default: day
        - name: started_after
          in: query
          required: true
          schema:
            type: string
            format: date-time
            title: Started After
        - name: started_before
          in: query
          required: true
          schema:
            type: string
            format: date-time
            title: Started Before
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SessionAnalyticsBucket'
                title: Response Get Session Analytics Sessions Analytics Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
        - ApiKey: []
        - ProjectID: []
        - ProjectName: []
components:
  schemas:
    AnalyticsGranularity:
      type: string
      enum:
        - hour
        - day
        - week
      title: AnalyticsGranularity
      description: Time-bucket granularity for analytics queries.
    SessionAnalyticsBucket:
      properties:
        bucket:
          type: string
          title: Bucket
        session_count:
          type: integer
          title: Session Count
          default: 0
        avg_traces_per_session:
          anyOf:
            - type: number
            - type: 'null'
          title: Avg Traces Per Session
        avg_session_duration_ms:
          anyOf:
            - type: number
            - type: 'null'
          title: Avg Session Duration Ms
      type: object
      required:
        - bucket
      title: SessionAnalyticsBucket
      description: Time-bucketed session statistics.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
    ApiKey:
      type: apiKey
      in: header
      name: X-API-Key
    ProjectID:
      type: apiKey
      in: header
      name: X-Project-ID
    ProjectName:
      type: apiKey
      in: header
      name: X-Project-Name

````