> ## 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.

# Get Test Plan

> Retrieve a specific test plan by ID, including its test items.

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

Retrieve a specific test plan by ID, including its test items.

<RequestExample>
  ```bash cURL theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
  curl -X GET "https://nunu.ai/api/v1/project/your-project-id/test-plans/b3f1a2c4-5d6e-7f8a-9b0c-1d2e3f4a5b6c" \
    -H "X-Api-Key: YOUR_API_TOKEN"
  ```

  ```typescript JavaScript theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
  const testPlanId = "b3f1a2c4-5d6e-7f8a-9b0c-1d2e3f4a5b6c";

  const response = await fetch(`https://nunu.ai/api/v1/project/your-project-id/test-plans/${testPlanId}`, {
    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

  test_plan_id = "b3f1a2c4-5d6e-7f8a-9b0c-1d2e3f4a5b6c"

  response = requests.get(
      f"https://nunu.ai/api/v1/project/your-project-id/test-plans/{test_plan_id}",
      headers={"X-Api-Key": os.environ["NUNU_API_TOKEN"]}
  )
  data = response.json()
  ```
</RequestExample>

## Response

<ResponseField name="id" type="string" required>
  Unique identifier for the test plan
</ResponseField>

<ResponseField name="project_id" type="string" required>
  Project the test plan belongs to
</ResponseField>

<ResponseField name="name" type="string" required>
  Test plan name
</ResponseField>

<ResponseField name="created_at" type="string">
  ISO 8601 timestamp when the test plan was created
</ResponseField>

<ResponseField name="created_by" type="string">
  Who created the test plan
</ResponseField>

<ResponseField name="modified_at" type="string">
  ISO 8601 timestamp when the test plan was last modified
</ResponseField>

<ResponseField name="modified_by" type="string">
  Who last modified the test plan
</ResponseField>

<ResponseField name="slots" type="Slot[]" required>
  Extra deployment slots of a cross-platform test plan (empty for regular
  plans). Slots are read-only via the API and managed in the test plan editor;
  their indices key `slot_deployment_configs` on
  [Start Test Plan Run](/api-reference/test-plans/start-test-plan-run).

  <Expandable title="slot properties">
    <ResponseField name="slots[].index" type="integer">
      Slot index (2 or higher; slot 1 is the implicit default slot and is not
      listed here)
    </ResponseField>

    <ResponseField name="slots[].name" type="string">
      Optional display name. It is a label only; slots are addressed by index
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="default_slot_name" type="string">
  Optional display name of the implicit default slot (slot 1)
</ResponseField>

<ResponseField name="test_items" type="TestItem[]" required>
  Ordered list of tests in this plan

  <Expandable title="test item properties">
    <ResponseField name="test_items[].multiplayer_test_id" type="string">
      ID of the test
    </ResponseField>

    <ResponseField name="test_items[].retries" type="integer">
      Number of retries configured for this test item
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json 200 theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
  {
    "id": "b3f1a2c4-5d6e-7f8a-9b0c-1d2e3f4a5b6c",
    "project_id": "test",
    "name": "Smoke Tests",
    "created_at": "2026-03-01T10:00:00.000000+00:00",
    "created_by": "user@example.com",
    "modified_at": "2026-03-15T14:30:00.000000+00:00",
    "modified_by": "user@example.com",
    "slots": [
      {
        "index": 2,
        "name": "xbox"
      }
    ],
    "default_slot_name": "pc",
    "test_items": [
      {
        "multiplayer_test_id": "a5060a07-d386-4269-98ce-b33fb894201e",
        "retries": 0
      },
      {
        "multiplayer_test_id": "c7080b09-e498-5381-a0df-d55fb006413f",
        "retries": 2
      }
    ]
  }
  ```
</ResponseExample>


## OpenAPI

````yaml GET /project/{projectId}/test-plans/{testPlanId}
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-plans/{testPlanId}:
    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: Get Test Plan
      description: Retrieve a specific test plan by ID, including its test items.
      operationId: getTestPlan
      parameters:
        - name: testPlanId
          in: path
          required: true
          description: The test plan ID (UUID)
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestPlan'
        '401':
          description: Unauthorized - Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Test plan not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    TestPlan:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the test plan
        project_id:
          type: string
          format: uuid
          description: Project the test plan belongs to
        name:
          type: string
          description: Test plan name
        created_at:
          type: string
          format: date-time
          nullable: true
        created_by:
          type: string
          nullable: true
        modified_at:
          type: string
          format: date-time
          nullable: true
        modified_by:
          type: string
          nullable: true
        slots:
          type: array
          items:
            $ref: '#/components/schemas/TestPlanSlot'
          description: >-
            Extra deployment slots of a cross-platform test plan (read-only via
            the API; managed in the test plan editor). Their indices key
            `slot_deployment_configs` when starting the plan; slot 1 is the
            implicit default slot.
        default_slot_name:
          type: string
          nullable: true
          description: >-
            Optional display name of the implicit default slot (slot 1).
            Read-only via the API.
        test_items:
          type: array
          items:
            $ref: '#/components/schemas/TestPlanTestItem'
          description: Ordered list of tests in this plan
    Error:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
        details:
          type: object
    TestPlanSlot:
      type: object
      properties:
        index:
          type: integer
          description: >-
            Slot index (2 or higher; slot 1 is the implicit default slot and is
            not listed)
        name:
          type: string
          nullable: true
          description: >-
            Optional display name. Names are labels only; slots are addressed by
            index
    TestPlanTestItem:
      type: object
      properties:
        multiplayer_test_id:
          type: string
          format: uuid
          description: ID of the test to include in the plan
        retries:
          type: integer
          minimum: 0
          default: 0
          description: Number of retries for this test item
      required:
        - multiplayer_test_id
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key
      description: API key for authentication

````