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

# Get Campaign Traffic Stats

> Inspect execution statistics for the campaign's assigned workflow variants. A traffic allocation describes intended distribution rather than a guarantee that every variant has completed calls.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/campaign/{campaign_id}/traffic-stats
openapi: 3.1.0
info:
  title: Athena API
  version: 1.0.0
  description: >-
    Hosted Athena customer API. Authenticate backend management and call-trigger
    requests with X-API-Key. Website embeds and artifact playback use their own
    scoped tokens. Provider availability, feature settings, and verification
    limits are described in the guides.
servers:
  - url: https://athena.tryopencomputer.com
    description: Hosted Athena API
security: []
paths:
  /api/v1/campaign/{campaign_id}/traffic-stats:
    get:
      tags:
        - Campaign
      summary: Get Campaign Traffic Stats
      description: >-
        Inspect execution statistics for the campaign's assigned workflow
        variants. A traffic allocation describes intended distribution rather
        than a guarantee that every variant has completed calls.
      operationId: >-
        get_campaign_traffic_stats_api_v1_campaign__campaign_id__traffic_stats_get
      parameters:
        - name: campaign_id
          in: path
          required: true
          schema:
            type: integer
            title: Campaign Id
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignTrafficStatsResponse'
        '401':
          description: Authentication is missing or invalid.
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
components:
  schemas:
    CampaignTrafficStatsResponse:
      properties:
        total_attempts:
          type: integer
          title: Total Attempts
        variants:
          items:
            $ref: '#/components/schemas/TrafficVariantStats'
          type: array
          title: Variants
      type: object
      required:
        - total_attempts
        - variants
      title: CampaignTrafficStatsResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TrafficVariantStats:
      properties:
        id:
          type: string
          title: Id
        workflow_id:
          type: integer
          title: Workflow Id
        workflow_name:
          type: string
          title: Workflow Name
        workflow_definition_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Workflow Definition Id
        version_number:
          anyOf:
            - type: integer
            - type: 'null'
          title: Version Number
        target_weight:
          anyOf:
            - type: integer
            - type: 'null'
          title: Target Weight
        attempts:
          type: integer
          title: Attempts
          default: 0
        completed:
          type: integer
          title: Completed
          default: 0
        actual_percentage:
          type: number
          title: Actual Percentage
          default: 0
        states:
          additionalProperties:
            type: integer
          type: object
          title: States
        outcomes:
          additionalProperties:
            type: integer
          type: object
          title: Outcomes
        definitions:
          items:
            $ref: '#/components/schemas/TrafficDefinitionStats'
          type: array
          title: Definitions
      type: object
      required:
        - id
        - workflow_id
        - workflow_name
        - workflow_definition_id
        - version_number
        - target_weight
      title: TrafficVariantStats
    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
    TrafficDefinitionStats:
      properties:
        definition_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Definition Id
        version_number:
          anyOf:
            - type: integer
            - type: 'null'
          title: Version Number
        attempts:
          type: integer
          title: Attempts
      type: object
      required:
        - definition_id
        - version_number
        - attempts
      title: TrafficDefinitionStats
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
    BearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.