Skip to main content
Return a page of datasets in the project, with pagination metadata. The listAll* variant yields items across every page. The other variant returns one page with pagination metadata. See Pagination.

Signature

Method signatures on client.datasets:

Parameters

listAll()

string
required
Project ID with prefix pp..
number
default:"20"
Maximum number of results to return; defaults to 20.
number
default:"0"
Number of results to skip before this page; defaults to 0.

listPage()

string
required
Project ID with prefix pp..
number
default:"20"
Maximum number of results to return; defaults to 20.
number
default:"0"
Number of results to skip before this page; defaults to 0.

Returns

listAll() result

AsyncGenerator<Dataset> Yields one item at a time. The fields below describe each yielded item. A dataset within a project.
DatasetId
required
Dataset ID with prefix ds..
ProjectId
required
Project ID with prefix pp..
string
required
Name of the dataset.
boolean
required
Whether the dataset is hidden from ordinary dataset lists.
DatasetProfileStamp | null
required
Profile used to create the dataset fields, or null for a dataset without a profile.
string
required
Time the dataset was created, as an ISO 8601 timestamp.

listPage() result

Promise<{ datasets: Dataset[]; pagination: Pagination }>
Dataset[]
required
Datasets in this page.
Pagination
required
Pagination information for this page.

Errors

HTTP errors throw PotatoApiError. The endpoint documents these error responses: HTTP endpoint: GET /projects/{projectId}/datasets.