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

> Retrieve a paginated list of runs for your project.

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

Retrieve a paginated list of runs for your project.

## Query Parameters

<ParamField query="state" type="string" default="all">
  Filter by state: `running`, `completed`, or `all`
</ParamField>

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

<ParamField query="job_id" type="string">
  Filter by job ID
</ParamField>

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

<ParamField query="test_type" type="string">
  Filter by test type (e.g., `verification`)
</ParamField>

<ParamField query="tags" type="string">
  Filter by tags (comma-separated). All specified tags must match. Example: `tags=nightly,regression`
</ParamField>

<ParamField query="bugs" type="boolean">
  Filter by runs that found bugs (`bugs=true` returns runs where `bug_info.bug_count > 0`)
</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="Run[]" required>
  Array of run 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 runs
    </ResponseField>

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

### Run Object

<ResponseField name="multiplayer_run_id" type="string" required>
  Unique identifier for the run (12 lowercase alphanumeric chars)
</ResponseField>

<ResponseField name="job_id" type="string" required>
  Job identifier that created this run
</ResponseField>

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

<ResponseField name="state" type="string" required>
  Current state: `initializing`, `running`, or `completed`
</ResponseField>

<ResponseField name="result" type="string">
  Result: `success`, `failure`, `error`, or `null` if not completed
</ResponseField>

<ResponseField name="bug_info" type="object">
  Bug summary (for verification tests only)

  <Expandable title="bug_info properties">
    <ResponseField name="bug_info.bug_label" type="string">
      Bug label classification
    </ResponseField>

    <ResponseField name="bug_info.bug_count" type="integer">
      Number of bugs found
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="test" type="object" required>
  Test information

  <Expandable title="test properties">
    <ResponseField name="test.id" type="string">
      Test ID
    </ResponseField>

    <ResponseField name="test.name" type="string">
      Test name
    </ResponseField>

    <ResponseField name="test.type" type="string">
      Test type (e.g., `verification`)
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="build" type="object">
  Build used for the run

  <Expandable title="build properties">
    <ResponseField name="build.id" type="string">
      Build ID
    </ResponseField>

    <ResponseField name="build.name" type="string">
      Build name
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="created_at" type="string" required>
  ISO 8601 timestamp when run was created
</ResponseField>

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

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

<ResponseField name="duration_ms" type="integer">
  Run duration in milliseconds
</ResponseField>

<ResponseField name="initiator" type="object" required>
  Who/what started the run
</ResponseField>

<ResponseField name="tags" type="string[]">
  Tags assigned to the run
</ResponseField>

<ResponseField name="players" type="Player[]" required>
  Individual player runs (for multiplayer tests)
</ResponseField>

<RequestExample>
  ```bash cURL theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
  curl -X GET "https://nunu.ai/api/v1/project/your-project-id/runs?state=completed&tags=nightly&bugs=true&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/runs?state=completed&tags=nightly&bugs=true&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/runs",
      headers={"X-Api-Key": os.environ["NUNU_API_TOKEN"]},
      params={"state": "completed", "tags": "nightly", "bugs": True, "page": 0, "page_size": 10}
  )
  data = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
  {
    "data": [
      {
        "job_id": "f80f6230-3a4f-431a-9d54-d11b867fed4e",
        "multiplayer_run_id": "lkkg6t5612m",
        "project_id": "test",
        "state": "COMPLETED",
        "result": "SUCCESS",
        "bug_info": null,
        "test": {
          "id": "a5060a07-d386-4269-98ce-b33fb894201e",
          "name": "sanity test",
          "type": "verification"
        },
        "build": null,
        "created_at": "2026-03-03T15:50:23.601012+00:00",
        "started_at": "2026-03-03T15:50:23.601048+00:00",
        "completed_at": "2026-03-03T15:54:24.261038+00:00",
        "duration_ms": 240659.99,
        "initiator": {
          "type": "api",
          "value": { "key_id": "7f028653-0e85-4c37-87be-c59976796155" }
        },
        "tags": ["nightly"],
        "players": [
          {
            "id": "lkkg6t5612m-1",
            "state": "COMPLETED",
            "result": "SUCCESS",
            "player_number": 1,
            "test_name": "sanity test",
            "composite_test_id": "58207dda-e2ca-44bd-a4e2-82b81b3ea8fa",
            "step_count": 1,
            "completed_step_count": 1,
            "platform": {
              "kind": "android-native",
              "config": {
                "device": {
                  "name": "Pixel 8",
                  "os_version": "14"
                }
              }
            }
          }
        ]
      }
    ],
    "pagination": {
      "page": 0,
      "page_size": 10,
      "total_count": 501,
      "total_pages": 51
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml GET /project/{projectId}/runs
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}/runs:
    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:
        - Runs
      summary: List Runs
      description: Retrieve a paginated list of runs for your project.
      operationId: listRuns
      parameters:
        - name: state
          in: query
          description: Filter by state
          schema:
            type: string
            enum:
              - running
              - completed
              - all
            default: all
        - name: multiplayer_test_id
          in: query
          description: Filter by test ID
          schema:
            type: string
            format: uuid
        - name: job_id
          in: query
          description: Filter by job ID
          schema:
            type: string
            format: uuid
        - name: test_plan_execution_id
          in: query
          description: Filter by test plan execution ID
          schema:
            type: string
            format: uuid
        - name: test_type
          in: query
          description: Filter by test type (e.g., verification)
          schema:
            type: string
        - name: tags
          in: query
          description: Filter by tags (comma-separated). All specified tags must match.
          schema:
            type: string
        - name: bugs
          in: query
          description: >-
            Filter by runs that found bugs (true returns runs where bug_count >
            0)
          schema:
            type: boolean
        - 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/ListRunsResponse'
        '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:
    ListRunsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Run'
        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
    Run:
      type: object
      properties:
        job_id:
          type: string
          description: Job identifier that created this run
        multiplayer_run_id:
          type: string
          description: Unique identifier for the run (12 lowercase alphanumeric chars)
        project_id:
          type: string
          description: Project the run belongs to
        state:
          type: string
          enum:
            - initializing
            - running
            - completed
          description: Current state of the run
        result:
          type: string
          enum:
            - success
            - failure
            - error
          nullable: true
          description: Result of the run (null if not completed)
        bug_info:
          type: object
          nullable: true
          properties:
            bug_label:
              type: string
            bug_count:
              type: integer
        test:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
            type:
              type: string
        build:
          type: object
          nullable: true
          properties:
            id:
              type: string
            name:
              type: string
        created_at:
          type: string
          format: date-time
        started_at:
          type: string
          format: date-time
          nullable: true
        completed_at:
          type: string
          format: date-time
          nullable: true
        duration_ms:
          type: integer
          nullable: true
        initiator:
          type: object
          properties:
            type:
              type: string
            value:
              type: object
        tags:
          type: array
          items:
            type: string
        players:
          type: array
          items:
            $ref: '#/components/schemas/Player'
    Player:
      type: object
      properties:
        id:
          type: string
        state:
          type: string
        result:
          type: string
        player_number:
          type: integer
        test_name:
          type: string
        composite_test_id:
          type: string
        step_count:
          type: integer
        completed_step_count:
          type: integer
        platform:
          type: object
          properties:
            type:
              type: string
            device:
              type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key
      description: API key for authentication

````