DataClient class App
gRPC client used for retrieving, uploading, and modifying stored data from app.viam.com.
All calls must be authenticated.
For more information, see Data Client API.
Constructors
- DataClient(DataServiceClient _dataClient, DataSyncServiceClient _dataSyncClient, DatasetServiceClient _datasetClient)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addBinaryDataToDatasetByIds(
List< BinaryID> binaryIds, String datasetId) → Future<void> - Adds binary data to a dataset based on IDs.
-
addBoundingBoxToImageById(
String label, BinaryID binaryId, double xMinNormalized, double yMinNormalized, double xMaxNormalized, double yMaxNormalized) → Future< String> - Add a bounding box to an image by ID, with x and y coordinates normalized from 0 to 1.
-
addTagsToBinaryDataByFilter(
List< String> tags, Filter? filter) → Future<void> -
Adds tags to binary data based on a filter.
If no
filter
is provided, all binary data will be tagged. -
addTagsToBinaryDataByIds(
List< String> tags, List<BinaryID> binaryIds) → Future<void> - Adds tags to binary data based on IDs.
-
binaryDataByFilter(
{Filter? filter, int? limit, Order? sortOrder, String? last, bool countOnly = false, bool includeBinary = false}) → Future< BinaryDataByFilterResponse> -
Filter and download binary data. The data will be paginated into pages of
limit
items, and the last ID will be included in the returned response. -
binaryDataByIds(
List< BinaryID> binaryIds, {bool includeBinary = false}) → Future<BinaryDataByIDsResponse> - Retrieve binary data by IDs
-
binaryDataCaptureUpload(
List< int> binaryData, String partId, String fileExtension, {String? componentType, String? componentName, String? methodName, Map<String, Any> ? methodParameters, (DateTime, DateTime)? dataRequestTimes, Iterable<String> tags = const []}) → Future<String> - Upload binary sensor data to Viam's Data Manager
-
boundingBoxLabelsByFilter(
Filter? filter) → Future< List< String> > -
Returns a list of bounding box labels based on a filter.
If no
filter
is provided, all labels will be returned. -
configureDatabaseUser(
String organizationId, String password) → Future< void> - Configures a database user for Viam's MongoDB Atlas Data Federation instance.
-
createDataset(
String orgId, String name) → Future< String> - Creates a new dataset, returning the new dataset's ID.
-
deleteBinaryDataByFilter(
Filter? filter, {bool includeInternalData = false}) → Future< int> -
Delete binary data based on an optionally provided filter.
If a
filter
is not provided, all data will be deleted. -
deleteBinaryDataByIds(
List< BinaryID> binaryIds) → Future<int> - Delete binary data based on data ID.
-
deleteDataset(
String id) → Future< void> - Deletes a dataset.
-
deleteTabularData(
String organizationId, int olderThanDays) → Future< int> - Delete tabular data older than a provided number of days from an organization.
-
exportTabularData(
String partId, String resourceName, String resourceSubtype, String methodName, DateTime? startTime, DateTime? endTime) → Future< List< TabularDataPoint> > - Obtain unified tabular data and metadata from the specified data source.
-
getDatabaseConnection(
String organizationId) → Future< DatabaseConnection> - Returns a database connection to access a MongoDB Atlas Data Federation instance.
-
getLatestTabularData(
String partId, String resourceName, String resourceSubtype, String methodName) → Future< ({Map< String, dynamic> payload, DateTime timeCaptured, DateTime timeSynced})?> - Gets the most recent tabular data captured from the specified data source, as long as it was synced within the last year.
-
listDatasetsByIDs(
List< String> ids) → Future<List< Dataset> > - Looks up and returns a list of datasets by their IDs.
-
listDatasetsByOrganizationID(
String orgId) → Future< List< Dataset> > - Returns a list of datasets within a given organization.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeBinaryDataFromDatasetByIds(
List< BinaryID> binaryIds, String datasetId) → Future<void> - Removes binary data from a dataset based on IDs.
-
removeBoundingBoxFromImageById(
String bboxId, BinaryID binaryId) → Future< void> - Removes a bounding box from an image based on bbox ID and image ID.
-
removeTagsFromBinaryDataByFilter(
List< String> tags, Filter? filter) → Future<int> -
Remove tags from binary data based on filter.
If a
filter
is not provided, the tags will be removed from all data. -
removeTagsFromBinaryDataByIds(
List< String> tags, List<BinaryID> binaryIds) → Future<int> - Remove tags from binary data based on IDs.
-
renameDataset(
String id, String name) → Future< void> - Renames a dataset by ID.
-
streamingDataCaptureUpload(
List< int> bytes, String partId, String fileExtension, {String? componentType, String? componentName, String? methodName, Map<String, Any> ? methodParameters, (DateTime, DateTime)? dataRequestTimes, Iterable<String> tags = const []}) → Future<String> - Uploads the metadata and contents of streaming binary data
-
tabularDataByFilter(
{Filter? filter, int? limit, Order? sortOrder, String? last, dynamic countOnly = false}) → Future< TabularDataByFilterResponse> -
Filter and download tabular data. The data will be paginated into pages of
limit
items, and the last ID will be included in the returned response. -
tabularDataByMql(
String organizationId, dynamic query, {bool useRecentData = false}) → Future< List< Map< >String, dynamic> > - Obtain unified tabular data and metadata, queried with MQL. The query should be of type List<Map<String, dynamic>>.
-
tabularDataBySql(
String organizationId, String query) → Future< List< Map< >String, dynamic> > - Obtain unified tabular data and metadata, queried with SQL.
-
tabularDataCaptureUpload(
List< Map< tabularData, String partId, {String? componentType, String? componentName, String? methodName, Map<String, dynamic> >String, Any> ? methodParameters, List<(DateTime, DateTime)> ? dataRequestTimes, Iterable<String> tags = const []}) → Future<String> - Upload tabular sensor data to Viam's Data Manager
-
Returns a list of tags based on a filter.
If no
filter
is provided, all tags will be returned. -
toString(
) → String -
A string representation of this object.
inherited
-
uploadFile(
String path, String partId, {String? fileName, String? componentType, String? componentName, String? methodName, Map< String, Any> ? methodParameters, Iterable<String> tags = const []}) → Future<String> - Upload a file from its path to Viam's Data Manager
-
uploadImage(
ViamImage image, String partId, {String? fileName, String? componentType, String? componentName, String? methodName, Map< String, Any> ? methodParameters, Iterable<String> tags = const []}) → Future<String> - Upload an image to Viam's Data Manager
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited