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

# Durations



## OpenAPI

````yaml get /api/analytics/duration-distribution
openapi: 3.1.0
info:
  title: Axion Backend API
  description: Backend API for Axion platform with desktop automation capabilities
  version: 1.0.0
servers:
  - url: https://api.getgranite.ai
    description: Production server
  - url: http://localhost:8000
    description: Local development server
security: []
tags:
  - name: Authentication
    description: User authentication and session management
  - name: Organizations
    description: Organization management and membership
  - name: Health
    description: API health and status monitoring
  - name: Automations
    description: Automation planning and execution
  - name: MIG
    description: Managed Instance Group operations
  - name: Agent
    description: Agent execution and streaming
  - name: Onboarding
    description: Organization onboarding flow
  - name: Organization Automations
    description: Organization automation endpoint management
  - name: Organization Endpoints
    description: Public endpoints for organization automations
  - name: Analytics
    description: Analytics and reporting endpoints
paths:
  /api/analytics/duration-distribution:
    get:
      tags:
        - Analytics
      summary: Get execution duration distribution
      operationId: getDurationDistribution
      parameters:
        - name: start_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Start Date
        - name: end_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: End Date
        - name: workflow_name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Workflow Name
        - name: bucket_size_ms
          in: query
          required: false
          schema:
            type: integer
            maximum: 60000
            minimum: 1000
            default: 5000
            title: Bucket Size Ms
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DurationDistributionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    DurationDistributionResponse:
      properties:
        stats:
          $ref: '#/components/schemas/DurationStats'
        histogram:
          items:
            $ref: '#/components/schemas/DurationHistogramBucket'
          type: array
          title: Histogram
      type: object
      required:
        - stats
      title: DurationDistributionResponse
      description: Response for duration distribution.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DurationStats:
      properties:
        total:
          type: integer
          title: Total
          default: 0
        avg_ms:
          type: number
          title: Avg Ms
          default: 0
        min_ms:
          type: integer
          title: Min Ms
          default: 0
        max_ms:
          type: integer
          title: Max Ms
          default: 0
        p50_ms:
          type: number
          title: P50 Ms
          default: 0
        p75_ms:
          type: number
          title: P75 Ms
          default: 0
        p90_ms:
          type: number
          title: P90 Ms
          default: 0
        p95_ms:
          type: number
          title: P95 Ms
          default: 0
        p99_ms:
          type: number
          title: P99 Ms
          default: 0
      type: object
      title: DurationStats
      description: Duration statistics.
    DurationHistogramBucket:
      properties:
        bucket_start_ms:
          type: integer
          title: Bucket Start Ms
        bucket_end_ms:
          type: integer
          title: Bucket End Ms
        count:
          type: integer
          title: Count
      type: object
      required:
        - bucket_start_ms
        - bucket_end_ms
        - count
      title: DurationHistogramBucket
      description: Duration histogram bucket.
    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

````