# phi.run_admin

Delete or restore runs as an organization admin.

## phi.run_admin.delete

Only an organization admin can use this.

```python
phi.run_admin.delete(run_ids=run_ids)
```

Returns `RunDeleteResult`.

| Parameter | Type | Default | Required |
|---|---|---|---|
| `run_ids` | `Sequence[str \| uuid.UUID]` |  | Required |
| `dry_run` | `bool` | `False` | Optional |

### RunDeleteResult fields and schema

```json
{
  "type": "object",
  "required": [
    "affected_run_ids",
    "dry_run"
  ],
  "properties": {
    "affected_run_ids": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid"
      }
    },
    "dry_run": {
      "type": "boolean"
    }
  }
}
```

## phi.run_admin.restore

Only an organization admin can use this.

```python
phi.run_admin.restore(run_ids=run_ids)
```

Returns `RunRestoreResult`.

| Parameter | Type | Required |
|---|---|---|
| `run_ids` | `Sequence[str \| uuid.UUID]` | Required |

### RunRestoreResult fields and schema

```json
{
  "type": "object",
  "required": [
    "affected_run_ids"
  ],
  "properties": {
    "affected_run_ids": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid"
      }
    }
  }
}
```


---
Source: https://dynophi.com/docs/sdk/run_admin. From the installed client, phi 0.4.2, 2026-11-23.
