# List Clean Room Notebook Task Runs

Launch stage: GA

`GET /api/2.0/clean-rooms/{clean_room_name}/runs`

List all the historical notebook task runs in a clean room.

API scopes: cleanrooms

## Path parameters

- `clean_room_name` (string, optional)
  Name of the clean room.

## Query parameters

- `notebook_name` (string, optional)
  Notebook name
- `page_size` (int32, optional)
  The maximum number of task runs to return. Currently ignored - all runs will be returned.
- `page_token` (string, optional)
  Opaque pagination token to go to next page based on previous query.

## Returns

- `runs` (array of object, optional)
  Name of the clean room.
  - `notebook_name` (string, optional)
    Asset name of the notebook executed in this task run.
  - `start_time` (int64, optional)
    When the task run started, in epoch milliseconds.
  - `run_duration` (int64, optional)
    Duration of the task run, in milliseconds.
  - `notebook_job_run_state` (object, optional)
    State of the task run.
    - `life_cycle_state` (string, optional)
      A value indicating the run's current lifecycle state. This field is always available in the response. Note: Additional states might be introduced in future releases.
      Possible values: `RUN_LIFE_CYCLE_STATE_UNSPECIFIED`, `PENDING`, `RUNNING`, `TERMINATING`, `TERMINATED`, `SKIPPED`, `INTERNAL_ERROR`, `BLOCKED`, `WAITING_FOR_RETRY`, `QUEUED`
    - `result_state` (string, optional)
      A value indicating the run's result. This field is only available for terminal lifecycle states. Note: Additional states might be introduced in future releases.
      Possible values: `RUN_RESULT_STATE_UNSPECIFIED`, `SUCCESS`, `FAILED`, `TIMEDOUT`, `CANCELED`, `MAXIMUM_CONCURRENT_RUNS_REACHED`, `UPSTREAM_CANCELED`, `UPSTREAM_FAILED`, `EXCLUDED`, `EVICTED`, `SUCCESS_WITH_FAILURES`, `UPSTREAM_EVICTED`, `DISABLED`
  - `collaborator_job_run_info` (object, optional)
    Job run info of the task in the runner's local workspace.
     This field is only included in the LIST API.
     if the task was run within the same workspace the API is being called.
     If the task run was in a different workspace under the same metastore, only the workspace_id is included.
    - `collaborator_job_id` (int64, optional)
      Job ID of the task run in the collaborator's workspace.
    - `collaborator_job_run_id` (int64, optional)
      Job run ID of the task run in the collaborator's workspace.
    - `collaborator_task_run_id` (int64, optional)
      Task run ID of the task run in the collaborator's workspace.
    - `collaborator_workspace_id` (int64, optional)
      ID of the collaborator's workspace that triggered the task run.
    - `collaborator_alias` (string, optional)
      Alias of the collaborator that triggered the task run.
  - `output_schema_name` (string, optional)
    Name of the output schema associated with the clean rooms notebook task run.
  - `output_schema_expiration_time` (int64, optional)
    Expiration time of the output schema of the task run (if any), in epoch milliseconds.
  - `notebook_etag` (string, optional)
    Etag of the notebook executed in this task run, used to identify the notebook version.
  - `notebook_updated_at` (int64, optional)
    The timestamp of when the notebook was last updated.
  - `shared_output_schema_name` (string, optional, Public Preview)
    Name of the shared output schema associated with the clean rooms notebook task run.
     This schema is accessible by all collaborators when enable_shared_output is true.
  - `shared_output_schema_expiration_time` (int64, optional, Public Preview)
    Expiration time of the shared output schema of the task run (if any), in epoch milliseconds.
- `next_page_token` (string, optional)
  Opaque token to retrieve the next page of results. Absent if there are no more pages.
   page_token should be set to this value for the next request (for the next page of results).

## Response

```json
{
  "runs": [
    {
      "notebook_name": "string",
      "start_time": 0,
      "run_duration": 0,
      "notebook_job_run_state": {},
      "collaborator_job_run_info": {},
      "output_schema_name": "string",
      "output_schema_expiration_time": 0,
      "notebook_etag": "string",
      "notebook_updated_at": 0,
      "shared_output_schema_name": "string",
      "shared_output_schema_expiration_time": 0
    }
  ],
  "next_page_token": "string"
}
```

