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

# List Test Plan Executions

> Retrieve a paginated list of test plan executions for your project.

<Info>
  **Permission Required**: `project:read-runs`
</Info>

Retrieve a paginated list of test plan executions for your project.

## Query Parameters

<ParamField query="test_plan_id" type="string">
  Filter by test plan ID
</ParamField>

<ParamField query="build_id" type="string">
  Filter by build ID
</ParamField>

<ParamField query="status" type="string">
  Filter by execution status: `completed`, `in_progress`, or `queued`
</ParamField>

<ParamField query="sort_by" type="string" default="start_time">
  Field to sort by: `start_time`, `test_plan_name`, or `build_name`
</ParamField>

<ParamField query="sort_order" type="string" default="desc">
  Sort direction: `asc` or `desc`
</ParamField>

<ParamField query="page" type="integer" default="0">
  Page number (0-indexed)
</ParamField>

<ParamField query="page_size" type="integer" default="20">
  Results per page (1-100)
</ParamField>

## Response

<ResponseField name="data" type="TestPlanExecutionSummary[]" required>
  Array of test plan execution summary objects
</ResponseField>

<ResponseField name="pagination" type="object" required>
  Pagination information

  <Expandable title="pagination properties">
    <ResponseField name="pagination.page" type="integer">
      Current page number
    </ResponseField>

    <ResponseField name="pagination.page_size" type="integer">
      Results per page
    </ResponseField>

    <ResponseField name="pagination.total_count" type="integer">
      Total number of executions
    </ResponseField>

    <ResponseField name="pagination.total_pages" type="integer">
      Total number of pages
    </ResponseField>
  </Expandable>
</ResponseField>

### TestPlanExecutionSummary Object

<ResponseField name="id" type="string" required>
  Execution ID
</ResponseField>

<ResponseField name="test_plan_id" type="string">
  ID of the test plan that was executed
</ResponseField>

<ResponseField name="test_plan_name" type="string">
  Name of the test plan
</ResponseField>

<ResponseField name="build_id" type="string">
  ID of the build used
</ResponseField>

<ResponseField name="build_name" type="string">
  Name of the build used
</ResponseField>

<ResponseField name="status" type="string" required>
  Current execution status: `completed`, `in_progress`, or `queued`
</ResponseField>

<ResponseField name="started_at" type="string">
  ISO 8601 timestamp when the execution started
</ResponseField>

<ResponseField name="started_by" type="string">
  Who started the execution
</ResponseField>

<ResponseField name="completed_at" type="string">
  ISO 8601 timestamp when the execution completed
</ResponseField>

<ResponseField name="total_tests" type="integer" required>
  Total number of tests in this execution
</ResponseField>

<ResponseField name="test_status" type="object" required>
  Breakdown of test statuses

  <Expandable title="test_status properties">
    <ResponseField name="test_status.passed" type="integer">
      Number of passed tests
    </ResponseField>

    <ResponseField name="test_status.failed" type="integer">
      Number of failed tests
    </ResponseField>

    <ResponseField name="test_status.stopped" type="integer">
      Number of stopped tests
    </ResponseField>

    <ResponseField name="test_status.queued" type="integer">
      Number of queued tests
    </ResponseField>

    <ResponseField name="test_status.running" type="integer">
      Number of currently running tests
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="duration_ms" type="number">
  Total execution duration in milliseconds
</ResponseField>

<RequestExample>
  ```bash cURL theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
  curl -X GET "https://nunu.ai/api/v1/project/your-project-id/test-plan-executions?status=completed&page=0&page_size=10" \
    -H "X-Api-Key: YOUR_API_TOKEN"
  ```

  ```typescript JavaScript theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
  const response = await fetch(
    "https://nunu.ai/api/v1/project/your-project-id/test-plan-executions?status=completed&page=0&page_size=10",
    {
      headers: {
        "X-Api-Key": process.env.NUNU_API_TOKEN,
      },
    }
  );
  const data = await response.json();
  ```

  ```python Python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
  import requests
  import os

  response = requests.get(
      "https://nunu.ai/api/v1/project/your-project-id/test-plan-executions",
      headers={"X-Api-Key": os.environ["NUNU_API_TOKEN"]},
      params={"status": "completed", "page": 0, "page_size": 10}
  )
  data = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
  {
    "data": [
      {
        "id": "e1f2a3b4-5c6d-7e8f-9a0b-1c2d3e4f5a6b",
        "test_plan_id": "b3f1a2c4-5d6e-7f8a-9b0c-1d2e3f4a5b6c",
        "test_plan_name": "Smoke Tests",
        "build_id": "d4e5f6a7-8b9c-0d1e-2f3a-4b5c6d7e8f9a",
        "build_name": "v2.1.0-rc1",
        "status": "completed",
        "started_at": "2026-03-20T08:00:00.000000+00:00",
        "started_by": "user@example.com",
        "completed_at": "2026-03-20T08:15:30.000000+00:00",
        "total_tests": 5,
        "test_status": {
          "passed": 4,
          "failed": 1,
          "stopped": 0,
          "queued": 0,
          "running": 0
        },
        "duration_ms": 930000
      }
    ],
    "pagination": {
      "page": 0,
      "page_size": 10,
      "total_count": 1,
      "total_pages": 1
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml GET /project/{projectId}/test-plan-executions
openapi: 3.1.0
info:
  title: nunu.ai API
  description: >-
    The nunu.ai Public API allows you to programmatically interact with your
    projects, manage test runs, and upload builds.
  version: 1.0.0
servers:
  - url: https://nunu.ai/api/v1
security:
  - apiKeyAuth: []
paths:
  /project/{projectId}/test-plan-executions:
    parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
        description: >-
          The project ID. You can copy it from the project settings page or the
          project URL in the dashboard.
    get:
      tags:
        - Test Plans
      summary: List Test Plan Executions
      description: Retrieve a paginated list of test plan executions for your project.
      operationId: listTestPlanExecutions
      parameters:
        - name: test_plan_id
          in: query
          description: Filter by test plan ID
          schema:
            type: string
            format: uuid
        - name: build_id
          in: query
          description: Filter by build ID
          schema:
            type: string
            format: uuid
        - name: status
          in: query
          description: Filter by execution status
          schema:
            type: string
            enum:
              - completed
              - in_progress
              - queued
        - name: sort_by
          in: query
          description: Field to sort by
          schema:
            type: string
            enum:
              - start_time
              - test_plan_name
              - build_name
            default: start_time
        - name: sort_order
          in: query
          description: Sort direction
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
        - name: page
          in: query
          description: Page number (0-indexed)
          schema:
            type: integer
            default: 0
        - name: page_size
          in: query
          description: Results per page (1-100)
          schema:
            type: integer
            default: 20
            minimum: 1
            maximum: 100
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListTestPlanExecutionsResponse'
        '401':
          description: Unauthorized - Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden - API key lacks required permission
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ListTestPlanExecutionsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/TestPlanExecutionSummary'
        pagination:
          type: object
          properties:
            page:
              type: integer
            page_size:
              type: integer
            total_count:
              type: integer
            total_pages:
              type: integer
    Error:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
        details:
          type: object
    TestPlanExecutionSummary:
      type: object
      properties:
        id:
          type: string
          description: Execution ID
        test_plan_id:
          type: string
          format: uuid
          nullable: true
          description: ID of the test plan that was executed
        test_plan_name:
          type: string
          nullable: true
          description: Name of the test plan
        build_id:
          type: string
          format: uuid
          nullable: true
          description: ID of the build used
        build_name:
          type: string
          nullable: true
          description: Name of the build used
        status:
          type: string
          enum:
            - completed
            - in_progress
            - queued
          description: Current execution status
        started_at:
          type: string
          format: date-time
          nullable: true
        started_by:
          nullable: true
          description: Who started the execution
        completed_at:
          type: string
          format: date-time
          nullable: true
        total_tests:
          type: integer
          description: Total number of tests in this execution
        test_status:
          $ref: '#/components/schemas/TestPlanExecutionTestStatus'
        duration_ms:
          type: number
          nullable: true
          description: Total execution duration in milliseconds
    TestPlanExecutionTestStatus:
      type: object
      properties:
        passed:
          type: integer
        failed:
          type: integer
        stopped:
          type: integer
        queued:
          type: integer
        running:
          type: integer
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key
      description: API key for authentication

````