Datasets API | <Client>.datasets
spectrumx.api.datasets
API functions specific to datasets.
Classes:
| Name | Description |
|---|---|
DatasetAPI |
|
Classes
DatasetAPI
Methods:
| Name | Description |
|---|---|
delete |
Deletes a dataset from SDS by its UUID. |
get |
Load dataset metadata, captures, and artifact files from SDS. |
get_files |
Get files in the dataset as a paginator. |
list_artifact_files |
Return file rows linked directly to the dataset (artifacts), as JSON dicts. |
list_captures |
Return capture payloads linked to the dataset (raw JSON objects). |
revoke_share_permissions |
Revoke all direct share permissions on this dataset (owner-only). |
Source code in spectrumx/api/datasets.py
Methods:
delete
Deletes a dataset from SDS by its UUID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dataset_uuid
|
UUID
|
The UUID of the dataset to delete. |
required |
Returns: True if the dataset was deleted successfully, or if in dry run mode.
Source code in spectrumx/api/datasets.py
get
get(dataset_uuid: UUID) -> Dataset
Load dataset metadata, captures, and artifact files from SDS.
Captures are returned in the same grouped shape as the capture list API
(one entry per logical multi-channel capture where applicable). For every
file in the dataset (including capture-linked files), use :meth:get_files
instead, which calls the paginated dataset files manifest endpoint.
Source code in spectrumx/api/datasets.py
get_files
get_files(
dataset_uuid: UUID,
*,
capture_uuids: Collection[UUID] | None = None,
top_level_dirs: Collection[PurePosixPath | Path | str]
| None = None,
artifacts_only: bool = False,
) -> Paginator[File]
Get files in the dataset as a paginator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dataset_uuid
|
UUID
|
The UUID of the dataset to get files for. |
required |
capture_uuids
|
Collection[UUID] | None
|
If set, passed to the gateway to restrict by capture UUID (OR
with |
None
|
top_level_dirs
|
Collection[PurePosixPath | Path | str] | None
|
If set, passed to the gateway as path prefixes under
|
None
|
artifacts_only
|
bool
|
If set, only return artifact files (not capture-linked files). |
False
|
Returns: A paginator for the files in the dataset.
Source code in spectrumx/api/datasets.py
list_artifact_files
Return file rows linked directly to the dataset (artifacts), as JSON dicts.
These are the same objects embedded on :meth:get under the files key.
For the full downloadable manifest (captures plus artifacts), use
:meth:get_files.
Source code in spectrumx/api/datasets.py
list_captures
Return capture payloads linked to the dataset (raw JSON objects).
Use this when you need composite capture fields (for example channels)
without coercing through :class:~spectrumx.models.datasets.DatasetCapture.
Source code in spectrumx/api/datasets.py
revoke_share_permissions
Revoke all direct share permissions on this dataset (owner-only).
Use this (or the web portal) before :meth:delete when the dataset is shared.