Saltar al contenido

trainingLessons

Módulo Workforce · 6 operaciones

List training lesson rows

GET/training-lessons

A lesson of a training course: a reading, a video or a quiz. Changes only while the course is a draft. Returns a cursor page of training lesson rows the caller may see. The default order is `created_at` ascending. Supports sparse fieldsets and the filter grammar.

Create a training lesson

POST/training-lessons

A lesson of a training course: a reading, a video or a quiz. Changes only while the course is a draft. Creates a training lesson. Requires `Idempotency-Key`; a replay returns the original response. The organization is derived from the credential or the parent row, never from the body.

Get a training lesson

GET/training-lessons/{id}

A lesson of a training course: a reading, a video or a quiz. Changes only while the course is a draft. Returns one training lesson with its `ETag`. A training lesson the caller may not see returns 404.

Update a training lesson

PATCH/training-lessons/{id}

A lesson of a training course: a reading, a video or a quiz. Changes only while the course is a draft. Updates the fields sent; omitted fields are unchanged. Requires `If-Match` with the current `ETag`: a stale tag returns 412 and a missing tag returns 428.

Delete a training lesson

DELETE/training-lessons/{id}

A lesson of a training course: a reading, a video or a quiz. Changes only while the course is a draft. Soft-deletes the training lesson: it moves to Trash and can be restored for its table's retention period.

Finish a lesson

POST/training-lessons/{id}/complete

Marks a reading or video lesson finished for the caller. Requires `Idempotency-Key`; a replay returns the original response. A rule that refuses the request returns 422 with `refusal` and `reason`.