Skip to main content
Version: 4.7.34

Datasets - Get multiple

Retrieves a list of datasets using the getDatasets() function.

Example

typescript
import { getDatasets } from '@gentrace/core';
const datasets = await getDatasets({
pipelineSlug: 'guess-the-year',
});
console.log('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.

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)