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

- [CreateDirectoryRequest](/reference/python-sdk/roboto/domain/files/operations#roboto.domain.files.operations.CreateDirectoryRequest) (class): Request payload to create a directory among the files of one association.

- [QueryDatasetFilesRequest](/reference/python-sdk/roboto/domain/files/operations#roboto.domain.files.operations.QueryDatasetFilesRequest) (class): Request payload for listing the files associated with a dataset, an org, or a device.

- [RenameDirectoryRequest](/reference/python-sdk/roboto/domain/files/operations#roboto.domain.files.operations.RenameDirectoryRequest) (class): Request payload for renaming a directory among the files of one association.

### BeginSingleFileUploadRequest

```python
class roboto.domain.datasets.operations.BeginSingleFileUploadRequest(/, **data: Any)
```

`from roboto.domain.datasets.operations import BeginSingleFileUploadRequest`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/datasets/operations.py#L158-L172)

Bases: `pydantic.BaseModel`

Request payload to begin a single file upload

**Parameters**

- **data** (`Any`)

**Attributes**

- **BeginSingleFileUploadRequest.file_path** (`str`) = `None`
- **BeginSingleFileUploadRequest.file_size** (`int`) = `None`
- **BeginSingleFileUploadRequest.origination** (`str | None`) = `None`

### BeginSingleFileUploadResponse

```python
class roboto.domain.datasets.operations.BeginSingleFileUploadResponse(/, **data: Any)
```

`from roboto.domain.datasets.operations import BeginSingleFileUploadResponse`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/datasets/operations.py#L175-L181)

Bases: `pydantic.BaseModel`

Response to a single file upload

**Parameters**

- **data** (`Any`)

**Attributes**

- **BeginSingleFileUploadResponse.upload_id** (`str`)
- **BeginSingleFileUploadResponse.upload_url** (`str`)

### CreateDatasetIfNotExistsRequest

```python
class roboto.domain.datasets.operations.CreateDatasetIfNotExistsRequest(/, **data: Any)
```

`from roboto import CreateDatasetIfNotExistsRequest`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/datasets/operations.py#L145-L155)

Bases: `pydantic.BaseModel`

Request payload to create a dataset if no existing dataset matches the specified query.

Searches for existing datasets using the provided RoboQL query. If a matching dataset is found, returns that dataset. If no match is found, creates a new dataset with the specified properties and returns it.

**Parameters**

- **data** (`Any`)

**Attributes**

- **CreateDatasetIfNotExistsRequest.create_request** (`CreateDatasetRequest`)
- **CreateDatasetIfNotExistsRequest.match_roboql_query** (`str`)

### CreateDatasetRequest

```python
class roboto.domain.datasets.operations.CreateDatasetRequest(**data)
```

`from roboto import CreateDatasetRequest`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/datasets/operations.py#L24-L81)

Bases: `pydantic.BaseModel`

Request payload for creating a new dataset.

Used to specify the initial properties of a dataset during creation, including optional metadata, tags, name, and description.

**Attributes**

- **CreateDatasetRequest.custom_fields** (`dict[str, Any] | None`) = `None`: Initial values for Ready custom fields on this dataset.

  Each key must be the name of a [`CustomField`](/reference/python-sdk/roboto/domain/custom_fields/custom_field#roboto.domain.custom_fields.custom_field.CustomField) that is [`Ready`](/reference/python-sdk/roboto/domain/custom_fields/record#roboto.domain.custom_fields.record.CustomFieldStatus.Ready) for the caller's org and the [`Dataset`](/reference/python-sdk/roboto/domain/custom_fields/record#roboto.domain.custom_fields.record.TargetEntityType.Dataset) entity type; each value must satisfy the field's declared type. Names that are undefined or not `Ready`, and values that don't match the field's type, are rejected with a structured error.

- **CreateDatasetRequest.description** (`str | None`) = `None`: Optional human-readable description of the dataset.

- **CreateDatasetRequest.device_id** (`str | None`) = `None`: Optional identifier of the device that generated this data.

- **CreateDatasetRequest.metadata** (`dict[str, Any]`) = `None`: Key-value metadata pairs to associate with the dataset for discovery and search.

- **CreateDatasetRequest.name** (`str | None`) = `None`: Optional short name for the dataset (max 120 characters).

- **CreateDatasetRequest.tags** (`list[str]`) = `None`: List of tags for dataset discovery and organization.

### DeleteDirectoriesRequest

```python
class roboto.domain.datasets.operations.DeleteDirectoriesRequest(/, **data: Any)
```

`from roboto.domain.datasets import DeleteDirectoriesRequest`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/datasets/operations.py#L134-L142)

Bases: `pydantic.BaseModel`

Request payload for deleting directories within a dataset.

Used to remove entire directory structures and all contained files from a dataset. This is a bulk operation that affects multiple files.

**Parameters**

- **data** (`Any`)

**Attributes**

- **DeleteDirectoriesRequest.directory_paths** (`list[str]`): List of directory paths to delete from the dataset.

### QueryDatasetsRequest

```python
class roboto.domain.datasets.operations.QueryDatasetsRequest(/, **data: Any)
```

`from roboto import QueryDatasetsRequest`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/datasets/operations.py#L84-L95)

Bases: `pydantic.BaseModel`

Request payload for querying datasets with filters.

Used to search for datasets based on various criteria such as metadata, tags, and other dataset properties. The filters are applied server-side to efficiently return matching datasets.

**Parameters**

- **data** (`Any`)

**Attributes**

- **QueryDatasetsRequest.filters** (`dict[str, Any]`) = `None`: Dictionary of filter criteria to apply when searching for datasets.
- **QueryDatasetsRequest.model_config**: Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

### UpdateDatasetRequest

```python
class roboto.domain.datasets.operations.UpdateDatasetRequest(/, **data: Any)
```

`from roboto import UpdateDatasetRequest`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/datasets/operations.py#L98-L131)

Bases: `pydantic.BaseModel`

Request payload for updating dataset properties.

Used to modify dataset metadata, description, name, and other properties. Only specified fields will be updated; others remain unchanged.

**Parameters**

- **data** (`Any`)

**Attributes**

- **UpdateDatasetRequest.custom_fields_changeset** (`roboto.updates.CustomFieldChangeset | None`) = `None`: Changes to apply to Ready custom-field values on this dataset.

  Each referenced field name must be a [`Ready`](/reference/python-sdk/roboto/domain/custom_fields/record#roboto.domain.custom_fields.record.CustomFieldStatus.Ready) custom field for this dataset's org and the [`Dataset`](/reference/python-sdk/roboto/domain/custom_fields/record#roboto.domain.custom_fields.record.TargetEntityType.Dataset) entity type; each `set_fields` value must satisfy the field's declared type. Names that are undefined or not `Ready` are rejected with a structured error. Field names not mentioned by the changeset are left unchanged.

- **UpdateDatasetRequest.description** (`str | roboto.sentinels.NotSetType | None`): New description for the dataset. Set to None to clear the description.

- **UpdateDatasetRequest.device_id** (`str | roboto.sentinels.NotSetType | None`): New device ID for the dataset. Set to None to clear the device association.

- **UpdateDatasetRequest.metadata_changeset** (`roboto.updates.MetadataChangeset | roboto.sentinels.NotSetType`): Metadata changes to apply (add, update, or remove fields/tags).

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

- **UpdateDatasetRequest.name** (`Annotated[str, pydantic.StringConstraints(max_length=120)] | roboto.sentinels.NotSetType | None`): New name for the dataset (max 120 characters). Set to None to clear the name.
