organization_data_api module#
- class edgeimpulse_api.api.organization_data_api.OrganizationDataApi(api_client=None)[source]#
Bases:
object
- add_organization_bucket(
- organization_id: StrictInt[StrictInt],
- add_organization_bucket_request: AddOrganizationBucketRequest,
- **kwargs,
Add a storage bucket
Add a storage bucket.
- Parameters:
organization_id (int) – Organization ID (required)
add_organization_bucket_request (AddOrganizationBucketRequest) – (required)
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- add_organization_data_file(
- organization_id: StrictInt[StrictInt],
- data_id: StrictInt[StrictInt],
- files: List[StrictBytes],
- **kwargs,
Add files
Add a new file to an existing data item.
- Parameters:
organization_id (int) – Organization ID (required)
data_id (int) – Data ID (required)
files (List[str]) – (required)
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- add_organization_data_folder(
- organization_id: StrictInt[StrictInt],
- organization_add_data_folder_request: OrganizationAddDataFolderRequest,
- **kwargs,
Add data items from bucket
Bulk adds data items that already exist in a storage bucket. The bucket path specified should contain folders. Each folder is added as a data item in Edge Impulse.
- Parameters:
organization_id (int) – Organization ID (required)
organization_add_data_folder_request (OrganizationAddDataFolderRequest) – (required)
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- add_organization_data_item(
- organization_id: StrictInt[StrictInt],
- name: StrictStr,
- dataset: StrictStr,
- metadata: StrictStr[StrictStr],
- files: List[StrictBytes],
- bucket_id: StrictInt | None = None,
- bucket_name: StrictStr | None[StrictStr | None] = None,
- bucket_path: StrictStr | None[StrictStr | None] = None,
- **kwargs,
Add new data
Add a new data item. You can add a maximum of 10000 files directly through this API. Use addOrganizationDataFile to add additional files.
- Parameters:
organization_id (int) – Organization ID (required)
name (str) – (required)
dataset (str) – (required)
metadata (str) – Key-value pair of metadata (in JSON format) (required)
files (List[str]) – (required)
bucket_id (int) –
bucket_name (str) – Name of the bucket name (as an Edge Impulse name)
bucket_path (str) – Optional path in the bucket to create this data item (files are created under this path).
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- add_organization_dataset(
- organization_id: StrictInt[StrictInt],
- organization_add_dataset_request: OrganizationAddDatasetRequest,
- **kwargs,
Add dataset
Add a new research dataset
- Parameters:
organization_id (int) – Organization ID (required)
organization_add_dataset_request (OrganizationAddDatasetRequest) – (required)
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- change_dataset_organization_data_items(
- organization_id: StrictInt[StrictInt],
- data_ids: StrictStr[StrictStr],
- set_organization_data_dataset_request: SetOrganizationDataDatasetRequest,
- dataset: StrictStr | None[StrictStr | None] = None,
- filter: StrictStr | None[StrictStr | None] = None,
- **kwargs,
Change dataset
Change the dataset for selected data items.
- Parameters:
organization_id (int) – Organization ID (required)
data_ids (str) – Data IDs as an Array (required)
set_organization_data_dataset_request (SetOrganizationDataDatasetRequest) – (required)
dataset (str) – Selected dataset
filter (str) – Data filter in SQL WHERE format, where you can reference ‘dataset’, ‘bucket’, ‘name’, ‘total_file_count’, ‘total_file_size’, ‘created’ and any metadata label through ‘metadata->’ (dots are replaced by underscore).
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- clear_checklist_organization_data_items(
- organization_id: StrictInt[StrictInt],
- data_ids: StrictStr[StrictStr],
- dataset: StrictStr | None[StrictStr | None] = None,
- filter: StrictStr | None[StrictStr | None] = None,
- **kwargs,
Clear checklist for data
Clear all checklist flags for selected data items.
- Parameters:
organization_id (int) – Organization ID (required)
data_ids (str) – Data IDs as an Array (required)
dataset (str) – Selected dataset
filter (str) – Data filter in SQL WHERE format, where you can reference ‘dataset’, ‘bucket’, ‘name’, ‘total_file_count’, ‘total_file_size’, ‘created’ and any metadata label through ‘metadata->’ (dots are replaced by underscore).
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- create_signed_upload_link_dataset(
- organization_id: StrictInt[StrictInt],
- dataset: StrictStr[StrictStr],
- create_signed_upload_link_request: CreateSignedUploadLinkRequest,
- **kwargs,
Create pre-signed S3 upload link
Creates a signed link to securely upload data to s3 bucket directly from the client.
- Parameters:
organization_id (int) – Organization ID (required)
dataset (str) – Dataset name (required)
create_signed_upload_link_request (CreateSignedUploadLinkRequest) – (required)
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- delete_dataset_file(
- organization_id: StrictInt[StrictInt],
- dataset: StrictStr[StrictStr],
- delete_portal_file_request: DeletePortalFileRequest,
- **kwargs,
Delete file from dataset
Delete a file from a dataset
- Parameters:
organization_id (int) – Organization ID (required)
dataset (str) – Dataset name (required)
delete_portal_file_request (DeletePortalFileRequest) – (required)
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- delete_organization_data_file(
- organization_id: StrictInt[StrictInt],
- data_id: StrictInt[StrictInt],
- file_name: StrictStr[StrictStr],
- **kwargs,
Delete file
Delete a single file from a data item.
- Parameters:
organization_id (int) – Organization ID (required)
data_id (int) – Data ID (required)
file_name (str) – File name (required)
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- delete_organization_data_item(
- organization_id: StrictInt[StrictInt],
- data_id: StrictInt[StrictInt],
- **kwargs,
Delete data
Delete a data item. This will remove items the items from the underlying storage if your dataset has “bucketPath” set.
- Parameters:
organization_id (int) – Organization ID (required)
data_id (int) – Data ID (required)
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- delete_organization_data_items(
- organization_id: StrictInt[StrictInt],
- data_ids: StrictStr[StrictStr],
- dataset: StrictStr | None[StrictStr | None] = None,
- filter: StrictStr | None[StrictStr | None] = None,
- **kwargs,
Delete data
Delete all data for selected data items. This removes all data in the underlying data bucket.
- Parameters:
organization_id (int) – Organization ID (required)
data_ids (str) – Data IDs as an Array (required)
dataset (str) – Selected dataset
filter (str) – Data filter in SQL WHERE format, where you can reference ‘dataset’, ‘bucket’, ‘name’, ‘total_file_count’, ‘total_file_size’, ‘created’ and any metadata label through ‘metadata->’ (dots are replaced by underscore).
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- delete_organization_projects_data(
- organization_id: StrictInt[StrictInt],
- project_id: StrictInt | None[StrictInt | None] = None,
- ids: StrictStr | None[StrictStr | None] = None,
- **kwargs,
Delete projects data
Delete data samples from organizational projects.
- Parameters:
organization_id (int) – Organization ID (required)
project_id (int) – Unique identifier of the organizational project from where data samples will be fetched.
ids (str) – Only include samples with an ID within the given list of IDs, given as a JSON string
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- download_dataset_file(
- organization_id: StrictInt[StrictInt],
- dataset: StrictStr[StrictStr],
- download_portal_file_request: DownloadPortalFileRequest,
- **kwargs,
Download file from dataset
Download a file from a dataset. Will return a signed URL to the bucket.
- Parameters:
organization_id (int) – Organization ID (required)
dataset (str) – Dataset name (required)
download_portal_file_request (DownloadPortalFileRequest) – (required)
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- download_dataset_folder(
- organization_id: StrictInt[StrictInt],
- dataset: StrictStr[StrictStr],
- path: StrictStr[StrictStr],
- **kwargs,
Download folder from dataset
Download all files in the given folder in a dataset, ignoring any subdirectories.
- Parameters:
organization_id (int) – Organization ID (required)
dataset (str) – Dataset name (required)
path (str) – Path, relative to dataset (required)
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
str
- download_organization_data_file(
- organization_id: StrictInt[StrictInt],
- data_id: StrictInt[StrictInt],
- file_name: StrictStr[StrictStr],
- **kwargs,
Download file
Download a single file from a data item.
- Parameters:
organization_id (int) – Organization ID (required)
data_id (int) – Data ID (required)
file_name (str) – File name (required)
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
str
- download_organization_data_item(
- organization_id: StrictInt[StrictInt],
- data_ids: StrictStr[StrictStr],
- dataset: StrictStr | None[StrictStr | None] = None,
- filter: StrictStr | None[StrictStr | None] = None,
- **kwargs,
Download data
Download all data for selected data items. This function does not query the underlying bucket.
- Parameters:
organization_id (int) – Organization ID (required)
data_ids (str) – Data IDs as an Array (required)
dataset (str) – Selected dataset
filter (str) – Data filter in SQL WHERE format, where you can reference ‘dataset’, ‘bucket’, ‘name’, ‘total_file_count’, ‘total_file_size’, ‘created’ and any metadata label through ‘metadata->’ (dots are replaced by underscore).
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
str
- download_organization_projects_data(
- organization_id: StrictInt[StrictInt],
- project_id: StrictInt | None[StrictInt | None] = None,
- ids: StrictStr | None[StrictStr | None] = None,
- **kwargs,
Download data
Download all selected project data items.
- Parameters:
organization_id (int) – Organization ID (required)
project_id (int) – Unique identifier of the organizational project from where data samples will be fetched.
ids (str) – Only include samples with an ID within the given list of IDs, given as a JSON string
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
str
- download_organization_single_data_item(
- organization_id: StrictInt[StrictInt],
- data_id: StrictInt[StrictInt],
- filter: StrictStr | None[StrictStr | None] = None,
- **kwargs,
Download data
Download all data for this data item.
- Parameters:
organization_id (int) – Organization ID (required)
data_id (int) – Data ID (required)
filter (str) – Data filter in SQL WHERE format, where you can reference ‘dataset’, ‘bucket’, ‘name’, ‘total_file_count’, ‘total_file_size’, ‘created’ and any metadata label through ‘metadata->’ (dots are replaced by underscore).
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
str
- get_organization_bucket(
- organization_id: StrictInt[StrictInt],
- bucket_id: StrictInt[StrictInt],
- **kwargs,
Get storage bucket
Get storage bucket details.
- Parameters:
organization_id (int) – Organization ID (required)
bucket_id (int) – Bucket ID (required)
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- get_organization_data_item(
- organization_id: StrictInt[StrictInt],
- data_id: StrictInt[StrictInt],
- filter: StrictStr | None[StrictStr | None] = None,
- **kwargs,
Get data metadata
Get a data item. This will HEAD the underlying bucket to retrieve the last file information.
- Parameters:
organization_id (int) – Organization ID (required)
data_id (int) – Data ID (required)
filter (str) – Data filter in SQL WHERE format, where you can reference ‘dataset’, ‘bucket’, ‘name’, ‘total_file_count’, ‘total_file_size’, ‘created’ and any metadata label through ‘metadata->’ (dots are replaced by underscore).
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- get_organization_data_item_transform_jobs(
- organization_id: StrictInt[StrictInt],
- data_id: StrictInt[StrictInt],
- limit: StrictInt | None[StrictInt | None] = None,
- offset: StrictInt | None[StrictInt | None] = None,
- **kwargs,
Get transformation jobs for data item
Get all transformation jobs that ran for a data item. If limit / offset is not provided then max. 20 results are returned.
- Parameters:
organization_id (int) – Organization ID (required)
data_id (int) – Data ID (required)
limit (int) – Maximum number of results
offset (int) – Offset in results, can be used in conjunction with LimitResultsParameter to implement paging.
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- get_organization_dataset(
- organization_id: StrictInt[StrictInt],
- dataset: StrictStr[StrictStr],
- **kwargs,
Get dataset
Get information about a dataset
- Parameters:
organization_id (int) – Organization ID (required)
dataset (str) – Dataset name (required)
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- get_organization_projects_data_count(
- organization_id: StrictInt[StrictInt],
- project_id: StrictInt | None[StrictInt | None] = None,
- filter: StrictStr | None[StrictStr | None] = None,
- ids: StrictStr | None[StrictStr | None] = None,
- **kwargs,
Get projects data count
Get the number of samples for all or for a specific organization project.
- Parameters:
organization_id (int) – Organization ID (required)
project_id (int) – Unique identifier of the organizational project from where data samples will be fetched.
filter (str) – Data filter in SQL WHERE format, where you can reference ‘filename’, ‘label’, ‘project_name’, ‘category’, ‘sensors’, ‘frequency’, and any metadata through ‘metadata->’ (dots are replaced by underscore).
ids (str) – Only include samples with an ID within the given list of IDs, given as a JSON string
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- hide_organization_dataset(
- organization_id: StrictInt[StrictInt],
- dataset: StrictStr[StrictStr],
- **kwargs,
Hide dataset
Hide a dataset (does not remove underlying data)
- Parameters:
organization_id (int) – Organization ID (required)
dataset (str) – Dataset name (required)
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- list_dataset_files_in_folder(
- organization_id: StrictInt[StrictInt],
- dataset: StrictStr[StrictStr],
- list_portal_files_in_folder_request: ListPortalFilesInFolderRequest,
- **kwargs,
List files in dataset
List all files and directories in specified prefix.
- Parameters:
organization_id (int) – Organization ID (required)
dataset (str) – Dataset name (required)
list_portal_files_in_folder_request (ListPortalFilesInFolderRequest) – (required)
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- list_organization_buckets(
- organization_id: StrictInt[StrictInt],
- **kwargs,
List storage buckets
Retrieve all configured storage buckets. This does not list the secret key.
- Parameters:
organization_id (int) – Organization ID (required)
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- list_organization_data(
- organization_id: StrictInt[StrictInt],
- dataset: StrictStr | None[StrictStr | None] = None,
- filter: StrictStr | None[StrictStr | None] = None,
- limit: StrictInt | None[StrictInt | None] = None,
- offset: StrictInt | None[StrictInt | None] = None,
- **kwargs,
List data
Lists all data items. This can be filtered by the ?filter parameter.
- Parameters:
organization_id (int) – Organization ID (required)
dataset (str) – Selected dataset
filter (str) – Data filter in SQL WHERE format, where you can reference ‘dataset’, ‘bucket’, ‘name’, ‘total_file_count’, ‘total_file_size’, ‘created’ and any metadata label through ‘metadata->’ (dots are replaced by underscore).
limit (int) – Maximum number of results
offset (int) – Offset in results, can be used in conjunction with LimitResultsParameter to implement paging.
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- list_organization_files(
- organization_id: StrictInt[StrictInt],
- dataset: StrictStr | None[StrictStr | None] = None,
- filter: StrictStr | None[StrictStr | None] = None,
- limit: StrictInt | None[StrictInt | None] = None,
- offset: StrictInt | None[StrictInt | None] = None,
- **kwargs,
List files
Lists all files included by the filter.
- Parameters:
organization_id (int) – Organization ID (required)
dataset (str) – Selected dataset
filter (str) – Data filter in SQL WHERE format, where you can reference ‘dataset’, ‘bucket’, ‘name’, ‘total_file_count’, ‘total_file_size’, ‘created’ and any metadata label through ‘metadata->’ (dots are replaced by underscore).
limit (int) – Maximum number of results
offset (int) – Offset in results, can be used in conjunction with LimitResultsParameter to implement paging.
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- list_organization_projects_data(
- organization_id: StrictInt[StrictInt],
- project_id: StrictInt | None[StrictInt | None] = None,
- filter: StrictStr | None[StrictStr | None] = None,
- ids: StrictStr | None[StrictStr | None] = None,
- limit: StrictInt | None[StrictInt | None] = None,
- offset: StrictInt | None[StrictInt | None] = None,
- **kwargs,
Get projects data
Retrieve all the data samples from organizational projects.
- Parameters:
organization_id (int) – Organization ID (required)
project_id (int) – Unique identifier of the organizational project from where data samples will be fetched.
filter (str) – Data filter in SQL WHERE format, where you can reference ‘filename’, ‘label’, ‘project_name’, ‘category’, ‘sensors’, ‘frequency’, and any metadata through ‘metadata->’ (dots are replaced by underscore).
ids (str) – Only include samples with an ID within the given list of IDs, given as a JSON string
limit (int) – Maximum number of results
offset (int) – Offset in results, can be used in conjunction with LimitResultsParameter to implement paging.
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- organization_bulk_update_metadata(
- organization_id: StrictInt[StrictInt],
- dataset: StrictStr,
- csv_file: StrictStr,
- **kwargs,
Bulk update metadata
Bulk update the metadata of many data items in one go. This requires you to submit a CSV file with headers, one of which the columns should be named ‘name’. The other columns are used as metadata keys.
- Parameters:
organization_id (int) – Organization ID (required)
dataset (str) – (required)
csv_file (str) – (required)
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- organization_projects_data_batch_disable(
- organization_id: StrictInt[StrictInt],
- organization_projects_data_batch_request: OrganizationProjectsDataBatchRequest,
- **kwargs,
Batch disable data
Batch disable project data samples by dataId
- Parameters:
organization_id (int) – Organization ID (required)
organization_projects_data_batch_request (OrganizationProjectsDataBatchRequest) – (required)
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- organization_projects_data_batch_enable(
- organization_id: StrictInt[StrictInt],
- organization_projects_data_batch_request: OrganizationProjectsDataBatchRequest,
- **kwargs,
Batch enable data
Batch enable project data samples by dataId
- Parameters:
organization_id (int) – Organization ID (required)
organization_projects_data_batch_request (OrganizationProjectsDataBatchRequest) – (required)
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- organization_projects_data_bulk_update_metadata(
- organization_id: StrictInt[StrictInt],
- csv_file: StrictStr,
- project_ids: List[StrictInt] | None = None,
- **kwargs,
Bulk update metadata
Bulk update the metadata of many raw data items in one go. This requires you to submit a CSV file with headers, one of which the columns should be named ‘name’. The other columns are used as metadata keys.
- Parameters:
organization_id (int) – Organization ID (required)
csv_file (str) – (required)
project_ids (List[int]) –
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- preview_default_files_in_folder(
- organization_id: StrictInt[StrictInt],
- dataset: StrictStr[StrictStr],
- preview_default_files_in_folder_request: PreviewDefaultFilesInFolderRequest,
- **kwargs,
Preview files in a default dataset
Preview files and directories in a default dataset for the given prefix, with support for wildcards. This is an internal API used when starting a transformation job.
- Parameters:
organization_id (int) – Organization ID (required)
dataset (str) – Dataset name (required)
preview_default_files_in_folder_request (PreviewDefaultFilesInFolderRequest) – (required)
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- preview_organization_data_file(
- organization_id: StrictInt[StrictInt],
- data_id: StrictInt[StrictInt],
- file_name: StrictStr[StrictStr],
- **kwargs,
Preview file
Preview a single file from a data item (same as downloadOrganizationDataFile but w/ content-disposition inline and could be truncated).
- Parameters:
organization_id (int) – Organization ID (required)
data_id (int) – Data ID (required)
file_name (str) – File name (required)
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
str
- refresh_organization_data(
- organization_id: StrictInt[StrictInt],
- dataset: StrictStr[StrictStr],
- **kwargs,
Refresh data
Update all data items. HEADs all underlying buckets to retrieve the last file information. Use this API after uploading data directly to S3. If your dataset has bucketId and bucketPath set then this will also remove items that have been removed from S3.
- Parameters:
organization_id (int) – Organization ID (required)
dataset (str) – Selected dataset (required)
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- remove_organization_bucket(
- organization_id: StrictInt[StrictInt],
- bucket_id: StrictInt[StrictInt],
- **kwargs,
Remove storage bucket
Remove a storage bucket. This will render any data in this storage bucket unreachable.
- Parameters:
organization_id (int) – Organization ID (required)
bucket_id (int) – Bucket ID (required)
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- rename_dataset_file(
- organization_id: StrictInt[StrictInt],
- dataset: StrictStr[StrictStr],
- rename_portal_file_request: RenamePortalFileRequest,
- **kwargs,
Rename file from dataset
Rename a file in a dataset
- Parameters:
organization_id (int) – Organization ID (required)
dataset (str) – Dataset name (required)
rename_portal_file_request (RenamePortalFileRequest) – (required)
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- update_organization_bucket(
- organization_id: StrictInt[StrictInt],
- bucket_id: StrictInt[StrictInt],
- update_organization_bucket_request: UpdateOrganizationBucketRequest,
- **kwargs,
Update storage bucket
Updates storage bucket details. This only updates fields that were set in the request body.
- Parameters:
organization_id (int) – Organization ID (required)
bucket_id (int) – Bucket ID (required)
update_organization_bucket_request (UpdateOrganizationBucketRequest) – (required)
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- update_organization_data_item(
- organization_id: StrictInt[StrictInt],
- data_id: StrictInt[StrictInt],
- update_organization_data_item_request: UpdateOrganizationDataItemRequest,
- **kwargs,
Update data metadata
Update the data item metadata.
- Parameters:
organization_id (int) – Organization ID (required)
data_id (int) – Data ID (required)
update_organization_data_item_request (UpdateOrganizationDataItemRequest) – (required)
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- update_organization_dataset(
- organization_id: StrictInt[StrictInt],
- dataset: StrictStr[StrictStr],
- update_organization_dataset_request: UpdateOrganizationDatasetRequest,
- **kwargs,
Update dataset
Set information about a dataset
- Parameters:
organization_id (int) – Organization ID (required)
dataset (str) – Dataset name (required)
update_organization_dataset_request (UpdateOrganizationDatasetRequest) – (required)
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- verify_dataset(
- organization_id: StrictInt[StrictInt],
- dataset: StrictStr[StrictStr],
- **kwargs,
Verify dataset
Verify whether we can reach a dataset (and return some random files, used for data sources)
- Parameters:
organization_id (int) – Organization ID (required)
dataset (str) – Dataset name (required)
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- verify_existing_organization_bucket(
- organization_id: StrictInt[StrictInt],
- bucket_id: StrictInt[StrictInt],
- verify_organization_existing_bucket_request: VerifyOrganizationExistingBucketRequest,
- **kwargs,
Verify existing bucket connectivity
Verify whether we can reach a bucket before adding it.
- Parameters:
organization_id (int) – Organization ID (required)
bucket_id (int) – Bucket ID (required)
verify_organization_existing_bucket_request (VerifyOrganizationExistingBucketRequest) – (required)
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- verify_organization_bucket(
- organization_id: StrictInt[StrictInt],
- verify_organization_bucket_request: VerifyOrganizationBucketRequest,
- **kwargs,
Verify bucket connectivity
Verify whether we can reach a bucket before adding it.
- Parameters:
organization_id (int) – Organization ID (required)
verify_organization_bucket_request (VerifyOrganizationBucketRequest) – (required)
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
- view_dataset_file(
- organization_id: StrictInt[StrictInt],
- dataset: StrictStr[StrictStr],
- path: StrictStr[StrictStr],
- **kwargs,
View file from dataset
View a file that’s located in a dataset (requires JWT auth). File might be converted (e.g. Parquet) or truncated (e.g. CSV).
- Parameters:
organization_id (int) – Organization ID (required)
dataset (str) – Dataset name (required)
path (str) – Path to file in portal (required)
async_req (bool, optional) – Whether to execute the request asynchronously.
_preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.
_request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- Returns:
Returns the result object. If the method is called asynchronously, returns the request thread.
- Return type:
str