# Upload and retrieve data with Viam's data client API

The data client allows you to upload and retrieve data to and from the Viam Cloud.

The data client API supports the following methods:

Methods to upload data like images or sensor readings directly to Viam:

| Method Name | Description |
| --- | --- |
| [`BinaryDataCaptureUpload`](https://docs.viam.com/reference/apis/data-client/#binarydatacaptureupload) | Upload binary data collected on your machine through a specific component and the relevant metadata to Viam. |
| [`TabularDataCaptureUpload`](https://docs.viam.com/reference/apis/data-client/#tabulardatacaptureupload) | Upload tabular data collected on your machine through a specific component to Viam. |
| [`FileUpload`](https://docs.viam.com/reference/apis/data-client/#fileupload) | Upload arbitrary files stored on your machine to Viam by file name. |
| [`FileUploadFromPath`](https://docs.viam.com/reference/apis/data-client/#fileuploadfrompath) | Upload files stored on your machine to Viam by filepath. |
| [`StreamingDataCaptureUpload`](https://docs.viam.com/reference/apis/data-client/#streamingdatacaptureupload) | Upload the contents of streaming binary data and the relevant metadata to Viam. |

Methods to download, filter, tag, or perform other tasks on data like images or sensor readings:

| Method Name | Description |
| --- | --- |
| [`GetLatestTabularData`](https://docs.viam.com/reference/apis/data-client/#getlatesttabulardata) | Gets the most recent tabular data captured from the specified data source, as long as it was synced within the last year. |
| [`ExportTabularData`](https://docs.viam.com/reference/apis/data-client/#exporttabulardata) | Obtain unified tabular data and metadata from the specified data source. |
| [`TabularDataByFilter`](https://docs.viam.com/reference/apis/data-client/#tabulardatabyfilter) | Retrieve optionally filtered tabular data from Viam. |
| [`TabularDataBySQL`](https://docs.viam.com/reference/apis/data-client/#tabulardatabysql) | Obtain unified tabular data and metadata, queried with SQL. Make sure your API key has permissions at the organization level in order to use this. |
| [`TabularDataByMQL`](https://docs.viam.com/reference/apis/data-client/#tabulardatabymql) | Obtain unified tabular data and metadata, queried with MQL. |
| [`BinaryDataByFilter`](https://docs.viam.com/reference/apis/data-client/#binarydatabyfilter) | Retrieve optionally filtered binary data from Viam. |
| [`BinaryDataByIDs`](https://docs.viam.com/reference/apis/data-client/#binarydatabyids) | Retrieve binary data from Viam by `BinaryID`. |
| [`DeleteTabularData`](https://docs.viam.com/reference/apis/data-client/#deletetabulardata) | Delete tabular data older than a specified number of days. |
| [`DeleteBinaryDataByFilter`](https://docs.viam.com/reference/apis/data-client/#deletebinarydatabyfilter) | Filter and delete binary data. |
| [`DeleteBinaryDataByIDs`](https://docs.viam.com/reference/apis/data-client/#deletebinarydatabyids) | Filter and delete binary data by ids. |
| [`AddTagsToBinaryDataByIDs`](https://docs.viam.com/reference/apis/data-client/#addtagstobinarydatabyids) | Add tags to binary data by ids. |
| [`RemoveTagsFromBinaryDataByIDs`](https://docs.viam.com/reference/apis/data-client/#removetagsfrombinarydatabyids) | Remove tags from binary by ids. |
| [`TagsByFilter`](https://docs.viam.com/reference/apis/data-client/#tagsbyfilter) | Get a list of tags using a filter. |
| [`AddBoundingBoxToImageByID`](https://docs.viam.com/reference/apis/data-client/#addboundingboxtoimagebyid) | Add a bounding box to an image specified by its BinaryID. |
| [`RemoveBoundingBoxFromImageByID`](https://docs.viam.com/reference/apis/data-client/#removeboundingboxfromimagebyid) | Removes a bounding box from an image specified by its BinaryID. |
| [`BoundingBoxLabelsByFilter`](https://docs.viam.com/reference/apis/data-client/#boundingboxlabelsbyfilter) | Get a list of bounding box labels using a Filter. |
| [`GetDatabaseConnection`](https://docs.viam.com/reference/apis/data-client/#getdatabaseconnection) | Get a connection to access a MongoDB Atlas Data federation instance. |
| [`ConfigureDatabaseUser`](https://docs.viam.com/reference/apis/data-client/#configuredatabaseuser) | Configure a database user for the Viam organization’s MongoDB Atlas Data Federation instance. |
| [`AddBinaryDataToDatasetByIDs`](https://docs.viam.com/reference/apis/data-client/#addbinarydatatodatasetbyids) | Add the `BinaryData` to the provided dataset. |
| [`RemoveBinaryDataFromDatasetByIDs`](https://docs.viam.com/reference/apis/data-client/#removebinarydatafromdatasetbyids) | Remove the BinaryData from the provided dataset. |
| [`GetDataPipeline`](https://docs.viam.com/reference/apis/data-client/#getdatapipeline) | Get the configuration for a data pipeline. |
| [`ListDataPipelines`](https://docs.viam.com/reference/apis/data-client/#listdatapipelines) | List all of the data pipelines in an organization. |
| [`CreateDataPipeline`](https://docs.viam.com/reference/apis/data-client/#createdatapipeline) | Create a data pipeline. |
| [`DeleteDataPipeline`](https://docs.viam.com/reference/apis/data-client/#deletedatapipeline) | Delete a data pipeline, its execution history, and all of its output data. |
| [`ListDataPipelineRuns`](https://docs.viam.com/reference/apis/data-client/#listdatapipelineruns) | Get information about individual executions of a data pipeline. |
| [`RenameDataPipeline`](https://docs.viam.com/reference/apis/data-client/#renamedatapipeline) | Rename a data pipeline. |
| [`AddTagsToBinaryDataByFilter`](https://docs.viam.com/reference/apis/data-client/#addtagstobinarydatabyfilter) | Add tags to binary data by filter. |
| [`CreateBinaryDataSignedURL`](https://docs.viam.com/reference/apis/data-client/#createbinarydatasignedurl) | Create a signed URL for accessing binary data without authentication. The URL expires after the specified duration. |
| [`CreateIndex`](https://docs.viam.com/reference/apis/data-client/#createindex) | Create a custom index on your data to speed up queries. You specify the organization, the collection type (tabular or binary), and the fields to index. |
| [`DeleteIndex`](https://docs.viam.com/reference/apis/data-client/#deleteindex) | Delete a custom index from your data. |
| [`ListIndexes`](https://docs.viam.com/reference/apis/data-client/#listindexes) | List all custom indexes for an organization. |
| [`RemoveTagsFromBinaryDataByFilter`](https://docs.viam.com/reference/apis/data-client/#removetagsfrombinarydatabyfilter) | Remove tags from binary data by filter. |
| [`UpdateBoundingBox`](https://docs.viam.com/reference/apis/data-client/#updateboundingbox) | Update an existing bounding box on an image. You can change the label, position, or dimensions of the bounding box. |

Methods to work with datasets:

| Method Name | Description |
| --- | --- |
| [`CreateDataset`](https://docs.viam.com/reference/apis/data-client/#createdataset) | Create a new dataset. |
| [`DeleteDataset`](https://docs.viam.com/reference/apis/data-client/#deletedataset) | Delete a dataset. |
| [`RenameDataset`](https://docs.viam.com/reference/apis/data-client/#renamedataset) | Rename a dataset specified by the dataset ID. |
| [`ListDatasetsByOrganizationID`](https://docs.viam.com/reference/apis/data-client/#listdatasetsbyorganizationid) | Get the datasets in an organization. |
| [`ListDatasetsByIDs`](https://docs.viam.com/reference/apis/data-client/#listdatasetsbyids) | Get a list of datasets using their IDs. |

## Establish a connection

To use the data client API, you need to instantiate a `ViamClient` and then instantiate a `DataClient`.

You need an API key and API key ID with at least [Machine operator permissions](https://docs.viam.com/organization/rbac/#organization-settings-and-roles) to use the data client API.
To get an API key (and corresponding ID), use the [web UI](https://docs.viam.com/organization/api-keys/#create-an-api-key)
to the [Viam CLI](https://docs.viam.com/cli/).

- [From a client application](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-2-0)
- [From within a Module](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-2-1)

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-1-0)
- [Go](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-1-1)
- [TypeScript](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-1-2)

```python

```

Copy

```go

```

Copy

```ts

```

Copy

See [Use platform APIs from within a module](https://docs.viam.com/build-modules/platform-apis/).

Once you have instantiated a `DataClient`, you can run [API methods](https://docs.viam.com/reference/apis/data-client/#api) against the `DataClient` object (named `data_client` in the examples).

## API

### BinaryDataCaptureUpload

Upload binary data collected on your machine through a specific component and the relevant metadata to [Viam](https://app.viam.com/).
Uploaded binary data can be found under the **Images**, **Point clouds**, or **Files** subtab of the [**Data** tab](https://app.viam.com/data), depending on the type of data that you upload.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-3-0)
- [TypeScript](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-3-1)
- [Flutter](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-3-2)

**Parameters:**

- `binary_data` ( [bytes](https://docs.python.org/3/library/stdtypes.html#bytes-objects)) (required): The data to be uploaded, represented in bytes.
- `part_id` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): Part ID of the component used to capture the data.
- `component_type` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): Type of the component used to capture the data (for example, “movement\_sensor”).
- `component_name` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): Name of the component used to capture the data.
- `method_name` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): Name of the method used to capture the data.
- `file_extension` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The file extension of binary data, including the period, for example .jpg, .png, .pcd. The backend routes the binary to its corresponding mime type based on this extension. Files with a .jpeg, .jpg, or .png extension will appear in the Images tab.
- `method_parameters` (Mapping\[ [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str), Any\]) (optional): Optional dictionary of method parameters. No longer in active use.
- `tags` (List\[ [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)\]) (optional): Optional list of tags to allow for tag-based data filtering when retrieving data.
- `dataset_ids` (List\[ [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)\]) (optional): Optional list of datasets to add the data to.
- `data_request_times` (Tuple\[ [datetime.datetime](https://docs.python.org/3/library/datetime.html), [datetime.datetime](https://docs.python.org/3/library/datetime.html)\]) (optional): Optional tuple containing datetime objects denoting the times this data was requested \[0\] by the robot and received \[1\] from the appropriate sensor.
- `mime_type` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (optional): Optional mime type of the data.

**Returns:**

- ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)): : The binary data ID of the uploaded data.

**Raises:**

- (GRPCError): If an invalid part ID is passed.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.binary_data_capture_upload).

**Parameters:**

- `binaryData` (Uint8Array) (required): The data to be uploaded, represented in bytes.
- `partId` (string) (required): The part ID of the component used to capture the data.
- `componentType` (string) (required): The type of the component used to capture the data
(for example, “movementSensor”).
- `componentName` (string) (required): The name of the component used to capture the data.
- `methodName` (string) (required): The name of the method used to capture the data.
- `dataRequestTimes` (Date) (required): Tuple containing `Date` objects denoting the times
this data was requested\[0\] by the robot and received\[1\] from the
appropriate sensor.
- `options` ( [BinaryDataCaptureUploadOptions](https://ts.viam.dev/interfaces/BinaryDataCaptureUploadOptions.html)) (optional): Optional parameters including `mimeType`, `fileExtension`,
`tags`, and `datasetIds`.

**Returns:**

- (Promise): The binary data ID of the uploaded data.

**Example:**

```ts

```

Copy

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/interfaces/DataClient.html#binarydatacaptureupload).

**Parameters:**

- `binaryData` [List](https://api.flutter.dev/flutter/dart-core/List-class.html) < [int](https://api.flutter.dev/flutter/dart-core/int-class.html) \> (required)
- `partId` [String](https://api.flutter.dev/flutter/dart-core/String-class.html) (required)
- `fileExtension` [String](https://api.flutter.dev/flutter/dart-core/String-class.html) (required)
- `componentType` [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? (optional)
- `componentName` [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? (optional)
- `methodName` [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? (optional)
- `methodParameters` [Map](https://api.flutter.dev/flutter/dart-core/Map-class.html) < [String](https://api.flutter.dev/flutter/dart-core/String-class.html), Any>? (optional)
- `dataRequestTimes` ( [DateTime](https://api.flutter.dev/flutter/dart-core/DateTime-class.html), [DateTime](https://api.flutter.dev/flutter/dart-core/DateTime-class.html))? (optional)
- `datasetIds` [Iterable](https://api.flutter.dev/flutter/dart-core/Iterable-class.html) < [String](https://api.flutter.dev/flutter/dart-core/String-class.html) \> (optional)
- `tags` [Iterable](https://api.flutter.dev/flutter/dart-core/Iterable-class.html) < [String](https://api.flutter.dev/flutter/dart-core/String-class.html) \> (optional)

**Returns:**

- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) < [String](https://api.flutter.dev/flutter/dart-core/String-class.html) >

**Example:**

```dart

```

Copy

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/DataClient/binaryDataCaptureUpload.html).

### TabularDataCaptureUpload

Upload tabular data collected on your machine through a specific component to [Viam](https://app.viam.com/).
Uploaded tabular data can be found under the **Sensors** subtab of the [**Data** tab](https://app.viam.com/data).

#### Size limit

Viam enforces a maximum size of 4MB for any single reading for tabular data.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-4-0)
- [TypeScript](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-4-1)
- [Flutter](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-4-2)

**Parameters:**

- `tabular_data` (List\[Mapping\[ [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str), Any\]\]) (required): List of the data to be uploaded, represented tabularly as a collection of dictionaries. Must include the key readings for sensors.
- `part_id` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): Part ID of the component used to capture the data.
- `component_type` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): Type of the component used to capture the data (for example, rdk:component:movement\_sensor).
- `component_name` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): Name of the component used to capture the data.
- `method_name` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): Name of the method used to capture the data.
- `data_request_times` (List\[Tuple\[ [datetime.datetime](https://docs.python.org/3/library/datetime.html), [datetime.datetime](https://docs.python.org/3/library/datetime.html)\]\]) (required): List of tuples, each containing datetime objects denoting the times this data was requested \[0\] by the robot and received \[1\] from the appropriate sensor. Pass a list of tabular data and timestamps with length n > 1 to upload n datapoints, all with the same metadata.
- `method_parameters` (Mapping\[ [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str), Any\]) (optional): Optional dictionary of method parameters. No longer in active use.
- `tags` (List\[ [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)\]) (optional): Optional list of tags to allow for tag-based data filtering when retrieving data.

**Returns:**

- ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)): : The file ID of the uploaded data.

**Raises:**

- (GRPCError): If an invalid part ID is passed.
- (ValueError): If the provided list of Timestamp objects has a length that does not match the length of the list of tabular data.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.tabular_data_capture_upload).

**Parameters:**

- `tabularData` (Record) (required): The list of data to be uploaded, represented tabularly
as an array.
- `partId` (string) (required): The part ID of the component used to capture the data.
- `componentType` (string) (required): The type of the component used to capture the data
(for example, “movementSensor”).
- `componentName` (string) (required): The name of the component used to capture the data.
- `methodName` (string) (required): The name of the method used to capture the data.
- `dataRequestTimes` (Date) (required): Array of Date tuples, each containing two `Date`
objects denoting the times this data was requested\[0\] by the robot and
received\[1\] from the appropriate sensor. Passing a list of tabular data
and Timestamps with length n > 1 will result in n datapoints being
uploaded, all tied to the same metadata.
- `tags` (string) (optional): The list of tags to allow for tag-based filtering when
retrieving data.

**Returns:**

- (Promise): The file ID of the uploaded data.

**Example:**

```ts

```

Copy

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/interfaces/DataClient.html#tabulardatacaptureupload).

**Parameters:**

- `tabularData` [List](https://api.flutter.dev/flutter/dart-core/List-class.html) < [Map](https://api.flutter.dev/flutter/dart-core/Map-class.html) < [String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic» (required)
- `partId` [String](https://api.flutter.dev/flutter/dart-core/String-class.html) (required)
- `componentType` [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? (optional)
- `componentName` [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? (optional)
- `methodName` [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? (optional)
- `methodParameters` [Map](https://api.flutter.dev/flutter/dart-core/Map-class.html) < [String](https://api.flutter.dev/flutter/dart-core/String-class.html), Any>? (optional)
- `dataRequestTimes` [List](https://api.flutter.dev/flutter/dart-core/List-class.html) <( [DateTime](https://api.flutter.dev/flutter/dart-core/DateTime-class.html), [DateTime](https://api.flutter.dev/flutter/dart-core/DateTime-class.html))>? (optional)
- `tags` [Iterable](https://api.flutter.dev/flutter/dart-core/Iterable-class.html) < [String](https://api.flutter.dev/flutter/dart-core/String-class.html) \> (optional)

**Returns:**

- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) < [String](https://api.flutter.dev/flutter/dart-core/String-class.html) >

**Example:**

```dart

```

Copy

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/DataClient/tabularDataCaptureUpload.html).

### FileUpload

Upload arbitrary files stored on your machine to Viam by file name.
If uploaded with a file extension of .jpeg/.jpg/.png, uploaded files can be found in the **Images** subtab of the app’s [**Data** tab](https://app.viam.com/data).
If .pcd, the uploaded files can be found in the **Point clouds** subtab.
All other types of uploaded files can be found under the **Files** subtab of the app’s [**Data** tab](https://app.viam.com/data).

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-5-0)
- [Flutter](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-5-1)

**Parameters:**

- `part_id` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): Part ID of the resource associated with the file.
- `data` ( [bytes](https://docs.python.org/3/library/stdtypes.html#bytes-objects)) (required): Bytes representing file data to upload.
- `component_type` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (optional): Optional type of the component associated with the file (for example, “movement\_sensor”).
- `component_name` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (optional): Optional name of the component associated with the file.
- `method_name` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (optional): Optional name of the method associated with the file.
- `file_name` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (optional): Optional name of the file. The empty string "" will be assigned as the file name if one isn’t provided.
- `method_parameters` (Mapping\[ [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str), Any\]) (optional): Optional dictionary of the method parameters. No longer in active use.
- `file_extension` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (optional): Optional file extension. The empty string "" will be assigned as the file extension if one isn’t provided. Files with a .jpeg, .jpg, or .png extension will be saved to the Images tab.
- `tags` (List\[ [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)\]) (optional): Optional list of tags to allow for tag-based filtering when retrieving data.
- `dataset_ids` (List\[ [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)\]) (optional): Optional list of datasets to add the data to.
- `mime_type` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (optional): Optional mime type of the data.

**Returns:**

- ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)): : Binary data ID of the new file.

**Raises:**

- (GRPCError): If an invalid part ID is passed.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.file_upload).

**Parameters:**

- `path` [String](https://api.flutter.dev/flutter/dart-core/String-class.html) (required)
- `partId` [String](https://api.flutter.dev/flutter/dart-core/String-class.html) (required)
- `fileName` [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? (optional)
- `componentType` [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? (optional)
- `componentName` [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? (optional)
- `methodName` [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? (optional)
- `methodParameters` [Map](https://api.flutter.dev/flutter/dart-core/Map-class.html) < [String](https://api.flutter.dev/flutter/dart-core/String-class.html), Any>? (optional)
- `datasetIds` [Iterable](https://api.flutter.dev/flutter/dart-core/Iterable-class.html) < [String](https://api.flutter.dev/flutter/dart-core/String-class.html) \> (optional)
- `tags` [Iterable](https://api.flutter.dev/flutter/dart-core/Iterable-class.html) < [String](https://api.flutter.dev/flutter/dart-core/String-class.html) \> (optional)

**Returns:**

- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) < [String](https://api.flutter.dev/flutter/dart-core/String-class.html) >

**Example:**

```dart

```

Copy

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/DataClient/uploadFile.html).

### FileUploadFromPath

Upload files stored on your machine to [Viam](https://app.viam.com/) by filepath.
Uploaded files can be found under the **Files** subtab of the [**Data** tab](https://app.viam.com/data).

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-6-0)

**Parameters:**

- `filepath` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): Absolute filepath of file to be uploaded.
- `part_id` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): Part ID of the component associated with the file.
- `component_type` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (optional): Optional type of the component associated with the file (for example, “movement\_sensor”).
- `component_name` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (optional): Optional name of the component associated with the file.
- `method_name` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (optional): Optional name of the method associated with the file.
- `method_parameters` (Mapping\[ [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str), Any\]) (optional): Optional dictionary of the method parameters. No longer in active use.
- `tags` (List\[ [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)\]) (optional): Optional list of tags to allow for tag-based filtering when retrieving data.
- `dataset_ids` (List\[ [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)\]) (optional): Optional list of datasets to add the data to.
- `mime_type` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (optional): Optional mime type of the data.
- `file_name` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (optional): Optional name of the file. If not provided, the name is derived from the filepath.

**Returns:**

- ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)): : Binary data ID of the new file.

**Raises:**

- (GRPCError): If an invalid part ID is passed.
- (FileNotFoundError): If the provided filepath is not found.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.file_upload_from_path).

### StreamingDataCaptureUpload

Upload the contents of streaming binary data and the relevant metadata to [Viam](https://app.viam.com/).
Uploaded streaming data can be found under the [**Data** tab](https://app.viam.com/data).

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-7-0)
- [Flutter](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-7-1)

**Parameters:**

- `data` ( [bytes](https://docs.python.org/3/library/stdtypes.html#bytes-objects)) (required): The data to be uploaded.
- `part_id` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): Part ID of the resource associated with the file.
- `file_ext` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): File extension type for the data. required for determining MIME type.
- `component_type` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (optional): Optional type of the component associated with the file (for example, “movement\_sensor”).
- `component_name` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (optional): Optional name of the component associated with the file.
- `method_name` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (optional): Optional name of the method associated with the file.
- `method_parameters` (Mapping\[ [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str), Any\]) (optional): Optional dictionary of the method parameters. No longer in active use.
- `data_request_times` (Tuple\[ [datetime.datetime](https://docs.python.org/3/library/datetime.html), [datetime.datetime](https://docs.python.org/3/library/datetime.html)\]) (optional): Optional tuple containing datetime objects denoting the times this data was requested \[0\] by the robot and received \[1\] from the appropriate sensor.
- `tags` (List\[ [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)\]) (optional): Optional list of tags to allow for tag-based filtering when retrieving data.
- `dataset_ids` (List\[ [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)\]) (optional): Optional list of datasets to add the data to.
- `mime_type` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (optional): Optional mime type of the data.

**Returns:**

- ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)): : The binary data ID of the uploaded data.

**Raises:**

- (GRPCError): If an invalid part ID is passed.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.streaming_data_capture_upload).

**Parameters:**

- `bytes` [List](https://api.flutter.dev/flutter/dart-core/List-class.html) < [int](https://api.flutter.dev/flutter/dart-core/int-class.html) \> (required)
- `partId` [String](https://api.flutter.dev/flutter/dart-core/String-class.html) (required)
- `fileExtension` [String](https://api.flutter.dev/flutter/dart-core/String-class.html) (required)
- `componentType` [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? (optional)
- `componentName` [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? (optional)
- `methodName` [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? (optional)
- `methodParameters` [Map](https://api.flutter.dev/flutter/dart-core/Map-class.html) < [String](https://api.flutter.dev/flutter/dart-core/String-class.html), Any>? (optional)
- `dataRequestTimes` ( [DateTime](https://api.flutter.dev/flutter/dart-core/DateTime-class.html), [DateTime](https://api.flutter.dev/flutter/dart-core/DateTime-class.html))? (optional)
- `datasetIds` [Iterable](https://api.flutter.dev/flutter/dart-core/Iterable-class.html) < [String](https://api.flutter.dev/flutter/dart-core/String-class.html) \> (optional)
- `tags` [Iterable](https://api.flutter.dev/flutter/dart-core/Iterable-class.html) < [String](https://api.flutter.dev/flutter/dart-core/String-class.html) \> (optional)

**Returns:**

- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) < [String](https://api.flutter.dev/flutter/dart-core/String-class.html) >

**Example:**

```dart

```

Copy

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/DataClient/streamingDataCaptureUpload.html).

### GetLatestTabularData

Gets the most recent tabular data captured from the specified data source, as long as it was synced within the last year.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-8-0)
- [Go](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-8-1)
- [TypeScript](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-8-2)
- [Flutter](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-8-3)

**Parameters:**

- `part_id` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The ID of the part that owns the data.
- `resource_name` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The name of the requested resource that captured the data. For example, “my-sensor”.
- `resource_api` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The API of the requested resource that captured the data. For example, “rdk:component:sensor”.
- `method_name` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The data capture method name. For exampe, “Readings”.
- `additional_params` (Mapping\[ [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str), viam.utils.ValueTypes\]) (optional): Optional additional parameters of the resource that captured the data.

**Returns:**

- (Tuple\[ [datetime.datetime](https://docs.python.org/3/library/datetime.html), [datetime.datetime](https://docs.python.org/3/library/datetime.html), Dict\[ [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str), viam.utils.ValueTypes\]\] \| None): : A return value of `None` means that this data source
has not synced data in the last year. Otherwise, the data source has synced some data in the last year, so the returned
tuple contains the following:
\\* `time_captured` ( _datetime_): The time captured.
\\* `time_synced` ( _datetime_): The time synced.
\\* `payload` ( _Dict\[str, ValueTypes\]_): The latest tabular data captured from the specified data source.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.get_latest_tabular_data).

**Parameters:**

- `ctx` [(Context)](https://pkg.go.dev/context#Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.
- `partID`
- `resourceName`
- `resourceSubtype`
- `methodName` [(string)](https://pkg.go.dev/builtin#string)
- `opts` [(\*TabularDataOptions)](https://pkg.go.dev/go.viam.com/rdk/app#TabularDataOptions)

**Returns:**

- [(\*GetLatestTabularDataResponse)](https://pkg.go.dev/go.viam.com/rdk/app#GetLatestTabularDataResponse)
- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/app#DataClient.GetLatestTabularData).

**Parameters:**

- `partId` (string) (required): The ID of the part that owns the data.
- `resourceName` (string) (required): The name of the requested resource that captured the
data. Ex: “my-sensor”.
- `resourceSubtype` (string) (required): The subtype of the requested resource that captured
the data. Ex: “rdk:component:sensor”.
- `methodName` (string) (required): The data capture method name. Ex: “Readings”.
- `additionalParams` (Record) (optional)

**Returns:**

- (Promise<null \| \[Date, Date, Record<string, [JsonValue](https://ts.viam.dev/types/JsonValue.html) >\]>): A tuple containing \[timeCaptured, timeSynced, payload\] or null if
no data has been synced for the specified resource OR the most recently
captured data was over a year ago.

**Example:**

```ts

```

Copy

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/interfaces/DataClient.html#getlatesttabulardata).

**Parameters:**

- `partId` [String](https://api.flutter.dev/flutter/dart-core/String-class.html) (required)
- `resourceName` [String](https://api.flutter.dev/flutter/dart-core/String-class.html) (required)
- `resourceSubtype` [String](https://api.flutter.dev/flutter/dart-core/String-class.html) (required)
- `methodName` [String](https://api.flutter.dev/flutter/dart-core/String-class.html) (required)
- `additionalParams` [Map](https://api.flutter.dev/flutter/dart-core/Map-class.html) < [String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic>? (required)

**Returns:**

- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) <({ [Map](https://api.flutter.dev/flutter/dart-core/Map-class.html) < [String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> payload, [DateTime](https://api.flutter.dev/flutter/dart-core/DateTime-class.html) timeCaptured, [DateTime](https://api.flutter.dev/flutter/dart-core/DateTime-class.html) timeSynced})?>

**Example:**

```dart

```

Copy

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/DataClient/getLatestTabularData.html).

### ExportTabularData

Obtain unified tabular data and metadata from the specified data source.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-9-0)
- [Go](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-9-1)
- [TypeScript](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-9-2)
- [Flutter](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-9-3)

**Parameters:**

- `part_id` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The ID of the part that owns the data.
- `resource_name` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The name of the requested resource that captured the data.
- `resource_api` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The API of the requested resource that captured the data.
- `method_name` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The data capture method name.
- `start_time` ( [datetime.datetime](https://docs.python.org/3/library/datetime.html)) (optional): Optional start time for requesting a specific range of data.
- `end_time` ( [datetime.datetime](https://docs.python.org/3/library/datetime.html)) (optional): Optional end time for requesting a specific range of data.
- `additional_params` (Mapping\[ [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str), viam.utils.ValueTypes\]) (optional): Optional additional parameters of the resource that captured the data.

**Returns:**

- ( [List\[TabularDataPoint\]](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.TabularDataPoint)): : The unified tabular data and metadata.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.export_tabular_data).

**Parameters:**

- `ctx` [(Context)](https://pkg.go.dev/context#Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.
- `partID`
- `resourceName`
- `resourceSubtype`
- `method` [(string)](https://pkg.go.dev/builtin#string)
- `interval` [(CaptureInterval)](https://pkg.go.dev/go.viam.com/rdk/app#CaptureInterval)
- `opts` [(\*TabularDataOptions)](https://pkg.go.dev/go.viam.com/rdk/app#TabularDataOptions)

**Returns:**

- [(\[\]\*ExportTabularDataResponse)](https://pkg.go.dev/go.viam.com/rdk/app#ExportTabularDataResponse)
- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/app#DataClient.ExportTabularData).

**Parameters:**

- `partId` (string) (required): The ID of the part that owns the data.
- `resourceName` (string) (required): The name of the requested resource that captured the
data.
- `resourceSubtype` (string) (required): The subtype of the requested resource that captured
the data.
- `methodName` (string) (required): The data capture method name.
- `startTime` (Date) (optional): Optional start time (`Date` object) for requesting a
specific range of data.
- `endTime` (Date) (optional): Optional end time (`Date` object) for requesting a specific
range of data.
- `additionalParams` (Record) (optional)

**Returns:**

- (Promise<TabularDataPoint\[\]>): An array of unified tabular data and metadata.

**Example:**

```ts

```

Copy

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/interfaces/DataClient.html#exporttabulardata).

**Parameters:**

- `partId` [String](https://api.flutter.dev/flutter/dart-core/String-class.html) (required)
- `resourceName` [String](https://api.flutter.dev/flutter/dart-core/String-class.html) (required)
- `resourceSubtype` [String](https://api.flutter.dev/flutter/dart-core/String-class.html) (required)
- `methodName` [String](https://api.flutter.dev/flutter/dart-core/String-class.html) (required)
- `startTime` [DateTime](https://api.flutter.dev/flutter/dart-core/DateTime-class.html)? (required)
- `endTime` [DateTime](https://api.flutter.dev/flutter/dart-core/DateTime-class.html)? (required)
- `additionalParams` [Map](https://api.flutter.dev/flutter/dart-core/Map-class.html) < [String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic>? (required)

**Returns:**

- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) < [List](https://api.flutter.dev/flutter/dart-core/List-class.html) < [TabularDataPoint](https://flutter.viam.dev/viam_sdk/TabularDataPoint-class.html) >>

**Example:**

```dart

```

Copy

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/DataClient/exportTabularData.html).

### TabularDataByFilter

Retrieve optionally filtered tabular data from [Viam](https://app.viam.com/).
You can also find your tabular data under the **Sensors** subtab of the [**Data** tab](https://app.viam.com/data).

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-10-0)
- [Go](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-10-1)
- [TypeScript](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-10-2)
- [Flutter](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-10-3)

**Parameters:**

- `filter` ( [viam.proto.app.data.Filter](https://python.viam.dev/autoapi/viam/proto/app/data/index.html#viam.proto.app.data.Filter)) (optional): Optional, specifies tabular data to retrieve. If missing, matches all tabular data.
- `limit` ( [int](https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex)) (optional): The maximum number of entries to include in a page. Defaults to 50 if unspecified.
- `sort_order` ( [viam.proto.app.data.Order.ValueType](https://python.viam.dev/autoapi/viam/proto/app/data/index.html#viam.proto.app.data.Order)) (optional): The desired sort order of the data.
- `last` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (optional): Optional string indicating the object identifier of the last-returned data. This object identifier is returned by calls to `TabularDataByFilter` as the last value. If provided, the server will return the next data entries after the last object identifier.
- `count_only` ( [bool](https://docs.python.org/3/library/stdtypes.html#boolean-type-bool)) (required): Whether to return only the total count of entries.
- `include_internal_data` ( [bool](https://docs.python.org/3/library/stdtypes.html#boolean-type-bool)) (required): Whether to return the internal data. Internal data is used for Viam-specific data ingestion, like cloud SLAM. Defaults to False.
- `dest` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (optional): Optional filepath for writing retrieved data.

**Returns:**

- (Tuple\[List\[TabularData\], [int](https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex), [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)\]): : A tuple containing the following:
\\* `tabular_data` ( _List\[TabularData\]_): The tabular data.
\\* `count` ( _int_): The count (number of entries).
\\* `last` ( _str_): The last-returned page ID.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.tabular_data_by_filter).

**Parameters:**

- `ctx` [(Context)](https://pkg.go.dev/context#Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.
- `opts` [(\*DataByFilterOptions)](https://pkg.go.dev/go.viam.com/rdk/app#DataByFilterOptions)

**Returns:**

- [(\*TabularDataByFilterResponse)](https://pkg.go.dev/go.viam.com/rdk/app#TabularDataByFilterResponse)
- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/app#DataClient.TabularDataByFilter).

**Parameters:**

- `filter` ( [Filter](https://ts.viam.dev/classes/dataApi.Filter.html)) (optional): Optional `pb.Filter` specifying tabular data to retrieve. No
`filter` implies all tabular data.
- `limit` (number) (optional): The maximum number of entries to include in a page. Defaults
to 50 if unspecfied.
- `sortOrder` ( [Order](https://ts.viam.dev/enums/dataApi.Order.html)) (optional): The desired sort order of the data.
- `last` (string) (optional): Optional string indicating the ID of the last-returned data. If
provided, the server will return the next data entries after the `last`
ID.
- `countOnly` (boolean) (optional): Whether to return only the total count of entries.
- `includeInternalData` (boolean) (optional): Whether to retun internal data. Internal data is
used for Viam-specific data ingestion, like cloud SLAM. Defaults to
`false`.

**Returns:**

- (Promise<{ count: bigint; data: TabularData\[\]; last: string }>): An array of data objects, the count (number of entries), and the
last-returned page ID.

**Example:**

```ts

```

Copy

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/interfaces/DataClient.html#tabulardatabyfilter).

**Parameters:**

- `filter` [Filter](https://flutter.viam.dev/viam_protos.app.data/Filter-class.html)? (optional)
- `limit` [int](https://api.flutter.dev/flutter/dart-core/int-class.html)? (optional)
- `sortOrder` [Order](https://flutter.viam.dev/viam_protos.app.data/Order-class.html)? (optional)
- `last` [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? (optional)
- `countOnly` dynamic (optional)

**Returns:**

- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) < [TabularDataByFilterResponse](https://flutter.viam.dev/viam_protos.app.data/TabularDataByFilterResponse-class.html) >

**Example:**

```dart

```

Copy

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/DataClient/tabularDataByFilter.html).

### TabularDataBySQL

Obtain unified tabular data and metadata, queried with SQL. Make sure your API key has permissions at the organization level in order to use this.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-11-0)
- [Go](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-11-1)
- [TypeScript](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-11-2)
- [Flutter](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-11-3)

**Parameters:**

- `organization_id` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The ID of the organization that owns the data. To find your organization ID, visit the organization settings page.
- `sql_query` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The SQL query to run.

**Returns:**

- (List\[Dict\[ [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str), viam.utils.ValueTypes \| [datetime.datetime](https://docs.python.org/3/library/datetime.html)\]\]): : An array of decoded BSON data objects.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.tabular_data_by_sql).

**Parameters:**

- `ctx` [(Context)](https://pkg.go.dev/context#Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.
- `organizationID`
- `sqlQuery` [(string)](https://pkg.go.dev/builtin#string)

**Returns:**

- [(\[\]map\[string\]interface{})](https://pkg.go.dev/builtin#string)
- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/app#DataClient.TabularDataBySQL).

**Parameters:**

- `organizationId` (string) (required): The ID of the organization that owns the data.
- `query` (string) (required): The SQL query to run.

**Returns:**

- (Promise<(Object \| any\[\])\[\]>): An array of data objects.

**Example:**

```ts

```

Copy

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/interfaces/DataClient.html#tabulardatabysql).

**Parameters:**

- `organizationId` [String](https://api.flutter.dev/flutter/dart-core/String-class.html) (required)
- `query` [String](https://api.flutter.dev/flutter/dart-core/String-class.html) (required)

**Returns:**

- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) < [List](https://api.flutter.dev/flutter/dart-core/List-class.html) < [Map](https://api.flutter.dev/flutter/dart-core/Map-class.html) < [String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic>>>

**Example:**

```dart

```

Copy

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/DataClient/tabularDataBySql.html).

### TabularDataByMQL

Obtain unified tabular data and metadata, queried with MQL.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-12-0)
- [Go](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-12-1)
- [TypeScript](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-12-2)
- [Flutter](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-12-3)

**Parameters:**

- `organization_id` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The ID of the organization that owns the data. To find your organization ID, visit the organization settings page.
- `query` (List\[ [bytes](https://docs.python.org/3/library/stdtypes.html#bytes-objects)\] \| List\[Dict\[ [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str), Any\]\]) (required): The MQL query to run, as a list of MongoDB aggregation pipeline stages. Each stage can be provided as either a dictionary or raw BSON bytes, but support for bytes will be removed in the future, so prefer the dictionary option.
- `use_recent_data` ( [bool](https://docs.python.org/3/library/stdtypes.html#boolean-type-bool)) (optional): Whether to query blob storage or your recent data store. Defaults to False.. Deprecated, use tabular\_data\_source\_type instead.
- `tabular_data_source_type` ( [viam.proto.app.data.TabularDataSourceType.ValueType](https://python.viam.dev/autoapi/viam/proto/app/data/index.html#viam.proto.app.data.TabularDataSourceType)) (required): The data source to query. Defaults to TABULAR\_DATA\_SOURCE\_TYPE\_STANDARD.
- `pipeline_id` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (optional): The ID of the data pipeline to query. Defaults to None. Required if tabular\_data\_source\_type is TABULAR\_DATA\_SOURCE\_TYPE\_PIPELINE\_SINK.
- `query_prefix_name` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (optional): Optional field that can be used to specify a saved query to run.

**Returns:**

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.tabular_data_by_mql).

**Parameters:**

- `ctx` [(Context)](https://pkg.go.dev/context#Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.
- `organizationID` [(string)](https://pkg.go.dev/builtin#string)
- `query` [(\[\]map\[string\]interface{})](https://pkg.go.dev/builtin#string)
- `opts` [(\*TabularDataByMQLOptions)](https://pkg.go.dev/go.viam.com/rdk/app#TabularDataByMQLOptions)

**Returns:**

- [(\[\]map\[string\]interface{})](https://pkg.go.dev/builtin#string)
- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/app#DataClient.TabularDataByMQL).

**Parameters:**

- `organizationId` (string) (required): The ID of the organization that owns the data.
- `query` (Uint8Array) (required): The MQL query to run as a list of BSON documents.
- `useRecentData` (boolean) (optional): Whether to query blob storage or your recent data
store. Defaults to false. Deprecated - use dataSource instead.
- `tabularDataSource` ( [TabularDataSource](https://ts.viam.dev/classes/dataApi.TabularDataSource.html)) (optional)
- `queryPrefixName` (string) (optional): Optional name of the query prefix.

**Returns:**

- (Promise<(Object \| any\[\])\[\]>): An array of data objects.

**Example:**

```ts

```

Copy

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/interfaces/DataClient.html#tabulardatabymql).

**Parameters:**

- `organizationId` [String](https://api.flutter.dev/flutter/dart-core/String-class.html) (required)
- `query` dynamic (required)
- `useRecentData` [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) (optional)
- `queryPrefixName` [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? (optional)

**Returns:**

**Example:**

```dart

```

Copy

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/DataClient/tabularDataByMql.html).

### BinaryDataByFilter

Retrieve optionally filtered binary data from [Viam](https://app.viam.com/).
You can also find your binary data under the **Images**, **Point clouds**, or **Files** subtab of the [**Data** tab](https://app.viam.com/data), depending on the type of data that you have uploaded.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-13-0)
- [Go](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-13-1)
- [TypeScript](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-13-2)
- [Flutter](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-13-3)

**Parameters:**

- `filter` ( [viam.proto.app.data.Filter](https://python.viam.dev/autoapi/viam/proto/app/data/index.html#viam.proto.app.data.Filter)) (optional): Optional, specifies tabular data to retrieve. An empty filter matches all binary data.
- `limit` ( [int](https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex)) (optional): The maximum number of entries to include in a page. Defaults to 50 if unspecified.
- `sort_order` ( [viam.proto.app.data.Order.ValueType](https://python.viam.dev/autoapi/viam/proto/app/data/index.html#viam.proto.app.data.Order)) (optional): The desired sort order of the data.
- `last` ( [str](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.binary_data_by_filter)) (optional): Optional string indicating the object identifier of the last-returned data. This object identifier is returned by calls to `BinaryDataByFilter` as the last value. If provided, the server will return the next data entries after the last object identifier.
- `include_binary_data` ( [bool](https://docs.python.org/3/library/stdtypes.html#boolean-type-bool)) (required): Boolean specifying whether to actually include the binary file data with each retrieved file. Defaults to true (that is, both the files’ data and metadata are returned).
- `count_only` ( [bool](https://docs.python.org/3/library/stdtypes.html#boolean-type-bool)) (required): Whether to return only the total count of entries.
- `include_internal_data` ( [bool](https://docs.python.org/3/library/stdtypes.html#boolean-type-bool)) (required): Whether to return the internal data. Internal data is used for Viam-specific data ingestion, like cloud SLAM. Defaults to False.
- `dest` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (optional): Optional filepath for writing retrieved data.

**Returns:**

- (Tuple\[List\[viam.proto.app.data.BinaryData\], [int](https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex), [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)\]): : A tuple containing the following:
\\* `data` ( _List\[_ [`BinaryData`](https://python.viam.dev/autoapi/viam/proto/app/data/index.html#viam.proto.app.data.BinaryData "viam.proto.app.data.BinaryData") _\]_): The binary data.
\\* `count` ( _int_): The count (number of entries).
\\* `last` ( _str_): The last-returned page ID.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.binary_data_by_filter).

**Parameters:**

- `ctx` [(Context)](https://pkg.go.dev/context#Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.
- `includeBinary` [(bool)](https://pkg.go.dev/builtin#bool)
- `opts` [(\*DataByFilterOptions)](https://pkg.go.dev/go.viam.com/rdk/app#DataByFilterOptions)

**Returns:**

- [(\*BinaryDataByFilterResponse)](https://pkg.go.dev/go.viam.com/rdk/app#BinaryDataByFilterResponse)
- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/app#DataClient.BinaryDataByFilter).

**Parameters:**

- `filter` ( [Filter](https://ts.viam.dev/classes/dataApi.Filter.html)) (optional): Optional `pb.Filter` specifying binary data to retrieve. No
`filter` implies all binary data.
- `limit` (number) (optional): The maximum number of entries to include in a page. Defaults
to 50 if unspecfied.
- `sortOrder` ( [Order](https://ts.viam.dev/enums/dataApi.Order.html)) (optional): The desired sort order of the data.
- `last` (string) (optional): Optional string indicating the ID of the last-returned data. If
provided, the server will return the next data entries after the `last`
ID.
- `includeBinary` (boolean) (optional): Whether to include binary file data with each
retrieved file.
- `countOnly` (boolean) (optional): Whether to return only the total count of entries.
- `includeInternalData` (boolean) (optional): Whether to retun internal data. Internal data is
used for Viam-specific data ingestion, like cloud SLAM. Defaults to
`false`.

**Returns:**

- (Promise<{ count: bigint; data: [BinaryData](https://ts.viam.dev/classes/dataApi.BinaryData.html)\[\]; last: string }>): An array of data objects, the count (number of entries), and the
last-returned page ID.

**Example:**

```ts

```

Copy

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/interfaces/DataClient.html#binarydatabyfilter).

**Parameters:**

- `filter` [Filter](https://flutter.viam.dev/viam_protos.app.data/Filter-class.html)? (optional)
- `limit` [int](https://api.flutter.dev/flutter/dart-core/int-class.html)? (optional)
- `sortOrder` [Order](https://flutter.viam.dev/viam_protos.app.data/Order-class.html)? (optional)
- `last` [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? (optional)
- `countOnly` [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) (optional)
- `includeBinary` [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) (optional)

**Returns:**

- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) < [BinaryDataByFilterResponse](https://flutter.viam.dev/viam_protos.app.data/BinaryDataByFilterResponse-class.html) >

**Example:**

```dart

```

Copy

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/DataClient/binaryDataByFilter.html).

### BinaryDataByIDs

Retrieve binary data from Viam by `BinaryID`.
You can also find your binary data under the **Images**, **Point clouds**, or **Files** subtab of the app’s [**Data** tab](https://app.viam.com/data), depending on the type of data that you have uploaded.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-14-0)
- [Go](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-14-1)
- [TypeScript](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-14-2)
- [Flutter](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-14-3)

**Parameters:**

- `binary_ids` ( [List\[viam.proto.app.data.BinaryID\] \| List\[str\]](https://python.viam.dev/autoapi/viam/proto/app/data/index.html#viam.proto.app.data.BinaryID)) (required): Binary data ID strings specifying the desired data or BinaryID objects. Must be non-empty. DEPRECATED: BinaryID is deprecated and will be removed in a future release. Instead, pass binary data IDs as a list of strings.
- `include_binary_data` ( [bool](https://docs.python.org/3/library/stdtypes.html#boolean-type-bool)) (required): Boolean specifying whether to actually include the binary file data with each retrieved file. Defaults to true (that is, both the files’ data and metadata are returned).
- `dest` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (optional): Optional filepath for writing retrieved data.

**Returns:**

- ( [List\[viam.proto.app.data.BinaryData\]](https://python.viam.dev/autoapi/viam/proto/app/data/index.html#viam.proto.app.data.BinaryData)): : The binary data.

**Raises:**

- (GRPCError): If no binary data ID strings or BinaryID objects are provided.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.binary_data_by_ids).

**Parameters:**

- `ctx` [(Context)](https://pkg.go.dev/context#Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.
- `binaryDataIDs` [(\[\]string)](https://pkg.go.dev/builtin#string)
- `opts` [(…\*BinaryDataByIDsOptions)](https://pkg.go.dev/go.viam.com/rdk/app#BinaryDataByIDsOptions)

**Returns:**

- [(\[\]\*BinaryData)](https://pkg.go.dev/go.viam.com/rdk/app#BinaryData)
- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/app#DataClient.BinaryDataByIDs).

**Parameters:**

- `ids` (string) (required): The IDs of the requested binary data.
- `includeBinary` (boolean) (optional): Whether to include binary file data with each
retrieved file.

**Returns:**

- (Promise< [BinaryData](https://ts.viam.dev/classes/dataApi.BinaryData.html)\[\]>): An array of data objects.

**Example:**

```ts

```

Copy

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/interfaces/DataClient.html#binarydatabyids).

**Parameters:**

- `binaryIds` [List](https://api.flutter.dev/flutter/dart-core/List-class.html) < [BinaryID](https://flutter.viam.dev/viam_protos.app.data/BinaryID-class.html) \> (required)
- `includeBinary` [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) (optional)

**Returns:**

- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) < [BinaryDataByIDsResponse](https://flutter.viam.dev/viam_protos.app.data/BinaryDataByIDsResponse-class.html) >

**Example:**

```dart

```

Copy

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/DataClient/binaryDataByIds.html).

### DeleteTabularData

Delete tabular data older than a specified number of days.
If the organization has a [hot data store](https://docs.viam.com/data/hot-data-store/), matching data is deleted from that store as well.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-15-0)
- [Go](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-15-1)
- [TypeScript](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-15-2)
- [Flutter](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-15-3)

**Parameters:**

- `organization_id` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The ID of the organization to delete the data from. To find your organization ID, visit the organization settings page.
- `delete_older_than_days` ( [int](https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex)) (required): Delete data that was captured more than this many days ago. For example, a value of 10 deletes any data that was captured more than 10 days ago. A value of 0 deletes all existing data.
- `filter` ( [viam.proto.app.data.DeleteTabularFilter](https://python.viam.dev/autoapi/viam/proto/app/data/index.html#viam.proto.app.data.DeleteTabularFilter)) (optional): Optional filter to further constrain which data is deleted. If provided, only data matching the filter will be deleted. If omitted, data is deleted based on organization\_id and delete\_older\_than\_days.

**Returns:**

- ( [int](https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex)): : The number of items deleted.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.delete_tabular_data).

**Parameters:**

- `ctx` [(Context)](https://pkg.go.dev/context#Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.
- `organizationID` [(string)](https://pkg.go.dev/builtin#string)
- `deleteOlderThanDays` [(int)](https://pkg.go.dev/builtin#int)
- `filter` [(\*pb.DeleteTabularFilter)](https://pkg.go.dev/go.viam.com/api/app/data/v1#DeleteTabularFilter)

**Returns:**

- [(int)](https://pkg.go.dev/builtin#int)
- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/app#DataClient.DeleteTabularData).

**Parameters:**

- `organizationId` (string) (required): The ID of organization to delete data from.
- `deleteOlderThanDays` (number) (required): Delete data that was captured more than this
many days ago. For example, a value of 10 deletes any data that was
captured more than 10 days ago. A value of 0 deletes all existing data.
- `filter` (PartialMessage) (optional): Optional filter to further constrain which data is deleted.
If provided, only data matching the filter will be deleted. If omitted,
data is deleted based on organization\_id and delete\_older\_than\_days.

**Returns:**

- (Promise): The number of items deleted.

**Example:**

```ts

```

Copy

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/interfaces/DataClient.html#deletetabulardata).

**Parameters:**

- `organizationId` [String](https://api.flutter.dev/flutter/dart-core/String-class.html) (required)
- `olderThanDays` [int](https://api.flutter.dev/flutter/dart-core/int-class.html) (required)
- `filter` [DeleteTabularFilter](https://flutter.viam.dev/viam_protos.app.data/DeleteTabularFilter-class.html)? (optional)

**Returns:**

- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) < [int](https://api.flutter.dev/flutter/dart-core/int-class.html) >

**Example:**

```dart

```

Copy

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/DataClient/deleteTabularData.html).

### DeleteBinaryDataByFilter

Filter and delete binary data.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-16-0)
- [Go](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-16-1)
- [TypeScript](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-16-2)
- [Flutter](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-16-3)

**Parameters:**

- `filter` ( [viam.proto.app.data.Filter](https://python.viam.dev/autoapi/viam/proto/app/data/index.html#viam.proto.app.data.Filter)) (optional): Optional, specifies binary data to delete. CAUTION: Passing an empty Filter deletes all binary data! You must specify an organization ID with organization\_ids when using this option. To find your organization ID, visit the organization settings page.

**Returns:**

- ( [int](https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex)): : The number of items deleted.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.delete_binary_data_by_filter).

**Parameters:**

- `ctx` [(Context)](https://pkg.go.dev/context#Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.
- `filter` [(\*Filter)](https://pkg.go.dev/go.viam.com/rdk/app#Filter)

**Returns:**

- [(int)](https://pkg.go.dev/builtin#int)
- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/app#DataClient.DeleteBinaryDataByFilter).

**Parameters:**

- `filter` ( [Filter](https://ts.viam.dev/classes/dataApi.Filter.html)) (optional): Optional `pb.Filter` specifying binary data to delete. No
`filter` implies all binary data.
- `includeInternalData` (boolean) (optional): Whether or not to delete internal data. Default
is true.

**Returns:**

- (Promise): The number of items deleted.

**Example:**

```ts

```

Copy

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/interfaces/DataClient.html#deletebinarydatabyfilter).

**Parameters:**

- `filter` [Filter](https://flutter.viam.dev/viam_protos.app.data/Filter-class.html)? (required)
- `includeInternalData` [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) (optional)

**Returns:**

- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) < [int](https://api.flutter.dev/flutter/dart-core/int-class.html) >

**Example:**

```dart

```

Copy

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/DataClient/deleteBinaryDataByFilter.html).

### DeleteBinaryDataByIDs

Filter and delete binary data by ids.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-17-0)
- [Go](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-17-1)
- [TypeScript](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-17-2)
- [Flutter](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-17-3)

**Parameters:**

- `binary_ids` ( [List\[viam.proto.app.data.BinaryID\] \| List\[str\]](https://python.viam.dev/autoapi/viam/proto/app/data/index.html#viam.proto.app.data.BinaryID)) (required): Binary data ID strings specifying the data to be deleted or BinaryID objects. Must be non-empty. DEPRECATED: BinaryID is deprecated and will be removed in a future release. Instead, pass binary data IDs as a list of strings.

**Returns:**

- ( [int](https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex)): : The number of items deleted.

**Raises:**

- (GRPCError): If no binary data ID strings or BinaryID objects are provided.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.delete_binary_data_by_ids).

**Parameters:**

- `ctx` [(Context)](https://pkg.go.dev/context#Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.
- `binaryDataIDs` [(\[\]string)](https://pkg.go.dev/builtin#string)

**Returns:**

- [(int)](https://pkg.go.dev/builtin#int)
- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/app#DataClient.DeleteBinaryDataByIDs).

**Parameters:**

- `ids` (string) (required): The IDs of the data to be deleted. Must be non-empty.

**Returns:**

- (Promise): The number of items deleted.

**Example:**

```ts

```

Copy

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/interfaces/DataClient.html#deletebinarydatabyids).

**Parameters:**

- `binaryDataIds` [List](https://api.flutter.dev/flutter/dart-core/List-class.html) < [String](https://api.flutter.dev/flutter/dart-core/String-class.html) \> (required)

**Returns:**

- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) < [int](https://api.flutter.dev/flutter/dart-core/int-class.html) >

**Example:**

```dart

```

Copy

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/DataClient/deleteBinaryDataByIds.html).

### AddTagsToBinaryDataByIDs

Add tags to binary data by ids.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-18-0)
- [Go](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-18-1)
- [TypeScript](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-18-2)
- [Flutter](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-18-3)

**Parameters:**

- `tags` (List\[ [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)\]) (required): List of tags to add to specified binary data. Must be non-empty.
- `binary_ids` ( [List\[viam.proto.app.data.BinaryID\] \| List\[str\]](https://python.viam.dev/autoapi/viam/proto/app/data/index.html#viam.proto.app.data.BinaryID)) (required): Binary data ID strings specifying the data to be tagged or BinaryID objects. Must be non-empty. DEPRECATED: BinaryID is deprecated and will be removed in a future release. Instead, pass binary data IDs as a list of strings.

**Returns:**

- None.

**Raises:**

- (GRPCError): If no binary data ID strings or BinaryID objects are provided.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.add_tags_to_binary_data_by_ids).

**Parameters:**

- `ctx` [(Context)](https://pkg.go.dev/context#Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.
- `tags`
- `binaryDataIDs` [(\[\]string)](https://pkg.go.dev/builtin#string)

**Returns:**

- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/app#DataClient.AddTagsToBinaryDataByIDs).

**Parameters:**

- `tags` (string) (required): The list of tags to add to specified binary data. Must be
non-empty.
- `ids` (string) (required): The IDs of the data to be tagged. Must be non-empty.

**Returns:**

- (Promise)

**Example:**

```ts

```

Copy

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/interfaces/DataClient.html#addtagstobinarydatabyids).

**Parameters:**

- `tags` [List](https://api.flutter.dev/flutter/dart-core/List-class.html) < [String](https://api.flutter.dev/flutter/dart-core/String-class.html) \> (required)
- `binaryDataIds` [List](https://api.flutter.dev/flutter/dart-core/List-class.html) < [String](https://api.flutter.dev/flutter/dart-core/String-class.html) \> (required)

**Returns:**

- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)

**Example:**

```dart

```

Copy

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/DataClient/addTagsToBinaryDataByIds.html).

### RemoveTagsFromBinaryDataByIDs

Remove tags from binary by ids.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-19-0)
- [Go](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-19-1)
- [TypeScript](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-19-2)
- [Flutter](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-19-3)

**Parameters:**

- `tags` (List\[ [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)\]) (required): List of tags to remove from specified binary data. Must be non-empty.
- `binary_ids` ( [List\[viam.proto.app.data.BinaryID\] \| List\[str\]](https://python.viam.dev/autoapi/viam/proto/app/data/index.html#viam.proto.app.data.BinaryID)) (required): Binary data ID strings specifying the data to be untagged or BinaryID objects. Must be non-empty. DEPRECATED: BinaryID is deprecated and will be removed in a future release. Instead, pass binary data IDs as a list of strings.

**Returns:**

- ( [int](https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex)): : The number of tags removed.

**Raises:**

- (GRPCError): If no binary data ID strings, BinaryID objects, or tags are provided.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.remove_tags_from_binary_data_by_ids).

**Parameters:**

**Returns:**

- [(int)](https://pkg.go.dev/builtin#int)
- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/app#DataClient.RemoveTagsFromBinaryDataByIDs).

**Parameters:**

- `tags` (string) (required): List of tags to remove from specified binary data. Must be
non-empty.
- `ids` (string) (required): The IDs of the data to be edited. Must be non-empty.

**Returns:**

- (Promise): The number of items deleted.

**Example:**

```ts

```

Copy

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/interfaces/DataClient.html#removetagsfrombinarydatabyids).

**Parameters:**

**Returns:**

- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) < [int](https://api.flutter.dev/flutter/dart-core/int-class.html) >

**Example:**

```dart

```

Copy

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/DataClient/removeTagsFromBinaryDataByIds.html).

### TagsByFilter

Get a list of tags using a filter.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-20-0)
- [TypeScript](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-20-1)
- [Flutter](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-20-2)

**Parameters:**

- `filter` ( [viam.proto.app.data.Filter](https://python.viam.dev/autoapi/viam/proto/app/data/index.html#viam.proto.app.data.Filter)) (optional): Specifies subset ofdata to retrieve tags from. If none is provided, returns all tags.

**Returns:**

- (List\[ [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)\]): : The list of tags.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.tags_by_filter).

**Parameters:**

- `filter` ( [Filter](https://ts.viam.dev/classes/dataApi.Filter.html)) (optional): Optional `pb.Filter` specifying what data to get tags from.
No `filter` implies all data.

**Returns:**

- (Promise<string\[\]>): The list of tags.

**Example:**

```ts

```

Copy

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/interfaces/DataClient.html#tagsbyfilter).

**Parameters:**

- `filter` [Filter](https://flutter.viam.dev/viam_protos.app.data/Filter-class.html)? (required)

**Returns:**

- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) < [List](https://api.flutter.dev/flutter/dart-core/List-class.html) < [String](https://api.flutter.dev/flutter/dart-core/String-class.html) >>

**Example:**

```dart

```

Copy

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/DataClient/tagsByFilter.html).

### AddBoundingBoxToImageByID

Add a bounding box to an image specified by its BinaryID.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-21-0)
- [Go](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-21-1)
- [TypeScript](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-21-2)
- [Flutter](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-21-3)

**Parameters:**

- `binary_id` ( [viam.proto.app.data.BinaryID \| str](https://python.viam.dev/autoapi/viam/proto/app/data/index.html#viam.proto.app.data.BinaryID)) (required): The binary data ID or BinaryID of the image to add the bounding box to. DEPRECATED: BinaryID is deprecated and will be removed in a future release. Instead, pass binary data IDs as a list of strings.
- `label` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): A label for the bounding box.
- `x_min_normalized` ( [float](https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex)) (required): Min X value of the bounding box normalized from 0 to 1.
- `y_min_normalized` ( [float](https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex)) (required): Min Y value of the bounding box normalized from 0 to 1.
- `x_max_normalized` ( [float](https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex)) (required): Max X value of the bounding box normalized from 0 to 1.
- `y_max_normalized` ( [float](https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex)) (required): Max Y value of the bounding box normalized from 0 to 1.
- `confidence_score` ( [float](https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex)) (optional): Confidence level of the bounding box being correct.

**Returns:**

- ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)): : The bounding box ID.

**Raises:**

- (GRPCError): If the X or Y values are outside of the \[0, 1\] range.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.add_bounding_box_to_image_by_id).

**Parameters:**

- `ctx` [(Context)](https://pkg.go.dev/context#Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.
- `binaryDataID` [(string)](https://pkg.go.dev/builtin#string)
- `label` [(string)](https://pkg.go.dev/builtin#string)
- `xMinNormalized` [(float64)](https://pkg.go.dev/builtin#float64)
- `yMinNormalized` [(float64)](https://pkg.go.dev/builtin#float64)
- `xMaxNormalized` [(float64)](https://pkg.go.dev/builtin#float64)
- `yMaxNormalized` [(float64)](https://pkg.go.dev/builtin#float64)

**Returns:**

- [(string)](https://pkg.go.dev/builtin#string)
- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/app#DataClient.AddBoundingBoxToImageByID).

**Parameters:**

- `binaryId` (string) (required): The ID of the image to add the bounding
box to.
- `label` (string) (required): A label for the bounding box.
- `xMinNormalized` (number) (required): The min X value of the bounding box
normalized from 0 to 1.
- `yMinNormalized` (number) (required): The min Y value of the bounding box
normalized from 0 to 1.
- `xMaxNormalized` (number) (required): The max X value of the bounding box
normalized from 0 to 1.
- `yMaxNormalized` (number) (required): The max Y value of the bounding box
normalized from 0 to 1.
- `confidence` (number) (optional): Model’s confidence in a predicted bounding box
expressed as a normalized value from 0 to 1.

**Returns:**

- (Promise): The bounding box ID.

**Example:**

```ts

```

Copy

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/interfaces/DataClient.html#addboundingboxtoimagebyid).

**Parameters:**

- `label` [String](https://api.flutter.dev/flutter/dart-core/String-class.html) (required)
- `binaryDataId` [String](https://api.flutter.dev/flutter/dart-core/String-class.html) (required)
- `xMinNormalized` [double](https://api.flutter.dev/flutter/dart-core/double-class.html) (required)
- `yMinNormalized` [double](https://api.flutter.dev/flutter/dart-core/double-class.html) (required)
- `xMaxNormalized` [double](https://api.flutter.dev/flutter/dart-core/double-class.html) (required)
- `yMaxNormalized` [double](https://api.flutter.dev/flutter/dart-core/double-class.html) (required)

**Returns:**

- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) < [String](https://api.flutter.dev/flutter/dart-core/String-class.html) >

**Example:**

```dart

```

Copy

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/DataClient/addBoundingBoxToImageById.html).

### RemoveBoundingBoxFromImageByID

Removes a bounding box from an image specified by its BinaryID.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-22-0)
- [Go](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-22-1)
- [TypeScript](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-22-2)
- [Flutter](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-22-3)

**Parameters:**

- `bbox_id` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The ID of the bounding box to remove.
- `binary_id` ( [viam.proto.app.data.BinaryID \| str](https://python.viam.dev/autoapi/viam/proto/app/data/index.html#viam.proto.app.data.BinaryID)) (required): The binary data ID or BinaryID of the image to remove the bounding box from. DEPRECATED: BinaryID is deprecated and will be removed in a future release. Instead, pass binary data IDs as a list of strings.

**Returns:**

- None.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.remove_bounding_box_from_image_by_id).

**Parameters:**

- `ctx` [(Context)](https://pkg.go.dev/context#Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.
- `bboxID` [(string)](https://pkg.go.dev/builtin#string)
- `binaryDataID` [(string)](https://pkg.go.dev/builtin#string)

**Returns:**

- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/app#DataClient.RemoveBoundingBoxFromImageByID).

**Parameters:**

- `binId` (string) (required): The ID of the image to remove the bounding box from.
- `bboxId` (string) (required): The ID of the bounding box to remove.

**Returns:**

- (Promise)

**Example:**

```ts

```

Copy

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/interfaces/DataClient.html#removeboundingboxfromimagebyid).

**Parameters:**

- `bboxId` [String](https://api.flutter.dev/flutter/dart-core/String-class.html) (required)
- `binaryDataId` [String](https://api.flutter.dev/flutter/dart-core/String-class.html) (required)

**Returns:**

- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)

**Example:**

```dart

```

Copy

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/DataClient/removeBoundingBoxFromImageById.html).

### BoundingBoxLabelsByFilter

Get a list of bounding box labels using a Filter.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-23-0)
- [Go](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-23-1)
- [TypeScript](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-23-2)
- [Flutter](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-23-3)

**Parameters:**

- `filter` ( [viam.proto.app.data.Filter](https://python.viam.dev/autoapi/viam/proto/app/data/index.html#viam.proto.app.data.Filter)) (optional): Specifies data to retrieve bounding box labels from. If none is provided, returns labels.

**Returns:**

- (List\[ [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)\]): : The list of bounding box labels.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.bounding_box_labels_by_filter).

**Parameters:**

**Returns:**

- [(\[\]string)](https://pkg.go.dev/builtin#string)
- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/app#DataClient.BoundingBoxLabelsByFilter).

**Parameters:**

- `filter` ( [Filter](https://ts.viam.dev/classes/dataApi.Filter.html)) (optional): Optional `pb.Filter` specifying what data to get tags from.
No `filter` implies all labels.

**Returns:**

- (Promise<string\[\]>): The list of bounding box labels.

**Example:**

```ts

```

Copy

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/interfaces/DataClient.html#boundingboxlabelsbyfilter).

**Parameters:**

- `filter` [Filter](https://flutter.viam.dev/viam_protos.app.data/Filter-class.html)? (required)

**Returns:**

**Example:**

```dart

```

Copy

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/DataClient/boundingBoxLabelsByFilter.html).

### GetDatabaseConnection

Get a connection to access a MongoDB Atlas Data federation instance.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-24-0)
- [Go](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-24-1)
- [TypeScript](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-24-2)
- [Flutter](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-24-3)

**Parameters:**

- `organization_id` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The ID of the organization you’d like to connect to. To find your organization ID, visit the organization settings page.

**Returns:**

- ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)): : The hostname of the federated database.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.get_database_connection).

**Parameters:**

- `ctx` [(Context)](https://pkg.go.dev/context#Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.
- `organizationID` [(string)](https://pkg.go.dev/builtin#string)

**Returns:**

- [(\*GetDatabaseConnectionResponse)](https://pkg.go.dev/go.viam.com/rdk/app#GetDatabaseConnectionResponse)
- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/app#DataClient.GetDatabaseConnection).

**Parameters:**

- `organizationId` (string) (required): Organization to retrieve connection for.

**Returns:**

- (Promise): Hostname of the federated database.

**Example:**

```ts

```

Copy

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/interfaces/DataClient.html#getdatabaseconnection).

**Parameters:**

- `organizationId` [String](https://api.flutter.dev/flutter/dart-core/String-class.html) (required)

**Returns:**

- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) < [DatabaseConnection](https://flutter.viam.dev/viam_sdk/DatabaseConnection.html) >

**Example:**

```dart

```

Copy

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/DataClient/getDatabaseConnection.html).

### ConfigureDatabaseUser

Configure a database user for the Viam organization’s MongoDB Atlas Data Federation instance.
It can also be used to reset the password of the existing database user.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-25-0)
- [Go](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-25-1)
- [TypeScript](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-25-2)
- [Flutter](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-25-3)

**Parameters:**

- `organization_id` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The ID of the organization you’d like to configure a database user for. To find your organization ID, visit the organization settings page.
- `password` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The password of the user.

**Returns:**

- None.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.configure_database_user).

**Parameters:**

- `ctx` [(Context)](https://pkg.go.dev/context#Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.
- `organizationID` [(string)](https://pkg.go.dev/builtin#string)
- `password` [(string)](https://pkg.go.dev/builtin#string)

**Returns:**

- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/app#DataClient.ConfigureDatabaseUser).

**Parameters:**

- `organizationId` (string) (required): The ID of the organization.
- `password` (string) (required): The password of the user.

**Returns:**

- (Promise)

**Example:**

```ts

```

Copy

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/interfaces/DataClient.html#configuredatabaseuser).

**Parameters:**

- `organizationId` [String](https://api.flutter.dev/flutter/dart-core/String-class.html) (required)
- `password` [String](https://api.flutter.dev/flutter/dart-core/String-class.html) (required)

**Returns:**

- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)

**Example:**

```dart

```

Copy

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/DataClient/configureDatabaseUser.html).

### AddBinaryDataToDatasetByIDs

Add the `BinaryData` to the provided dataset.
This BinaryData will be tagged with the VIAM\_DATASET\_{id} label.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-26-0)
- [Go](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-26-1)
- [TypeScript](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-26-2)
- [Flutter](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-26-3)

**Parameters:**

- `binary_ids` ( [List\[viam.proto.app.data.BinaryID\] \| List\[str\]](https://python.viam.dev/autoapi/viam/proto/app/data/index.html#viam.proto.app.data.BinaryID)) (required): Unique identifiers for binary data to add to the dataset. To retrieve these IDs, navigate to the DATA page, click on an image, and copy its Binary Data ID from the details tab.
- `dataset_id` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The ID of the dataset to be added to. To retrieve the dataset ID: Navigate to the DATASETS tab of the DATA page. Click on the dataset. Click the … menu. Select Copy dataset ID.

**Returns:**

- None.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.add_binary_data_to_dataset_by_ids).

**Parameters:**

- `ctx` [(Context)](https://pkg.go.dev/context#Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.
- `binaryDataIDs` [(\[\]string)](https://pkg.go.dev/builtin#string)
- `datasetID` [(string)](https://pkg.go.dev/builtin#string)

**Returns:**

- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/app#DataClient.AddBinaryDataToDatasetByIDs).

**Parameters:**

- `ids` (string) (required): The IDs of binary data to add to dataset.
- `datasetId` (string) (required): The ID of the dataset to be added to.

**Returns:**

- (Promise)

**Example:**

```ts

```

Copy

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/interfaces/DataClient.html#addbinarydatatodatasetbyids).

**Parameters:**

- `binaryDataIds` [List](https://api.flutter.dev/flutter/dart-core/List-class.html) < [String](https://api.flutter.dev/flutter/dart-core/String-class.html) \> (required)
- `datasetId` [String](https://api.flutter.dev/flutter/dart-core/String-class.html) (required)

**Returns:**

- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)

**Example:**

```dart

```

Copy

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/DataClient/addBinaryDataToDatasetByIds.html).

### RemoveBinaryDataFromDatasetByIDs

Remove the BinaryData from the provided dataset.
This BinaryData will lose the VIAM\_DATASET\_{id} tag.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-27-0)
- [Go](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-27-1)
- [TypeScript](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-27-2)
- [Flutter](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-27-3)

**Parameters:**

- `binary_ids` ( [List\[viam.proto.app.data.BinaryID\] \| List\[str\]](https://python.viam.dev/autoapi/viam/proto/app/data/index.html#viam.proto.app.data.BinaryID)) (required): Unique identifiers for the binary data to remove from the dataset. To retrieve these IDs, navigate to the DATA page, click on an image and copy its Binary Data ID from the details tab. DEPRECATED: BinaryID is deprecated and will be removed in a future release. Instead, pass binary data IDs as a list of strings.
- `dataset_id` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The ID of the dataset to be removed from. To retrieve the dataset ID: Navigate to the DATASETS tab of the DATA page. Click on the dataset. Click the … menu. Select Copy dataset ID.

**Returns:**

- None.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.remove_binary_data_from_dataset_by_ids).

**Parameters:**

**Returns:**

- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/app#DataClient.RemoveBinaryDataFromDatasetByIDs).

**Parameters:**

- `ids` (string) (required): The IDs of the binary data to remove from dataset.
- `datasetId` (string) (required): The ID of the dataset to be removed from.

**Returns:**

- (Promise)

**Example:**

```ts

```

Copy

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/interfaces/DataClient.html#removebinarydatafromdatasetbyids).

**Parameters:**

**Returns:**

- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)

**Example:**

```dart

```

Copy

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/DataClient/removeBinaryDataFromDatasetByIds.html).

### GetDataPipeline

Get the configuration for a [data pipeline](https://docs.viam.com/data/pipelines/create-a-pipeline/).

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-28-0)
- [Go](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-28-1)
- [TypeScript](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-28-2)

**Parameters:**

- `id` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The ID of the data pipeline to get.

**Returns:**

- ( [DataPipeline](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.DataPipeline)): : The data pipeline with the given ID.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.get_data_pipeline).

**Parameters:**

- `ctx` [(Context)](https://pkg.go.dev/context#Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.
- `id` [(string)](https://pkg.go.dev/builtin#string)

**Returns:**

- [(\*DataPipeline)](https://pkg.go.dev/go.viam.com/rdk/app#DataPipeline)
- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/app#DataClient.GetDataPipeline).

**Parameters:**

- `pipelineId` (string) (required): The ID of the data pipeline.

**Returns:**

- (Promise<null \| DataPipeline>): The data pipeline configuration or null if it does not exist.

**Example:**

```ts

```

Copy

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/interfaces/DataClient.html#getdatapipeline).

### ListDataPipelines

List all of the [data pipelines](https://docs.viam.com/data/pipelines/create-a-pipeline/) in an organization.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-29-0)
- [Go](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-29-1)
- [TypeScript](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-29-2)

**Parameters:**

- `organization_id` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The ID of the organization that owns the pipelines. You can obtain your organization ID from the organization settings page.

**Returns:**

- ( [List\[DataPipeline\]](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.DataPipeline)): : A list of all of the data pipelines for the given organization.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.list_data_pipelines).

**Parameters:**

**Returns:**

- [(\[\]\*DataPipeline)](https://pkg.go.dev/go.viam.com/rdk/app#DataPipeline)
- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/app#DataClient.ListDataPipelines).

**Parameters:**

- `organizationId` (string) (required): The ID of the organization.

**Returns:**

- (Promise<DataPipeline\[\]>): The list of data pipelines.

**Example:**

```ts

```

Copy

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/interfaces/DataClient.html#listdatapipelines).

### CreateDataPipeline

Create a [data pipeline](https://docs.viam.com/data/pipelines/create-a-pipeline/).

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-30-0)
- [Go](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-30-1)
- [TypeScript](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-30-2)

**Parameters:**

- `organization_id` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The ID of the organization that will own the pipeline. You can obtain your organization ID from the organization settings page.
- `name` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The name of the pipeline.
- `mql_binary` (List\[Dict\[ [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str), Any\]\]) (required): The MQL pipeline to run, as a list of MongoDB aggregation pipeline stages.
- `schedule` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): A cron expression representing the expected execution schedule in UTC (note this also defines the input time window; an hourly schedule would process 1 hour of data at a time).
- `enable_backfill` ( [bool](https://docs.python.org/3/library/stdtypes.html#boolean-type-bool)) (required): When true, pipeline runs will be scheduled for the organization’s past data.
- `data_source_type` ( [viam.proto.app.data.TabularDataSourceType.ValueType](https://python.viam.dev/autoapi/viam/gen/app/data/v1/data_pb2/index.html#viam.gen.app.data.v1.data_pb2.TabularDataSourceType)) (required): The type of data source to use for the pipeline. Defaults to TabularDataSourceType.TABULAR\_DATA\_SOURCE\_TYPE\_STANDARD.

**Returns:**

- ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)): : The ID of the newly created pipeline.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.create_data_pipeline).

**Parameters:**

- `ctx` [(Context)](https://pkg.go.dev/context#Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.
- `organizationID`
- `name` [(string)](https://pkg.go.dev/builtin#string)
- `query` [(\[\]map\[string\]interface{})](https://pkg.go.dev/builtin#string)
- `schedule` [(string)](https://pkg.go.dev/builtin#string)
- `enableBackfill` [(bool)](https://pkg.go.dev/builtin#bool)
- `opts` [(\*CreateDataPipelineOptions)](https://pkg.go.dev/go.viam.com/rdk/app#CreateDataPipelineOptions)

**Returns:**

- [(string)](https://pkg.go.dev/builtin#string)
- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/app#DataClient.CreateDataPipeline).

**Parameters:**

- `organizationId` (string) (required): The ID of the organization.
- `name` (string) (required): The name of the data pipeline.
- `query` (Uint8Array) (required): The MQL query to run as a list of BSON documents.
- `schedule` (string) (required): The schedule to run the query on (cron expression).
- `enableBackfill` (boolean) (required): Whether to enable backfill for the data pipeline.
- `dataSourceType` ( [TabularDataSourceType](https://ts.viam.dev/enums/dataApi.TabularDataSourceType.html)) (optional): The type of data source to use for the data pipeline.

**Returns:**

- (Promise): The ID of the created data pipeline.

**Example:**

```ts

```

Copy

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/interfaces/DataClient.html#createdatapipeline).

### DeleteDataPipeline

Delete a [data pipeline](https://docs.viam.com/data/pipelines/create-a-pipeline/), its execution history, and all of its output data.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-31-0)
- [Go](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-31-1)
- [TypeScript](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-31-2)

**Parameters:**

- `id` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The ID of the data pipeline to delete.

**Returns:**

- None.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.delete_data_pipeline).

**Parameters:**

**Returns:**

- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/app#DataClient.DeleteDataPipeline).

**Parameters:**

- `pipelineId` (string) (required): The ID of the data pipeline.

**Returns:**

- (Promise)

**Example:**

```ts

```

Copy

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/interfaces/DataClient.html#deletedatapipeline).

### ListDataPipelineRuns

Get information about individual executions of a [data pipeline](https://docs.viam.com/data/pipelines/create-a-pipeline/).

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-32-0)
- [Go](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-32-1)
- [TypeScript](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-32-2)

**Parameters:**

- `id` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The ID of the pipeline to list runs for.
- `page_size` ( [int](https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex)) (required): The number of runs to return per page. Defaults to 10.

**Returns:**

- ( [DataPipelineRunsPage](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.DataPipelineRunsPage)): : A page of data pipeline runs with pagination support.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.list_data_pipeline_runs).

**Parameters:**

- `ctx` [(Context)](https://pkg.go.dev/context#Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.
- `id` [(string)](https://pkg.go.dev/builtin#string)
- `pageSize` [(uint32)](https://pkg.go.dev/builtin#uint32)

**Returns:**

- [(\*ListDataPipelineRunsPage)](https://pkg.go.dev/go.viam.com/rdk/app#ListDataPipelineRunsPage)
- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/app#DataClient.ListDataPipelineRuns).

**Parameters:**

- `pipelineId` (string) (required): The ID of the data pipeline.
- `pageSize` (number) (optional): The number of runs to return per page.

**Returns:**

- (Promise): A page of data pipeline runs.

**Example:**

```ts

```

Copy

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/interfaces/DataClient.html#listdatapipelineruns).

### RenameDataPipeline

Rename a [data pipeline](https://docs.viam.com/data/pipelines/create-a-pipeline/).

- [Go](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-33-0)

**Parameters:**

- `ctx` [(Context)](https://pkg.go.dev/context#Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.
- `id`
- `name` [(string)](https://pkg.go.dev/builtin#string)

**Returns:**

- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/app#DataClient.RenameDataPipeline).

### AddTagsToBinaryDataByFilter

Add tags to binary data by filter.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-34-0)

**Parameters:**

- `tags` (List\[ [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)\]) (required): List of tags to add to specified binary data. Must be non-empty.
- `filter` ( [viam.proto.app.data.Filter](https://python.viam.dev/autoapi/viam/proto/app/data/index.html#viam.proto.app.data.Filter)) (optional): Specifies binary data to tag. If none is provided, tags all data.

**Returns:**

- None.

**Raises:**

- (GRPCError): If no tags are provided.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.add_tags_to_binary_data_by_filter).

### CreateBinaryDataSignedURL

Create a signed URL for accessing binary data without authentication. The URL expires after the specified duration.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-35-0)

**Parameters:**

- `binary_data_id` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The binary data ID of the file to create a signed URL for.
- `expiration_minutes` ( [int](https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex)) (optional): Expiration time in minutes. Defaults to 15 minutes if not specified. Maximum allowed is 10080 minutes (7 days).

**Returns:**

- (Tuple\[ [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str), [datetime.datetime](https://docs.python.org/3/library/datetime.html)\]): : A tuple containing:
: \\* `signed_url` ( _str_): The signed URL for the binary data file.
\\* `expires_at` ( _datetime_): The expiration time of the signed URL token.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.create_binary_data_signed_url).

### CreateIndex

Create a custom index on your data to speed up queries. You specify the organization, the collection type (tabular or binary), and the fields to index.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-36-0)

**Parameters:**

- `organization_id` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The ID of the organization that owns the data. To find your organization ID, visit the organization settings page.
- `collection_type` (viam.proto.app.data.IndexableCollection.ValueType) (required): The type of collection the index is on.
- `index_spec` (Dict\[ [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str), Any\]) (required): The MongoDB index specification defined in JSON format.
- `pipeline_name` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (optional): The name of the pipeline if the collection type is PIPELINE\_SINK.

**Returns:**

- None.

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.create_index).

### DeleteIndex

Delete a custom index from your data.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-37-0)

**Parameters:**

- `organization_id` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The ID of the organization that owns the data. To find your organization ID, visit the organization settings page.
- `collection_type` (viam.proto.app.data.IndexableCollection.ValueType) (required): The type of collection the index is on.
- `index_name` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The name of the index to delete.
- `pipeline_name` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (optional): The name of the pipeline if the collection type is PIPELINE\_SINK.

**Returns:**

- None.

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.delete_index).

### ListIndexes

List all custom indexes for an organization.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-38-0)

**Parameters:**

- `organization_id` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The ID of the organization that owns the data. To find your organization ID, visit the organization settings page.
- `collection_type` (viam.proto.app.data.IndexableCollection.ValueType) (required): The type of collection the index is on.
- `pipeline_name` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (optional): The name of the pipeline if the collection type is PIPELINE\_SINK.

**Returns:**

- ( [Sequence\[viam.proto.app.data.Index\]](https://python.viam.dev/autoapi/viam/proto/app/data/index.html#viam.proto.app.data.Index)): : A list of indexes.

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.list_indexes).

### RemoveTagsFromBinaryDataByFilter

Remove tags from binary data by filter.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-39-0)

**Parameters:**

- `tags` (List\[ [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)\]) (required): List of tags to remove from specified binary data.
- `filter` ( [viam.proto.app.data.Filter](https://python.viam.dev/autoapi/viam/proto/app/data/index.html#viam.proto.app.data.Filter)) (optional): Specifies binary data to untag. If none is provided, removes tags from all data.

**Returns:**

- ( [int](https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex)): : The number of tags removed.

**Raises:**

- (GRPCError): If no tags are provided.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.remove_tags_from_binary_data_by_filter).

### UpdateBoundingBox

Update an existing bounding box on an image. You can change the label, position, or dimensions of the bounding box.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-40-0)

**Parameters:**

- `binary_id` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The binary data ID of the image to add the bounding box to.
- `bbox_id` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The ID of the bounding box to be updated.
- `label` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): A label for the bounding box.
- `x_min_normalized` ( [float](https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex)) (required): Min X value of the bounding box normalized from 0 to 1.
- `y_min_normalized` ( [float](https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex)) (required): Min Y value of the bounding box normalized from 0 to 1.
- `x_max_normalized` ( [float](https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex)) (required): Max X value of the bounding box normalized from 0 to 1.
- `y_max_normalized` ( [float](https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex)) (required): Max Y value of the bounding box normalized from 0 to 1.
- `confidence_score` ( [float](https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex)) (optional): Confidence level of the bounding box being correct.

**Returns:**

- None.

**Raises:**

- (GRPCError): If the X or Y values are outside of the \[0, 1\] range.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.update_bounding_box).

### CreateDataset

Create a new dataset.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-41-0)
- [Go](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-41-1)
- [TypeScript](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-41-2)
- [Flutter](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-41-3)

**Parameters:**

- `name` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The name of the dataset being created.
- `organization_id` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The ID of the organization where the dataset is being created. To find your organization ID, visit the organization settings page.

**Returns:**

- ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)): : The dataset ID of the created dataset.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.create_dataset).

**Parameters:**

- `ctx` [(Context)](https://pkg.go.dev/context#Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.
- `name`
- `organizationID` [(string)](https://pkg.go.dev/builtin#string)

**Returns:**

- [(string)](https://pkg.go.dev/builtin#string)
- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/app#DataClient.CreateDataset).

**Parameters:**

- `name` (string) (required): The name of the new dataset.
- `organizationId` (string) (required): The ID of the organization the dataset is being
created in.

**Returns:**

- (Promise): The ID of the dataset.

**Example:**

```ts

```

Copy

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/interfaces/DataClient.html#createdataset).

**Parameters:**

- `orgId` [String](https://api.flutter.dev/flutter/dart-core/String-class.html) (required)
- `name` [String](https://api.flutter.dev/flutter/dart-core/String-class.html) (required)

**Returns:**

- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) < [String](https://api.flutter.dev/flutter/dart-core/String-class.html) >

**Example:**

```dart

```

Copy

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/DataClient/createDataset.html).

### DeleteDataset

Delete a dataset.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-42-0)
- [Go](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-42-1)
- [TypeScript](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-42-2)
- [Flutter](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-42-3)

**Parameters:**

- `id` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The ID of the dataset. To retrieve the dataset ID: Navigate to the DATASETS tab of the DATA page. Click on the dataset. Click the … menu. Select Copy dataset ID.

**Returns:**

- None.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.delete_dataset).

**Parameters:**

**Returns:**

- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/app#DataClient.DeleteDataset).

**Parameters:**

- `id` (string) (required): The ID of the dataset.

**Returns:**

- (Promise)

**Example:**

```ts

```

Copy

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/interfaces/DataClient.html#deletedataset).

**Parameters:**

- `id` [String](https://api.flutter.dev/flutter/dart-core/String-class.html) (required)

**Returns:**

- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)

**Example:**

```dart

```

Copy

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/DataClient/deleteDataset.html).

### RenameDataset

Rename a dataset specified by the dataset ID.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-43-0)
- [Go](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-43-1)
- [TypeScript](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-43-2)
- [Flutter](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-43-3)

**Parameters:**

- `id` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The ID of the dataset. To retrieve the dataset ID: Navigate to the DATASETS tab of the DATA page. Click on the dataset. Click the … menu. Select Copy dataset ID.
- `name` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The new name of the dataset.

**Returns:**

- None.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.rename_dataset).

**Parameters:**

**Returns:**

- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/app#DataClient.RenameDataset).

**Parameters:**

- `id` (string) (required): The ID of the dataset.
- `name` (string) (required): The new name of the dataset.

**Returns:**

- (Promise)

**Example:**

```ts

```

Copy

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/interfaces/DataClient.html#renamedataset).

**Parameters:**

- `id` [String](https://api.flutter.dev/flutter/dart-core/String-class.html) (required)
- `name` [String](https://api.flutter.dev/flutter/dart-core/String-class.html) (required)

**Returns:**

- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)

**Example:**

```dart

```

Copy

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/DataClient/renameDataset.html).

### ListDatasetsByOrganizationID

Get the datasets in an organization.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-44-0)
- [Go](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-44-1)
- [TypeScript](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-44-2)
- [Flutter](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-44-3)

**Parameters:**

- `organization_id` ( [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The ID of the organization you’d like to retrieve datasets from. To find your organization ID, visit the organization settings page.

**Returns:**

- ( [Sequence\[viam.proto.app.dataset.Dataset\]](https://python.viam.dev/autoapi/viam/proto/app/dataset/index.html#viam.proto.app.dataset.Dataset)): : The list of datasets in the organization.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.list_datasets_by_organization_id).

**Parameters:**

**Returns:**

- [(\[\]\*Dataset)](https://pkg.go.dev/go.viam.com/rdk/app#Dataset)
- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/app#DataClient.ListDatasetsByOrganizationID).

**Parameters:**

- `organizationId` (string) (required): The ID of the organization.

**Returns:**

- (Promise<Dataset\[\]>): The list of datasets in the organization.

**Example:**

```ts

```

Copy

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/interfaces/DataClient.html#listdatasetsbyorganizationid).

**Parameters:**

- `orgId` [String](https://api.flutter.dev/flutter/dart-core/String-class.html) (required)

**Returns:**

- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) < [List](https://api.flutter.dev/flutter/dart-core/List-class.html) < [Dataset](https://flutter.viam.dev/viam_protos.app.dataset/Dataset-class.html) >>

**Example:**

```dart

```

Copy

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/DataClient/listDatasetsByOrganizationID.html).

### ListDatasetsByIDs

Get a list of datasets using their IDs.

- [Python](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-45-0)
- [Go](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-45-1)
- [TypeScript](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-45-2)
- [Flutter](https://docs.viam.com/reference/apis/data-client/#tabset-referenceapisdata-client-45-3)

**Parameters:**

- `ids` (List\[ [str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)\]) (required): The IDs of the datasets that you would like to retrieve information about. To retrieve a dataset ID: Navigate to the DATASETS tab of the DATA page. Click on the dataset. Click the … menu. Select Copy dataset ID.

**Returns:**

- ( [Sequence\[viam.proto.app.dataset.Dataset\]](https://python.viam.dev/autoapi/viam/proto/app/dataset/index.html#viam.proto.app.dataset.Dataset)): : The list of datasets.

**Example:**

```python

```

Copy

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.list_dataset_by_ids).

**Parameters:**

- `ctx` [(Context)](https://pkg.go.dev/context#Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.
- `ids` [(\[\]string)](https://pkg.go.dev/builtin#string)

**Returns:**

- [(\[\]\*Dataset)](https://pkg.go.dev/go.viam.com/rdk/app#Dataset)
- [(error)](https://pkg.go.dev/builtin#error): An error, if one occurred.

For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/app#DataClient.ListDatasetsByIDs).

**Parameters:**

- `ids` (string) (required): The list of IDs of the datasets.

**Returns:**

- (Promise<Dataset\[\]>): The list of datasets.

**Example:**

```ts

```

Copy

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/interfaces/DataClient.html#listdatasetsbyids).

**Parameters:**

- `ids` [List](https://api.flutter.dev/flutter/dart-core/List-class.html) < [String](https://api.flutter.dev/flutter/dart-core/String-class.html) \> (required)

**Returns:**

**Example:**

```dart

```

Copy

For more information, see the [Flutter SDK Docs](https://flutter.viam.dev/viam_sdk/DataClient/listDatasetsByIDs.html).

Ask AI

Was this page helpful?

YesNo

Glad to hear it! If you have any other feedback please let us know:

Send

We're sorry about that. To help us improve, please tell us what we can do better:

Send

Thank you!
