---
sidebar:
  hidden: true
title: roboto.domain.dashboards.operations
---
## Module Contents

### CreateDashboardRequest

```python
class roboto.domain.dashboards.operations.CreateDashboardRequest(/, **data: Any)
```

`from roboto.domain.dashboards import CreateDashboardRequest`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/dashboards/operations.py#L17-L31)

Bases: `pydantic.BaseModel`

Request body for `POST /v1/metrics/dashboards/create`.

**Parameters**

- **data** (`Any`)

**Attributes**

- **CreateDashboardRequest.accessibility** (`roboto.domain.dashboards.record.DashboardAccessibility`): Whether the dashboard is org-wide or personal. The server derives `owner_principal_id` from this — the org principal for `organization`, the creator's user principal for `user` — and ownership is the stored source of truth; this field is not persisted separately.
- **CreateDashboardRequest.dashboard_definition** (`dict[str, Any]`): The dashboard definition as a JSON object. Stored verbatim and never interpreted by the platform; it carries its own schema version for the clients that read it.
- **CreateDashboardRequest.name** (`str`) = `None`: The name of the dashboard.

### UpdateDashboardRequest

```python
class roboto.domain.dashboards.operations.UpdateDashboardRequest(/, **data: Any)
```

`from roboto.domain.dashboards import UpdateDashboardRequest`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/dashboards/operations.py#L34-L78)

Bases: `pydantic.BaseModel`

Request body for `PUT /v1/metrics/dashboards/id/<dashboard_id>`.

**Parameters**

- **data** (`Any`)

**Attributes**

- **UpdateDashboardRequest.accessibility** (`roboto.domain.dashboards.record.DashboardAccessibility | roboto.sentinels.NotSetType`): Whether the dashboard should become org-wide or personal. The server re-derives `owner_principal_id` from this — to the org principal for `organization`, back to the creator's user principal for `user`; ownership is the stored source of truth.

- **UpdateDashboardRequest.base_revision** (`int | roboto.sentinels.NotSetType`) = `None`: The revision you loaded — not the revision you want.

  Required when `dashboard_definition` is present, and rejected otherwise. The server compares it against the stored revision and rejects the write if the definition has been replaced in the meantime, so a save built on a stale copy cannot silently erase someone else's edit. A rename or accessibility change carries no base revision: neither touches the definition, so neither can clobber it.

- **UpdateDashboardRequest.dashboard_definition** (`dict[str, Any] | roboto.sentinels.NotSetType`): The dashboard definition as a JSON object. Replaces the stored definition wholesale; it carries its own schema version, so no separate version field accompanies it.

- **UpdateDashboardRequest.model_config**: Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

- **UpdateDashboardRequest.name** (`str | roboto.sentinels.NotSetType`) = `None`: The name of the dashboard.

#### UpdateDashboardRequest.validate_base_revision_with_definition()

```python
def validate_base_revision_with_definition() -> UpdateDashboardRequest
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/dashboards/operations.py#L62-L78)

Require a base revision for definition writes, and only for definition writes.

The presence checks use [`NotSetType`](/reference/python-sdk/roboto/sentinels#roboto.sentinels.NotSetType) rather than truthiness: `base_revision=0` is the commonest real value — a dashboard whose definition has never been rewritten — and a falsy test would reject exactly that.

**Returns**

- `UpdateDashboardRequest`
