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

# Get scenario participant analytics

> Returns a per-user performance table for a scenario with pagination and sorting.
Shows each participant's first score, best score, lift, rank, session count,
and total practice duration.




## OpenAPI

````yaml /api-reference/openapi.yaml get /scenarios/{scenario_id}/analytics/participants
openapi: 3.0.3
info:
  title: Exec API
  version: '1.0'
  description: >
    REST API for programmatic access to your Exec workspace.


    Use the Exec API to read workspace data, list members, retrieve group
    information,

    and create interactive scenario creation sessions.


    ## Authentication

    All requests require a valid API key passed in the Authorization header:

    ```

    Authorization: Bearer exec_live_...

    ```


    Create API keys in your workspace settings under **Settings > API**.
servers:
  - url: https://api.exec.com/rest/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Knowledge Hub - Folders
    x-group: Knowledge Hub
  - name: Knowledge Hub - Pages
    x-group: Knowledge Hub
  - name: Knowledge Hub - Sources
    x-group: Knowledge Hub
paths:
  /scenarios/{scenario_id}/analytics/participants:
    get:
      tags:
        - Scenarios
      summary: Get scenario participant analytics
      description: >
        Returns a per-user performance table for a scenario with pagination and
        sorting.

        Shows each participant's first score, best score, lift, rank, session
        count,

        and total practice duration.
      operationId: getScenarioAnalyticsParticipants
      parameters:
        - name: scenario_id
          in: path
          required: true
          description: Scenario identifier (UUID or slug)
          schema:
            type: string
        - name: user_ids
          in: query
          description: >-
            Comma-separated user IDs to filter by. When combined with
            user_emails, results are unioned (all matching users from either
            list are included).
          schema:
            type: string
        - name: user_emails
          in: query
          description: >-
            Comma-separated user email addresses to filter by. When combined
            with user_ids, results are unioned (all matching users from either
            list are included).
          schema:
            type: string
        - name: group_ids
          in: query
          description: Comma-separated workspace group IDs to filter by
          schema:
            type: string
        - name: start_date
          in: query
          description: ISO 8601 datetime — only include sessions on or after this date
          schema:
            type: string
            format: date-time
        - name: end_date
          in: query
          description: ISO 8601 datetime — only include sessions on or before this date
          schema:
            type: string
            format: date-time
        - name: exclude_system_users
          in: query
          description: >-
            Exclude sessions from system users (emails ending in @exec.com).
            Default false.
          schema:
            type: boolean
            default: false
        - name: sorting
          in: query
          description: Sort field. Prefix with `-` for descending order.
          schema:
            type: string
            default: '-best_score'
            enum:
              - best_score
              - '-best_score'
              - first_score
              - '-first_score'
              - lift_percentage
              - '-lift_percentage'
              - total_duration_seconds
              - '-total_duration_seconds'
              - session_count
              - '-session_count'
        - name: page
          in: query
          description: Page number (1-indexed)
          schema:
            type: integer
            default: 1
            minimum: 1
        - name: page_size
          in: query
          description: Number of results per page (max 100)
          schema:
            type: integer
            default: 50
            minimum: 1
            maximum: 100
      responses:
        '200':
          description: Per-user participant analytics
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ScenarioParticipantEntry'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
              example:
                data:
                  - user:
                      id: u1a2b3c4d5e6
                      email: jane@acme.com
                      first_name: Jane
                      last_name: Smith
                    session_count: 4
                    first_score: 55
                    first_rank: bronze
                    best_score: 88
                    best_rank: gold
                    lift_percentage: 33
                    total_duration_seconds: 1240
                pagination:
                  page: 1
                  page_size: 50
                  total_count: 1
                  total_pages: 1
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    ScenarioParticipantEntry:
      type: object
      description: Per-user performance data for a scenario.
      properties:
        user:
          $ref: '#/components/schemas/User'
        session_count:
          type: integer
          description: Number of sessions the user completed
        first_score:
          type: number
          nullable: true
          description: Score from the user's first attempt
        first_rank:
          type: string
          nullable: true
          enum:
            - gold
            - silver
            - bronze
            - unranked
          description: Rank from the first attempt
        best_score:
          type: number
          nullable: true
          description: User's highest score
        best_rank:
          type: string
          nullable: true
          enum:
            - gold
            - silver
            - bronze
            - unranked
          description: Rank from the best score
        lift_percentage:
          type: number
          nullable: true
          description: Improvement from first to best score
        total_duration_seconds:
          type: number
          description: Total practice time in seconds
    Pagination:
      type: object
      properties:
        page:
          type: integer
          description: Current page number
        page_size:
          type: integer
          description: Number of items per page
        total_count:
          type: integer
          description: Total number of items
        total_pages:
          type: integer
          description: Total number of pages
    User:
      type: object
      properties:
        id:
          type: string
          description: Unique user identifier
        email:
          type: string
          format: email
          description: User's email address
        first_name:
          type: string
          description: User's first name
        last_name:
          type: string
          description: User's last name
    ValidationErrorDetail:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              description: Error category (e.g., "invalid_request")
            code:
              type: string
              description: Specific error code (e.g., "user_not_found")
            message:
              type: string
              description: Human-readable error message
  responses:
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationErrorDetail'
          example:
            error:
              type: authentication_error
              code: invalid_api_key
              message: Invalid or inactive API key
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationErrorDetail'
          example:
            error:
              type: not_found
              message: 'Scenario not found: abc123'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |
        API key created in Settings > API.

        Format: `exec_live_` followed by 40 alphanumeric characters.

````