Upload and retrieve data with Viam's data client API | APIs
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 |
Upload binary data collected on your machine through a specific component and the relevant metadata to Viam. |
TabularDataCaptureUpload |
Upload tabular data collected on your machine through a specific component to Viam. |
FileUpload |
Upload arbitrary files stored on your machine to Viam by file name. |
FileUploadFromPath |
Upload files stored on your machine to Viam by filepath. |
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 |
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 Viam. |
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 Viam. |
BinaryDataByIDs |
Retrieve binary data from Viam 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. |
RemoveTagsFromBinaryDataByIDs |
Remove tags from binary by ids. |
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. |
GetDataPipeline |
Get the configuration for a data pipeline. |
ListDataPipelines |
List all of the data pipelines in an organization. |
CreateDataPipeline |
Create a data pipeline. |
DeleteDataPipeline |
Delete a data pipeline, its execution history, and all of its output data. |
ListDataPipelineRuns |
Get information about individual executions of a data pipeline. |
RenameDataPipeline |
Rename a data pipeline. |
AddTagsToBinaryDataByFilter |
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. |
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 |
Delete a custom index from your data. |
ListIndexes |
List all custom indexes for an organization. |
RemoveTagsFromBinaryDataByFilter |
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. |
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. |
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 to use the data client API. To get an API key (and corresponding ID), use the web UI to the Viam CLI.
Copy
Copy
Copy
See Use platform APIs from within a module.
Once you have instantiated a DataClient, you can run API methods 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. Uploaded binary data can be found under the Images, Point clouds, or Files subtab of the 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 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, 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.dataset_ids(List[ str]) (optional): Optional list of datasets to add the data to.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.mime_type( str) (optional): Optional mime type of the data.
Returns:
- ( str): : The binary data ID of the uploaded data.
Raises:
- (GRPCError): If an invalid part ID is passed.
Example:
Copy
For more information, see the Python SDK Docs.
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 containingDateobjects denoting the times this data was requested[0] by the robot and received[1] from the appropriate sensor.options( BinaryDataCaptureUploadOptions) (optional): Optional parameters includingmimeType,fileExtension,tags, anddatasetIds.
Returns:
- (Promise): The binary data ID of the uploaded data.
Example:
Copy
For more information, see the TypeScript SDK Docs.
Parameters:
binaryDataList < int > (required)partIdString (required)fileExtensionString (required)componentTypeString? (optional)componentNameString? (optional)methodNameString? (optional)methodParametersMap < String, Any>? (optional)dataRequestTimes( DateTime, DateTime)? (optional)datasetIdsIterable < String > (optional)tagsIterable < String > (optional)
Returns:
Example:
Copy
For more information, see the Flutter SDK Docs.
TabularDataCaptureUpload
Upload tabular data collected on your machine through a specific component to Viam. Uploaded tabular data can be found under the Sensors subtab of the Data tab.
Size limit
Viam enforces a maximum size of 4MB for any single reading for tabular data.
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. 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, 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:
- ( 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:
Copy
For more information, see the Python SDK Docs.
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 twoDateobjects 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:
Copy
For more information, see the TypeScript SDK Docs.
Parameters:
tabularDataList < Map < String, dynamic» (required)partIdString (required)componentTypeString? (optional)componentNameString? (optional)methodNameString? (optional)methodParametersMap < String, Any>? (optional)dataRequestTimesList <( DateTime, DateTime)>? (optional)tagsIterable < String > (optional)
Returns:
Example:
Copy
For more information, see the Flutter SDK Docs.
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. 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.
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.dataset_ids(List[ str]) (optional): Optional list of datasets to add the data to.mime_type( str) (optional): Optional mime type of the data.
Returns:
- ( str): : Binary data ID of the new file.
Raises:
- (GRPCError): If an invalid part ID is passed.
Example:
Copy
For more information, see the Python SDK Docs.
Parameters:
pathString (required)partIdString (required)fileNameString? (optional)componentTypeString? (optional)componentNameString? (optional)methodNameString? (optional)methodParametersMap < String, Any>? (optional)datasetIdsIterable < String > (optional)tagsIterable < String > (optional)
Returns:
Example:
Copy
For more information, see the Flutter SDK Docs.
FileUploadFromPath
Upload files stored on your machine to Viam by filepath. Uploaded files can be found under the Files subtab of the 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.dataset_ids(List[ str]) (optional): Optional list of datasets to add the data to.mime_type( str) (optional): Optional mime type of the data.file_name( str) (optional): Optional name of the file. If not provided, the name is derived from the filepath.
Returns:
- ( 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:
Copy
For more information, see the Python SDK Docs.
StreamingDataCaptureUpload
Upload the contents of streaming binary data and the relevant metadata to Viam. 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.dataset_ids(List[ str]) (optional): Optional list of datasets to add the data to.mime_type( str) (optional): Optional mime type of the data.
Returns:
- ( str): : The binary data ID of the uploaded data.
Raises:
- (GRPCError): If an invalid part ID is passed.
Example:
Copy
For more information, see the Python SDK Docs.
Parameters:
bytesList < int > (required)partIdString (required)fileExtensionString (required)componentTypeString? (optional)componentNameString? (optional)methodNameString? (optional)methodParametersMap < String, Any>? (optional)dataRequestTimes( DateTime, DateTime)? (optional)datasetIdsIterable < String > (optional)tagsIterable < String > (optional)
Returns:
Example:
Copy
For more information, see the Flutter SDK Docs.
GetLatestTabularData
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. For example, “my-sensor”.resource_api( str) (required): The API of the requested resource that captured the data. For example, “rdk:component:sensor”.method_name( str) (required): The data capture method name. For exampe, “Readings”.additional_params(Mapping[ str, viam.utils.ValueTypes]) (optional): Optional additional parameters of the resource that captured the data.
Returns:
- (Tuple[ datetime.datetime, datetime.datetime, Dict[ str, viam.utils.ValueTypes]] | None): : A return value of
Nonemeans 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:
Copy
For more information, see the Python SDK Docs.
Parameters:
ctx(Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.partIDresourceNameresourceSubtypemethodName(string)opts(*TabularDataOptions)
Returns:
- (*GetLatestTabularDataResponse)
- (error): An error, if one occurred.
For more information, see the Go 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”.additionalParams(Record) (optional)
Returns:
- (Promise<null | [Date, Date, Record<string, JsonValue >]>): 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:
Copy
For more information, see the TypeScript SDK Docs.
Parameters:
partIdString (required)resourceNameString (required)resourceSubtypeString (required)methodNameString (required)additionalParamsMap < String, dynamic>? (required)
Returns:
Example:
Copy
For more information, see the Flutter SDK Docs.
ExportTabularData
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.additional_params(Mapping[ str, viam.utils.ValueTypes]) (optional): Optional additional parameters of the resource that captured the data.
Returns:
- ( List[TabularDataPoint]): : The unified tabular data and metadata.
Example:
Copy
For more information, see the Python SDK Docs.
Parameters:
ctx(Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.partIDresourceNameresourceSubtypemethod(string)interval(CaptureInterval)opts(*TabularDataOptions)
Returns:
- ([]*ExportTabularDataResponse)
- (error): An error, if one occurred.
For more information, see the Go 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 (Dateobject) for requesting a specific range of data.endTime(Date) (optional): Optional end time (Dateobject) for requesting a specific range of data.additionalParams(Record) (optional)
Returns:
- (Promise<TabularDataPoint[]>): An array of unified tabular data and metadata.
Example:
Copy
For more information, see the TypeScript SDK Docs.
Parameters:
partIdString (required)resourceNameString (required)resourceSubtypeString (required)methodNameString (required)startTimeDateTime? (required)endTimeDateTime? (required)additionalParamsMap < String, dynamic>? (required)
Returns:
- Future < List < TabularDataPoint >>
Example:
Copy
For more information, see the Flutter SDK Docs.
TabularDataByFilter
Retrieve optionally filtered tabular data from Viam. You can also find your tabular data under the Sensors subtab of the Data tab.
Parameters:
filter( viam.proto.app.data.Filter) (optional): Optional, specifies tabular data to retrieve. If missing, matches 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 toTabularDataByFilteras 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:
- (Tuple[List[TabularData], int, 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:
Copy
For more information, see the Python SDK Docs.
Parameters:
ctx(Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.opts(*DataByFilterOptions)
Returns:
- (*TabularDataByFilterResponse)
- (error): An error, if one occurred.
For more information, see the Go SDK Docs.
Parameters:
filter( Filter) (optional): Optionalpb.Filterspecifying tabular data to retrieve. Nofilterimplies 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 thelastID.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 tofalse.
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:
Copy
For more information, see the TypeScript SDK Docs.
Parameters:
filterFilter? (optional)limitint? (optional)sortOrderOrder? (optional)lastString? (optional)countOnlydynamic (optional)
Returns:
Example:
Copy
For more information, see the Flutter SDK Docs.
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.
Parameters:
organization_id( str) (required): The ID of the organization that owns the data. To find your organization ID, visit the organization settings page.sql_query( str) (required): The SQL query to run.
Returns:
- (List[Dict[ str, viam.utils.ValueTypes | datetime.datetime]]): : An array of decoded BSON data objects.
Example:
Copy
For more information, see the Python SDK Docs.
Parameters:
ctx(Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.organizationIDsqlQuery(string)
Returns:
- ([]map[string]interface{})
- (error): An error, if one occurred.
For more information, see the Go SDK Docs.
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:
Copy
For more information, see the TypeScript SDK Docs.
Parameters:
Returns:
Example:
Copy
For more information, see the Flutter SDK Docs.
TabularDataByMQL
Obtain unified tabular data and metadata, queried with MQL.
Parameters:
organization_id( str) (required): The ID of the organization that owns the data. To find your organization ID, visit the organization settings page.query(List[ bytes] | List[Dict[ 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) (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) (required): The data source to query. Defaults to TABULAR_DATA_SOURCE_TYPE_STANDARD.pipeline_id( 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) (optional): Optional field that can be used to specify a saved query to run.
Returns:
Example:
Copy
For more information, see the Python SDK Docs.
Parameters:
ctx(Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.organizationID(string)query([]map[string]interface{})opts(*TabularDataByMQLOptions)
Returns:
- ([]map[string]interface{})
- (error): An error, if one occurred.
For more information, see the Go 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. Deprecated - use dataSource instead.tabularDataSource( TabularDataSource) (optional)queryPrefixName(string) (optional): Optional name of the query prefix.
Returns:
- (Promise<(Object | any[])[]>): An array of data objects.
Example:
Copy
For more information, see the TypeScript SDK Docs.
Parameters:
organizationIdString (required)querydynamic (required)useRecentDatabool (optional)queryPrefixNameString? (optional)
Returns:
Example:
Copy
For more information, see the Flutter SDK Docs.
BinaryDataByFilter
Retrieve optionally filtered binary data from Viam. You can also find your binary data under the Images, Point clouds, or Files subtab of the Data tab, depending on the type of data that you have uploaded.
Parameters:
filter( viam.proto.app.data.Filter) (optional): Optional, specifies tabular data to retrieve. An empty filter matches 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 toBinaryDataByFilteras 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:
- (Tuple[List[viam.proto.app.data.BinaryData], int, str]): : A tuple containing the following:
\*
data( List[BinaryData]): The binary data. \*count( int): The count (number of entries). \*last( str): The last-returned page ID.
Example:
Copy
For more information, see the Python SDK Docs.
Parameters:
ctx(Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.includeBinary(bool)opts(*DataByFilterOptions)
Returns:
- (*BinaryDataByFilterResponse)
- (error): An error, if one occurred.
For more information, see the Go SDK Docs.
Parameters:
filter( Filter) (optional): Optionalpb.Filterspecifying binary data to retrieve. Nofilterimplies 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 thelastID.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 tofalse.
Returns:
- (Promise<{ count: bigint; data: BinaryData[]; last: string }>): An array of data objects, the count (number of entries), and the last-returned page ID.
Example:
Copy
For more information, see the TypeScript SDK Docs.
Parameters:
filterFilter? (optional)limitint? (optional)sortOrderOrder? (optional)lastString? (optional)countOnlybool (optional)includeBinarybool (optional)
Returns:
Example:
Copy
For more information, see the Flutter SDK Docs.
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, depending on the type of data that you have uploaded.
Parameters:
binary_ids( List[viam.proto.app.data.BinaryID] | List[str]) (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) (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) (optional): Optional filepath for writing retrieved data.
Returns:
- ( List[viam.proto.app.data.BinaryData]): : The binary data.
Raises:
- (GRPCError): If no binary data ID strings or BinaryID objects are provided.
Example:
Copy
For more information, see the Python SDK Docs.
Parameters:
ctx(Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.binaryDataIDs([]string)opts(…*BinaryDataByIDsOptions)
Returns:
- ([]*BinaryData)
- (error): An error, if one occurred.
For more information, see the Go SDK Docs.
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[]>): An array of data objects.
Example:
Copy
For more information, see the TypeScript SDK Docs.
Parameters:
Returns:
Example:
Copy
For more information, see the Flutter SDK Docs.
DeleteTabularData
Delete tabular data older than a specified number of days. If the organization has a hot data store, matching data is deleted from that store as well.
Parameters:
organization_id( 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) (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) (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): : The number of items deleted.
Example:
Copy
For more information, see the Python SDK Docs.
Parameters:
ctx(Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.organizationID(string)deleteOlderThanDays(int)filter(*pb.DeleteTabularFilter)
Returns:
For more information, see the Go 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, 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:
Copy
For more information, see the TypeScript SDK Docs.
Parameters:
organizationIdString (required)olderThanDaysint (required)filterDeleteTabularFilter? (optional)
Returns:
Example:
Copy
For more information, see the Flutter SDK Docs.
DeleteBinaryDataByFilter
Filter and delete binary data.
Parameters:
filter( 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): : The number of items deleted.
Example:
Copy
For more information, see the Python SDK Docs.
Parameters:
ctx(Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.filter(*Filter)
Returns:
For more information, see the Go SDK Docs.
Parameters:
filter( Filter) (optional): Optionalpb.Filterspecifying binary data to delete. Nofilterimplies all binary data.includeInternalData(boolean) (optional): Whether or not to delete internal data. Default is true.
Returns:
- (Promise): The number of items deleted.
Example:
Copy
For more information, see the TypeScript SDK Docs.
Parameters:
Returns:
Example:
Copy
For more information, see the Flutter SDK Docs.
DeleteBinaryDataByIDs
Filter and delete binary data by ids.
Parameters:
binary_ids( List[viam.proto.app.data.BinaryID] | List[str]) (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): : The number of items deleted.
Raises:
- (GRPCError): If no binary data ID strings or BinaryID objects are provided.
Example:
Copy
For more information, see the Python SDK Docs.
Parameters:
ctx(Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.binaryDataIDs([]string)
Returns:
For more information, see the Go SDK Docs.
Parameters:
ids(string) (required): The IDs of the data to be deleted. Must be non-empty.
Returns:
- (Promise): The number of items deleted.
Example:
Copy
For more information, see the TypeScript SDK Docs.
Parameters:
Returns:
Example:
Copy
For more information, see the Flutter SDK Docs.
AddTagsToBinaryDataByIDs
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] | List[str]) (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:
Copy
For more information, see the Python SDK Docs.
Parameters:
ctx(Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.tagsbinaryDataIDs([]string)
Returns:
- (error): An error, if one occurred.
For more information, see the Go SDK Docs.
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:
Copy
For more information, see the TypeScript SDK Docs.
Parameters:
Returns:
Example:
Copy
For more information, see the Flutter SDK Docs.
RemoveTagsFromBinaryDataByIDs
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] | List[str]) (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): : The number of tags removed.
Raises:
- (GRPCError): If no binary data ID strings, BinaryID objects, or tags are provided.
Example:
Copy
For more information, see the Python SDK Docs.
Parameters:
Returns:
For more information, see the Go SDK Docs.
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:
Copy
For more information, see the TypeScript SDK Docs.
Parameters:
Returns:
Example:
Copy
For more information, see the Flutter SDK Docs.
TagsByFilter
Get a list of tags using a filter.
Parameters:
filter( viam.proto.app.data.Filter) (optional): Specifies subset ofdata to retrieve tags from. If none is provided, returns all tags.
Returns:
- (List[ str]): : The list of tags.
Example:
Copy
For more information, see the Python SDK Docs.
Parameters:
filter( Filter) (optional): Optionalpb.Filterspecifying what data to get tags from. Nofilterimplies all data.
Returns:
- (Promise<string[]>): The list of tags.
Example:
Copy
For more information, see the TypeScript SDK Docs.
Parameters:
filterFilter? (required)
Returns:
Example:
Copy
For more information, see the Flutter SDK Docs.
AddBoundingBoxToImageByID
Add a bounding box to an image specified by its BinaryID.
Parameters:
binary_id( viam.proto.app.data.BinaryID | str) (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) (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.confidence_score( float) (optional): Confidence level of the bounding box being correct.
Returns:
- ( str): : The bounding box ID.
Raises:
- (GRPCError): If the X or Y values are outside of the [0, 1] range.
Example:
Copy
For more information, see the Python SDK Docs.
Parameters:
ctx(Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.binaryDataID(string)label(string)xMinNormalized(float64)yMinNormalized(float64)xMaxNormalized(float64)yMaxNormalized(float64)
Returns:
For more information, see the Go SDK Docs.
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:
Copy
For more information, see the TypeScript SDK Docs.
Parameters:
labelString (required)binaryDataIdString (required)xMinNormalizeddouble (required)yMinNormalizeddouble (required)xMaxNormalizeddouble (required)yMaxNormalizeddouble (required)
Returns:
Example:
Copy
For more information, see the Flutter SDK Docs.
RemoveBoundingBoxFromImageByID
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 | str) (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:
Copy
For more information, see the Python SDK Docs.
Parameters:
ctx(Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.bboxID(string)binaryDataID(string)
Returns:
- (error): An error, if one occurred.
For more information, see the Go SDK Docs.
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:
Copy
For more information, see the TypeScript SDK Docs.
Parameters:
Returns:
Example:
Copy
For more information, see the Flutter SDK Docs.
BoundingBoxLabelsByFilter
Get a list of bounding box labels using a Filter.
Parameters:
filter( viam.proto.app.data.Filter) (optional): Specifies data to retrieve bounding box labels from. If none is provided, returns labels.
Returns:
- (List[ str]): : The list of bounding box labels.
Example:
Copy
For more information, see the Python SDK Docs.
Parameters:
Returns:
- ([]string)
- (error): An error, if one occurred.
For more information, see the Go SDK Docs.
Parameters:
filter( Filter) (optional): Optionalpb.Filterspecifying what data to get tags from. Nofilterimplies all labels.
Returns:
- (Promise<string[]>): The list of bounding box labels.
Example:
Copy
For more information, see the TypeScript SDK Docs.
Parameters:
filterFilter? (required)
Returns:
Example:
Copy
For more information, see the Flutter SDK Docs.
GetDatabaseConnection
Get a connection to access a MongoDB Atlas Data federation instance.
Parameters:
organization_id( 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): : The hostname of the federated database.
Example:
Copy
For more information, see the Python SDK Docs.
Parameters:
ctx(Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.organizationID(string)
Returns:
- (*GetDatabaseConnectionResponse)
- (error): An error, if one occurred.
For more information, see the Go SDK Docs.
Parameters:
organizationId(string) (required): Organization to retrieve connection for.
Returns:
- (Promise): Hostname of the federated database.
Example:
Copy
For more information, see the TypeScript SDK Docs.
Parameters:
organizationIdString (required)
Returns:
Example:
Copy
For more information, see the Flutter SDK Docs.
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.
Parameters:
organization_id( 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) (required): The password of the user.
Returns:
- None.
Example:
Copy
For more information, see the Python SDK Docs.
Parameters:
ctx(Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.organizationID(string)password(string)
Returns:
- (error): An error, if one occurred.
For more information, see the Go SDK Docs.
Parameters:
organizationId(string) (required): The ID of the organization.password(string) (required): The password of the user.
Returns:
- (Promise)
Example:
Copy
For more information, see the TypeScript SDK Docs.
Parameters:
Returns:
Example:
Copy
For more information, see the Flutter SDK Docs.
AddBinaryDataToDatasetByIDs
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] | List[str]) (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) (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:
Copy
For more information, see the Python SDK Docs.
Parameters:
ctx(Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.binaryDataIDs([]string)datasetID(string)
Returns:
- (error): An error, if one occurred.
For more information, see the Go SDK Docs.
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:
Copy
For more information, see the TypeScript SDK Docs.
Parameters:
Returns:
Example:
Copy
For more information, see the Flutter SDK Docs.
RemoveBinaryDataFromDatasetByIDs
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] | List[str]) (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) (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:
Copy
For more information, see the Python SDK Docs.
Parameters:
Returns:
- (error): An error, if one occurred.
For more information, see the Go SDK Docs.
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:
Copy
For more information, see the TypeScript SDK Docs.
Parameters:
Returns:
Example:
Copy
For more information, see the Flutter SDK Docs.
GetDataPipeline
Get the configuration for a data pipeline.
Parameters:
id( str) (required): The ID of the data pipeline to get.
Returns:
- ( DataPipeline): : The data pipeline with the given ID.
Example:
Copy
For more information, see the Python SDK Docs.
Parameters:
ctx(Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.id(string)
Returns:
- (*DataPipeline)
- (error): An error, if one occurred.
For more information, see the Go SDK Docs.
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:
Copy
For more information, see the TypeScript SDK Docs.
ListDataPipelines
List all of the data pipelines in an organization.
Parameters:
organization_id( 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]): : A list of all of the data pipelines for the given organization.
Example:
Copy
For more information, see the Python SDK Docs.
Parameters:
Returns:
- ([]*DataPipeline)
- (error): An error, if one occurred.
For more information, see the Go SDK Docs.
Parameters:
organizationId(string) (required): The ID of the organization.
Returns:
- (Promise<DataPipeline[]>): The list of data pipelines.
Example:
Copy
For more information, see the TypeScript SDK Docs.
CreateDataPipeline
Create a data pipeline.
Parameters:
organization_id( 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) (required): The name of the pipeline.mql_binary(List[Dict[ str, Any]]) (required): The MQL pipeline to run, as a list of MongoDB aggregation pipeline stages.schedule( 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) (required): When true, pipeline runs will be scheduled for the organization’s past data.data_source_type( viam.proto.app.data.TabularDataSourceType.ValueType) (required): The type of data source to use for the pipeline. Defaults to TabularDataSourceType.TABULAR_DATA_SOURCE_TYPE_STANDARD.
Returns:
- ( str): : The ID of the newly created pipeline.
Example:
Copy
For more information, see the Python SDK Docs.
Parameters:
ctx(Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.organizationIDname(string)query([]map[string]interface{})schedule(string)enableBackfill(bool)opts(*CreateDataPipelineOptions)
Returns:
For more information, see the Go SDK Docs.
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) (optional): The type of data source to use for the data pipeline.
Returns:
- (Promise): The ID of the created data pipeline.
Example:
Copy
For more information, see the TypeScript SDK Docs.
DeleteDataPipeline
Delete a data pipeline, its execution history, and all of its output data.
Parameters:
id( str) (required): The ID of the data pipeline to delete.
Returns:
- None.
Example:
Copy
For more information, see the Python SDK Docs.
Parameters:
Returns:
- (error): An error, if one occurred.
For more information, see the Go SDK Docs.
Parameters:
pipelineId(string) (required): The ID of the data pipeline.
Returns:
- (Promise)
Example:
Copy
For more information, see the TypeScript SDK Docs.
ListDataPipelineRuns
Get information about individual executions of a data pipeline.
Parameters:
id( str) (required): The ID of the pipeline to list runs for.page_size( int) (required): The number of runs to return per page. Defaults to 10.
Returns:
- ( DataPipelineRunsPage): : A page of data pipeline runs with pagination support.
Example:
Copy
For more information, see the Python SDK Docs.
Parameters:
ctx(Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.id(string)pageSize(uint32)
Returns:
- (*ListDataPipelineRunsPage)
- (error): An error, if one occurred.
For more information, see the Go SDK Docs.
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:
Copy
For more information, see the TypeScript SDK Docs.
RenameDataPipeline
Rename a data pipeline.
Parameters:
ctx(Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.idname(string)
Returns:
- (error): An error, if one occurred.
For more information, see the Go SDK Docs.
AddTagsToBinaryDataByFilter
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): Specifies binary data to tag. If none is provided, tags all data.
Returns:
- None.
Raises:
- (GRPCError): If no tags are provided.
Example:
Copy
For more information, see the Python SDK Docs.
CreateBinaryDataSignedURL
Create a signed URL for accessing binary data without authentication. The URL expires after the specified duration.
Parameters:
binary_data_id( str) (required): The binary data ID of the file to create a signed URL for.expiration_minutes( int) (optional): Expiration time in minutes. Defaults to 15 minutes if not specified. Maximum allowed is 10080 minutes (7 days).
Returns:
- (Tuple[ str, datetime.datetime]): : 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:
Copy
For more information, see the Python SDK Docs.
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.
Parameters:
organization_id( 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, Any]) (required): The MongoDB index specification defined in JSON format.pipeline_name( str) (optional): The name of the pipeline if the collection type is PIPELINE_SINK.
Returns:
- None.
For more information, see the Python SDK Docs.
DeleteIndex
Delete a custom index from your data.
Parameters:
organization_id( 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) (required): The name of the index to delete.pipeline_name( str) (optional): The name of the pipeline if the collection type is PIPELINE_SINK.
Returns:
- None.
For more information, see the Python SDK Docs.
ListIndexes
List all custom indexes for an organization.
Parameters:
organization_id( 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) (optional): The name of the pipeline if the collection type is PIPELINE_SINK.
Returns:
- ( Sequence[viam.proto.app.data.Index]): : A list of indexes.
For more information, see the Python SDK Docs.
RemoveTagsFromBinaryDataByFilter
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): Specifies binary data to untag. If none is provided, removes tags from all data.
Returns:
- ( int): : The number of tags removed.
Raises:
- (GRPCError): If no tags are provided.
Example:
Copy
For more information, see the Python SDK Docs.
UpdateBoundingBox
Update an existing bounding box on an image. You can change the label, position, or dimensions of the bounding box.
Parameters:
binary_id( str) (required): The binary data ID of the image to add the bounding box to.bbox_id( str) (required): The ID of the bounding box to be updated.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.confidence_score( float) (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:
Copy
For more information, see the Python SDK Docs.
CreateDataset
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. To find your organization ID, visit the organization settings page.
Returns:
- ( str): : The dataset ID of the created dataset.
Example:
Copy
For more information, see the Python SDK Docs.
Parameters:
ctx(Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.nameorganizationID(string)
Returns:
For more information, see the Go SDK Docs.
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:
Copy
For more information, see the TypeScript SDK Docs.
Parameters:
Returns:
Example:
Copy
For more information, see the Flutter SDK Docs.
DeleteDataset
Delete a dataset.
Parameters:
id( 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:
Copy
For more information, see the Python SDK Docs.
Parameters:
Returns:
- (error): An error, if one occurred.
For more information, see the Go SDK Docs.
Parameters:
id(string) (required): The ID of the dataset.
Returns:
- (Promise)
Example:
Copy
For more information, see the TypeScript SDK Docs.
Parameters:
idString (required)
Returns:
Example:
Copy
For more information, see the Flutter SDK Docs.
RenameDataset
Rename a dataset specified by the dataset ID.
Parameters:
id( 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) (required): The new name of the dataset.
Returns:
- None.
Example:
Copy
For more information, see the Python SDK Docs.
Parameters:
Returns:
- (error): An error, if one occurred.
For more information, see the Go SDK Docs.
Parameters:
id(string) (required): The ID of the dataset.name(string) (required): The new name of the dataset.
Returns:
- (Promise)
Example:
Copy
For more information, see the TypeScript SDK Docs.
Parameters:
Returns:
Example:
Copy
For more information, see the Flutter SDK Docs.
ListDatasetsByOrganizationID
Get the datasets in an organization.
Parameters:
organization_id( 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]): : The list of datasets in the organization.
Example:
Copy
For more information, see the Python SDK Docs.
Parameters:
Returns:
- ([]*Dataset)
- (error): An error, if one occurred.
For more information, see the Go SDK Docs.
Parameters:
organizationId(string) (required): The ID of the organization.
Returns:
- (Promise<Dataset[]>): The list of datasets in the organization.
Example:
Copy
For more information, see the TypeScript SDK Docs.
Parameters:
orgIdString (required)
Returns:
Example:
Copy
For more information, see the Flutter SDK Docs.
ListDatasetsByIDs
Get a list of datasets using their IDs.
Parameters:
ids(List[ 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]): : The list of datasets.
Example:
Copy
For more information, see the Python SDK Docs.
Parameters:
ctx(Context): A Context carries a deadline, a cancellation signal, and other values across API boundaries.ids([]string)
Returns:
- ([]*Dataset)
- (error): An error, if one occurred.
For more information, see the Go SDK Docs.
Parameters:
ids(string) (required): The list of IDs of the datasets.
Returns:
- (Promise<Dataset[]>): The list of datasets.
Example:
Copy
For more information, see the TypeScript SDK Docs.
Parameters:
Returns:
Example:
Copy
For more information, see the Flutter SDK Docs.
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!