Datasets - Get multiple
- TypeScript
- Python
Retrieves a list of datasets using the getDatasets()
function.
Retrieves a list of datasets using the get_datasets()
function.
Example
typescript
import { getDatasets } from '@gentrace/core';const datasets = await getDatasets({pipelineSlug: 'guess-the-year',});console.log('Datasets:', datasets);
python
import gentracedatasets = gentrace.get_datasets(pipeline_slug="guess-the-year")print("Datasets:", datasets)
Arguments
params?: Object
Optional parameters to filter the datasets.
pipelineSlug?: string
The slug of the pipeline to filter datasets by. Learn about pipelines here. Create a new pipeline here.pipelineId?: string
The ID of the pipeline to filter datasets by.archived?: boolean
Filter datasets by archived status.
pipeline_slug: Optional[str] = None
The slug of the pipeline to filter datasets by. Learn about pipelines here. Create a new pipeline here.
pipeline_id: Optional[str] = None
The ID of the pipeline to filter datasets by.
archived: Optional[bool] = None
Filter datasets by archived status.
Return value
Returns an array of DatasetV2
objects.
🛠️ DatasetV2
The DatasetV2
type represents the structure of a dataset. Below are the fields of the DatasetV2
type:
id: string (UUID)
createdAt: number
Timestamp in seconds since the UNIX epoch. Can be transformed into a Date object.
updatedAt: number
Timestamp in seconds since the UNIX epoch. Can be transformed into a Date object.
archivedAt?: number | null
Timestamp in seconds since the UNIX epoch. Can be transformed into a Date object.
name: string
description?: string | null
pipelineId: string (UUID)
Returns a DatasetListResponse
object containing an array of DatasetV2
objects.
🛠️ DatasetV2
The DatasetV2
type represents the structure of a dataset. Below are the fields of the DatasetV2
type:
id: str
name: str
description: Optional[str]
pipelineId: str
createdAt: datetime
updatedAt: datetime
archivedAt: Optional[datetime]