Previous
Service APIs
The data client API 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 the Viam app:
Method Name | Description |
---|---|
BinaryDataCaptureUpload | Upload binary data collected on your machine through a specific component and the relevant metadata to the Viam app. |
TabularDataCaptureUpload | Upload tabular data collected on your machine through a specific component to the Viam app. |
FileUpload | Upload arbitrary files stored on your machine to the Viam app by file name. |
FileUploadFromPath | Upload files stored on your machine to the Viam app by filepath. |
StreamingDataCaptureUpload | Upload the contents of streaming binary data and the relevant metadata to the Viam app. |
Methods to download, filter, tag, or perform other tasks on data like images or sensor readings:
Method Name | Description |
---|---|
GetLatestTabularData | Gets the most recent tabular data captured from the specified data source, as long as it was synced within the last year. |
ExportTabularData | Obtain unified tabular data and metadata from the specified data source. |
TabularDataByFilter | Retrieve optionally filtered tabular data from the Viam app. |
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 | Obtain unified tabular data and metadata, queried with MQL. |
BinaryDataByFilter | Retrieve optionally filtered binary data from the Viam app. |
BinaryDataByIDs | Retrieve binary data from the Viam app by BinaryID . |
DeleteTabularData | Delete tabular data older than a specified number of days. |
DeleteBinaryDataByFilter | Filter and delete binary data. |
DeleteBinaryDataByIDs | Filter and delete binary data by ids. |
AddTagsToBinaryDataByIDs | Add tags to binary data by ids. |
AddTagsToBinaryDataByFilter | Add tags to binary data by filter. |
RemoveTagsFromBinaryDataByIDs | Remove tags from binary by ids. |
RemoveTagsFromBinaryDataByFilter | Remove tags from binary data by filter. |
TagsByFilter | Get a list of tags using a filter. |
AddBoundingBoxToImageByID | Add a bounding box to an image specified by its BinaryID. |
RemoveBoundingBoxFromImageByID | Removes a bounding box from an image specified by its BinaryID. |
BoundingBoxLabelsByFilter | Get a list of bounding box labels using a Filter. |
GetDatabaseConnection | Get a connection to access a MongoDB Atlas Data federation instance. |
ConfigureDatabaseUser | Configure a database user for the Viam organization’s MongoDB Atlas Data Federation instance. |
AddBinaryDataToDatasetByIDs | Add the BinaryData to the provided dataset. |
RemoveBinaryDataFromDatasetByIDs | Remove the BinaryData from the provided dataset. |
Methods to work with datasets:
Method Name | Description |
---|---|
CreateDataset | Create a new dataset. |
DeleteDataset | Delete a dataset. |
RenameDataset | Rename a dataset specified by the dataset ID. |
ListDatasetsByOrganizationID | Get the datasets in an organization. |
ListDatasetsByIDs | Get a list of datasets using their IDs. |
To use the Viam data client API, you first need to instantiate a ViamClient
and then instantiate a DataClient
.
You will also need an API key and API key ID to authenticate your session. To get an API key (and corresponding ID), you have two options:
The following example instantiates a ViamClient
, authenticating with an API key, and then instantiates a DataClient
:
Once you have instantiated a DataClient
, you can run API methods against the DataClient
object (named data_client
in the examples).
Upload binary data collected on your machine through a specific component and the relevant metadata to the Viam app. Uploaded binary data can be found under the Images, Point clouds, or Files subtab of the app’s Data tab, depending on the type of data that you upload.
Parameters:
binary_data
(bytes) (required): The data to be uploaded, represented in bytes.part_id
(str) (required): Part ID of the component used to capture the data.component_type
(str) (required): Type of the component used to capture the data (for example, “movement_sensor”).component_name
(str) (required): Name of the component used to capture the data.method_name
(str) (required): Name of the method used to capture the data.file_extension
(str) (required): The file extension of binary data including the period, for example .jpg, .png, .pcd. The backend will route the binary to its corresponding mime type based on this extension. Files with a .jpeg, .jpg, or .png extension will be saved to the images tab.method_parameters
(Mapping[str, Any]) (optional): Optional dictionary of method parameters. No longer in active use.tags
(List[str]) (optional): Optional list of tags to allow for tag-based data filtering when retrieving data.data_request_times
(Tuple[datetime.datetime, datetime.datetime]) (optional): Optional tuple containing datetime objects denoting the times this data was requested[0] by the robot and received[1] from the appropriate sensor.Returns:
Raises:
Example:
For more information, see the Python SDK Docs.
Parameters:
binaryData
List<int> (required)partId
String (required)fileExtension
String (required)componentType
String? (optional)componentName
String? (optional)methodName
String? (optional)methodParameters
Map<String, Any>? (optional)dataRequestTimes
(DateTime, DateTime)? (optional)tags
Iterable<String> (optional)Returns:
Example:
For more information, see the Flutter SDK Docs.
Upload tabular data collected on your machine through a specific component to the Viam app. Uploaded tabular data can be found under the Sensors subtab of the app’s Data tab.
Parameters:
tabular_data
(List[Mapping[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) (required): Part ID of the component used to capture the data.component_type
(str) (required): Type of the component used to capture the data (for example, “rdk:component:movement_sensor”).component_name
(str) (required): Name of the component used to capture the data.method_name
(str) (required): Name of the method used to capture the data.data_request_times
(List[Tuple[datetime.datetime, datetime.datetime]]) (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. 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.method_parameters
(Mapping[str, Any]) (optional): Optional dictionary of method parameters. No longer in active use.tags
(List[str]) (optional): Optional list of tags to allow for tag-based data filtering when retrieving data.Returns:
Raises:
Example:
For more information, see the Python SDK Docs.
Parameters:
tabularData
List<Map<String, dynamic>> (required)partId
String (required)componentType
String? (optional)componentName
String? (optional)methodName
String? (optional)methodParameters
Map<String, Any>? (optional)dataRequestTimes
List<(DateTime, DateTime)>? (optional)tags
Iterable<String> (optional)Returns:
Example:
For more information, see the Flutter SDK Docs.
Upload arbitrary files stored on your machine to the Viam app by file name.
If uploaded with a file extension of
Parameters:
part_id
(str) (required): Part ID of the resource associated with the file.data
(bytes) (required): Bytes representing file data to upload.component_type
(str) (optional): Optional type of the component associated with the file (for example, “movement_sensor”).component_name
(str) (optional): Optional name of the component associated with the file.method_name
(str) (optional): Optional name of the method associated with the file.file_name
(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, Any]) (optional): Optional dictionary of the method parameters. No longer in active use.file_extension
(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]) (optional): Optional list of tags to allow for tag-based filtering when retrieving data.Returns:
Raises:
Example:
For more information, see the Python SDK Docs.
Parameters:
path
String (required)partId
String (required)fileName
String? (optional)componentType
String? (optional)componentName
String? (optional)methodName
String? (optional)methodParameters
Map<String, Any>? (optional)tags
Iterable<String> (optional)Returns:
Example:
For more information, see the Flutter SDK Docs.
Upload files stored on your machine to the Viam app by filepath. Uploaded files can be found under the Files subtab of the app’s Data tab.
Parameters:
filepath
(str) (required): Absolute filepath of file to be uploaded.part_id
(str) (required): Part ID of the component associated with the file.component_type
(str) (optional): Optional type of the component associated with the file (for example, “movement_sensor”).component_name
(str) (optional): Optional name of the component associated with the file.method_name
(str) (optional): Optional name of the method associated with the file.method_parameters
(Mapping[str, Any]) (optional): Optional dictionary of the method parameters. No longer in active use.tags
(List[str]) (optional): Optional list of tags to allow for tag-based filtering when retrieving data.Returns:
Raises:
Example:
For more information, see the Python SDK Docs.
Upload the contents of streaming binary data and the relevant metadata to the Viam app. Uploaded streaming data can be found under the Data tab.
Parameters:
data
(bytes) (required): the data to be uploaded.part_id
(str) (required): Part ID of the resource associated with the file.file_ext
(str) (required): file extension type for the data. required for determining MIME type.component_type
(str) (optional): Optional type of the component associated with the file (for example, “movement_sensor”).component_name
(str) (optional): Optional name of the component associated with the file.method_name
(str) (optional): Optional name of the method associated with the file.method_parameters
(Mapping[str, Any]) (optional): Optional dictionary of the method parameters. No longer in active use.data_request_times
(Tuple[datetime.datetime, datetime.datetime]) (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]) (optional): Optional list of tags to allow for tag-based filtering when retrieving data.Returns:
Raises:
Example:
For more information, see the Python SDK Docs.
Parameters:
bytes
List<int> (required)partId
String (required)fileExtension
String (required)componentType
String? (optional)componentName
String? (optional)methodName
String? (optional)methodParameters
Map<String, Any>? (optional)dataRequestTimes
(DateTime, DateTime)? (optional)tags
Iterable<String> (optional)Returns:
Example:
For more information, see the Flutter SDK Docs.
Gets the most recent tabular data captured from the specified data source, as long as it was synced within the last year.
Parameters:
part_id
(str) (required): The ID of the part that owns the data.resource_name
(str) (required): The name of the requested resource that captured the data. Ex: “my-sensor”.resource_api
(str) (required): The API of the requested resource that captured the data. Ex: “rdk:component:sensor”.method_name
(str) (required): The data capture method name. Ex: “Readings”.Returns:
Example:
For more information, see the Python SDK Docs.
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”.Returns:
For more information, see the TypeScript SDK Docs.
Obtain unified tabular data and metadata from the specified data source.
Parameters:
part_id
(str) (required): The ID of the part that owns the data.resource_name
(str) (required): The name of the requested resource that captured the data.resource_api
(str) (required): The API of the requested resource that captured the data.method_name
(str) (required): The data capture method name.start_time
(datetime.datetime) (optional): Optional start time for requesting a specific range of data.end_time
(datetime.datetime) (optional): Optional end time for requesting a specific range of data.Returns:
Example:
For more information, see the Python SDK Docs.
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.Returns:
For more information, see the TypeScript SDK Docs.
Retrieve optionally filtered tabular data from the Viam app. You can also find your tabular data under the Sensors subtab of the app’s Data tab.
Parameters:
filter
(viam.proto.app.data.Filter) (optional): Optional Filter specifying tabular data to retrieve. No Filter implies all tabular data.limit
(int) (optional): The maximum number of entries to include in a page. Defaults to 50 if unspecified.sort_order
(viam.proto.app.data.Order.ValueType) (optional): The desired sort order of the data.last
(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) (required): Whether to return only the total count of entries.include_internal_data
(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) (optional): Optional filepath for writing retrieved data.Returns:
Example:
For more information, see the Python SDK Docs.
Parameters:
filter
(Filter) (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) (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:
For more information, see the TypeScript SDK Docs.
Parameters:
filter
Filter? (optional)limit
int? (optional)sortOrder
Order? (optional)last
String? (optional)countOnly
dynamic (optional)Returns:
Example:
For more information, see the Flutter SDK Docs.
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.
Parameters:
organization_id
(str) (required): The ID of the organization that owns the data. You can obtain your organization ID from the Viam app’s organization settings page.sql_query
(str) (required): The SQL query to run.Returns:
Example:
For more information, see the Python SDK Docs.
Parameters:
organizationId
(string) (required): The ID of the organization that owns the data.query
(string) (required): The SQL query to run.Returns:
For more information, see the TypeScript SDK Docs.
Obtain unified tabular data and metadata, queried with MQL.
Parameters:
organization_id
(str) (required): The ID of the organization that owns the data. You can obtain your organization ID from the Viam app’s organization settings page.query
(List[bytes] | List[Dict[str, Any]]) (required): The MQL query to run, as a list of MongoDB aggregation pipeline stages. Note: Each stage can be provided as either a dictionary or raw BSON bytes, but support for bytes will be removed in the future, so using a dictionary is preferred.use_recent_data
(bool) (optional): Whether to query blob storage or your recent data store. Defaults to False.Returns:
Example:
For more information, see the Python SDK Docs.
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.Returns:
For more information, see the TypeScript SDK Docs.
Retrieve optionally filtered binary data from the Viam app. You can also find your binary data under the Images, Point clouds, or Files subtab of the app’s Data tab, depending on the type of data that you have uploaded.
Parameters:
filter
(viam.proto.app.data.Filter) (optional): Optional Filter specifying tabular data to retrieve. No Filter implies all binary data.limit
(int) (optional): The maximum number of entries to include in a page. Defaults to 50 if unspecified.sort_order
(viam.proto.app.data.Order.ValueType) (optional): The desired sort order of the data.last
(str) (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) (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) (required): Whether to return only the total count of entries.include_internal_data
(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) (optional): Optional filepath for writing retrieved data.Returns:
Example:
For more information, see the Python SDK Docs.
Parameters:
filter
(Filter) (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) (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:
For more information, see the TypeScript SDK Docs.
Retrieve binary data from the Viam app by BinaryID
.
You can also find your binary data under the Images, Point clouds, or Files subtab of the app’s Data tab, depending on the type of data that you have uploaded.
Parameters:
binary_ids
(List[viam.proto.app.data.BinaryID]) (required): BinaryID objects specifying the desired data. Must be non-empty.dest
(str) (optional): Optional filepath for writing retrieved data.Returns:
Raises:
Example:
For more information, see the Python SDK Docs.
Parameters:
ids
(BinaryID) (required): The IDs of the requested binary data.Returns:
For more information, see the TypeScript SDK Docs.
Delete tabular data older than a specified number of days.
Parameters:
organization_id
(str) (required): ID of organization to delete data from. You can obtain your organization ID from the Viam app’s organization settings page.delete_older_than_days
(int) (required): Delete data that was captured up to this many days ago. For example if delete_older_than_days is 10, this deletes any data that was captured up to 10 days ago. If it is 0, all existing data is deleted.Returns:
Example:
For more information, see the Python SDK Docs.
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 if deleteOlderThanDays is 10, this deletes
any data that was captured more than 10 days ago. If it is 0, all
existing data is deleted.Returns:
For more information, see the TypeScript SDK Docs.
Filter and delete binary data.
Parameters:
filter
(viam.proto.app.data.Filter) (optional): Optional Filter specifying binary data to delete. Passing an empty Filter will lead to all data being deleted. Exercise caution when using this option. You must specify an organization ID with “organization_ids” when using this option.Returns:
Example:
For more information, see the Python SDK Docs.
Parameters:
filter
(Filter) (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:
For more information, see the TypeScript SDK Docs.
Filter and delete binary data by ids.
Parameters:
binary_ids
(List[viam.proto.app.data.BinaryID]) (required): BinaryID objects specifying the data to be deleted. Must be non-empty.Returns:
Raises:
Example:
For more information, see the Python SDK Docs.
Parameters:
ids
(BinaryID) (required): The IDs of the data to be deleted. Must be non-empty.Returns:
For more information, see the TypeScript SDK Docs.
Add tags to binary data by ids.
Parameters:
tags
(List[str]) (required): List of tags to add to specified binary data. Must be non-empty.binary_ids
(List[viam.proto.app.data.BinaryID]) (required): List of BinaryID objects specifying binary data to tag. Must be non-empty.Returns:
Raises:
Example:
For more information, see the Python SDK Docs.
Parameters:
tags
(string) (required): The list of tags to add to specified binary data. Must be
non-empty.ids
(BinaryID) (required): The IDs of the data to be tagged. Must be non-empty.Returns:
For more information, see the TypeScript SDK Docs.
Add tags to binary data by filter.
Parameters:
tags
(List[str]) (required): List of tags to add to specified binary data. Must be non-empty.filter
(viam.proto.app.data.Filter) (optional): Filter specifying binary data to tag. If no Filter is provided, all data will be tagged.Returns:
Raises:
Example:
For more information, see the Python SDK Docs.
Parameters:
tags
(string) (required): The tags to add to the data.filter
(Filter) (optional): Optional pb.Filter specifying binary data to add tags to.
No filter implies all binary data.Returns:
For more information, see the TypeScript SDK Docs.
Remove tags from binary by ids.
Parameters:
tags
(List[str]) (required): List of tags to remove from specified binary data. Must be non-empty.binary_ids
(List[viam.proto.app.data.BinaryID]) (required): List of BinaryID objects specifying binary data to untag. Must be non-empty.Returns:
Raises:
Example:
For more information, see the Python SDK Docs.
Parameters:
tags
(string) (required): List of tags to remove from specified binary data. Must be
non-empty.ids
(BinaryID) (required): The IDs of the data to be edited. Must be non-empty.Returns:
For more information, see the TypeScript SDK Docs.
Remove tags from binary data by filter.
Parameters:
tags
(List[str]) (required): List of tags to remove from specified binary data.filter
(viam.proto.app.data.Filter) (optional): Filter specifying binary data to untag. If no Filter is provided, all data will be untagged.Returns:
Raises:
Example:
For more information, see the Python SDK Docs.
Parameters:
tags
(string) (required): List of tags to remove from specified binary data. Must be
non-empty.filter
(Filter) (optional): Optional pb.Filter specifying binary data to add tags to.
No filter implies all binary data.Returns:
For more information, see the TypeScript SDK Docs.
Get a list of tags using a filter.
Parameters:
filter
(viam.proto.app.data.Filter) (optional): Filter specifying data to retrieve from. If no Filter is provided, all data tags will return.Returns:
Example:
For more information, see the Python SDK Docs.
Parameters:
filter
(Filter) (optional): Optional pb.Filter specifying what data to get tags from.
No filter implies all data.Returns:
For more information, see the TypeScript SDK Docs.
Add a bounding box to an image specified by its BinaryID.
Parameters:
binary_id
(viam.proto.app.data.BinaryID) (required): The ID of the image to add the bounding box to.label
(str) (required): A label for the bounding box.x_min_normalized
(float) (required): Min X value of the bounding box normalized from 0 to 1.y_min_normalized
(float) (required): Min Y value of the bounding box normalized from 0 to 1.x_max_normalized
(float) (required): Max X value of the bounding box normalized from 0 to 1.y_max_normalized
(float) (required): Max Y value of the bounding box normalized from 0 to 1.Returns:
Raises:
Example:
For more information, see the Python SDK Docs.
Parameters:
id
(BinaryID) (required)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.Returns:
For more information, see the TypeScript SDK Docs.
Removes a bounding box from an image specified by its BinaryID.
Parameters:
bbox_id
(str) (required): The ID of the bounding box to remove.binary_id
(viam.proto.app.data.BinaryID) (required): Binary ID of the image to remove the bounding box from.Returns:
Example:
For more information, see the Python SDK Docs.
Parameters:
binId
(BinaryID) (required): The ID of the image to remove the bounding box from.bboxId
(string) (required): The ID of the bounding box to remove.Returns:
For more information, see the TypeScript SDK Docs.
Get a list of bounding box labels using a Filter.
Parameters:
filter
(viam.proto.app.data.Filter) (optional): Filter specifying data to retrieve from. If no Filter is provided, all labels will return.Returns:
Example:
For more information, see the Python SDK Docs.
Parameters:
filter
(Filter) (optional): Optional pb.Filter specifying what data to get tags from.
No filter implies all labels.Returns:
For more information, see the TypeScript SDK Docs.
Get a connection to access a MongoDB Atlas Data federation instance.
Parameters:
organization_id
(str) (required): Organization to retrieve the connection for. You can obtain your organization ID from the Viam app’s organization settings page.Returns:
Example:
For more information, see the Python SDK Docs.
Parameters:
organizationId
(string) (required): Organization to retrieve connection for.Returns:
For more information, see the TypeScript SDK Docs.
Parameters:
organizationId
String (required)Returns:
Example:
For more information, see the Flutter SDK Docs.
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.
Parameters:
organization_id
(str) (required): The ID of the organization. You can obtain your organization ID from the Viam app’s organization settings page.password
(str) (required): The password of the user.Returns:
Example:
For more information, see the Python SDK Docs.
Parameters:
organizationId
(string) (required): The ID of the organization.password
(string) (required): The password of the user.Returns:
For more information, see the TypeScript SDK Docs.
Add the BinaryData
to the provided dataset.
This BinaryData will be tagged with the VIAM_DATASET_{id} label.
Parameters:
binary_ids
(List[viam.proto.app.data.BinaryID]) (required): The IDs of binary data to add to dataset. To retrieve these IDs, navigate to your data page, click on an image and copy its File ID from the details tab. To retrieve the dataset ID, navigate to your dataset’s page in the Viam app, and use the left-hand menu to copy the dataset ID.dataset_id
(str) (required): The ID of the dataset to be added to.Returns:
Example:
For more information, see the Python SDK Docs.
Parameters:
ids
(BinaryID) (required): The IDs of binary data to add to dataset.datasetId
(string) (required): The ID of the dataset to be added to.Returns:
For more information, see the TypeScript SDK Docs.
Remove the BinaryData from the provided dataset. This BinaryData will lose the VIAM_DATASET_{id} tag.
Parameters:
binary_ids
(List[viam.proto.app.data.BinaryID]) (required): The IDs of binary data to remove from dataset. To retrieve these IDs, navigate to your data page, click on an image and copy its File ID from the details tab. To retrieve the dataset ID, navigate to your dataset’s page in the Viam app, and use the left-hand menu to copy the dataset ID.dataset_id
(str) (required): The ID of the dataset to be removed from.Returns:
Example:
For more information, see the Python SDK Docs.
Parameters:
ids
(BinaryID) (required): The IDs of the binary data to remove from dataset.datasetId
(string) (required): The ID of the dataset to be removed from.Returns:
For more information, see the TypeScript SDK Docs.
Create a new dataset.
Parameters:
name
(str) (required): The name of the dataset being created.organization_id
(str) (required): The ID of the organization where the dataset is being created. You can obtain your organization ID from the Viam app’s organization settings page.Returns:
Example:
For more information, see the Python SDK Docs.
Delete a dataset.
Parameters:
id
(str) (required): The ID of the dataset. You can retrieve this by navigating to the DATASETS sub-tab of the DATA tab, clicking on the dataset, clicking the … menu and selecting Copy dataset ID.Returns:
Example:
For more information, see the Python SDK Docs.
Parameters:
id
String (required)Returns:
Example:
For more information, see the Flutter SDK Docs.
Rename a dataset specified by the dataset ID.
Parameters:
id
(str) (required): The ID of the dataset. You can retrieve this by navigating to the DATASETS sub-tab of the DATA tab, clicking on the dataset, clicking the … menu and selecting Copy dataset ID.name
(str) (required): The new name of the dataset.Returns:
Example:
For more information, see the Python SDK Docs.
Get the datasets in an organization.
Parameters:
organization_id
(str) (required): The ID of the organization. You can obtain your organization ID from the Viam app’s organization settings page.Returns:
Example:
For more information, see the Python SDK Docs.
Get a list of datasets using their IDs.
Parameters:
ids
(List[str]) (required): The IDs of the datasets being called for. To retrieve these IDs, navigate to your dataset’s page in the Viam app, click … in the left-hand menu, and click Copy dataset ID.Returns:
Example:
For more information, see the Python SDK Docs.
To copy the ID of your machine part, select the part status dropdown to the right of your machine’s location and name on the top of its page and click the copy icon next to Part ID.
For example:
Was this page helpful?
Glad to hear it! If you have any other feedback please let us know:
We're sorry about that. To help us improve, please tell us what we can do better:
Thank you!