Skip to main content
Return a page of non-archived training drafts 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.trainings:

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<Training> Yields one item at a time. The fields below describe each yielded item. A project-owned mutable Training draft. The output Model is bound on the first Training Run.
TrainingId
required
Training draft ID with prefix trg..
ProjectId
required
Project ID with prefix pp..
ModelId | null
required
Output model ID with prefix mdl., or null before the first training run.
string
required
Name of the training draft.
TrainingConfiguration
required
A normalized method-specific Training draft.
string | null
required
Time the training was archived, as an ISO 8601 timestamp, or null while it is active.
string
required
Time the training was created, as an ISO 8601 timestamp.
string
required
Time the training was last updated, as an ISO 8601 timestamp.

listPage() result

Promise<{ trainings: Training[]; pagination: Pagination }>
Training[]
required
Training drafts 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}/trainings.