---
title: "Get a stream of filtered training assignments."
method: GET
path: "/training-assignments/stream"
tags: ["TrainingAssignments"]
---

# Get a stream of filtered training assignments.

`GET /training-assignments/stream`

## Request

- Base URL: `https://api.samsara.com`
- URL: `https://api.samsara.com/training-assignments/stream`
- Auth: HTTP bearer

Returns all training assignments data that has been created or modified for your organization based on the time parameters passed in. Results are paginated and are sorted by last modified date. If you include an endTime, the endpoint will return data up until that point (exclusive). If you don't include an endTime, the API will continue to poll with the pagination cursor that gets returned on every call. The hasNextPage response value will be true if there is no endTime specified and endCursor is nonempty. Non-driver user learners are available only for organizations with non-driver training enabled. Contact your Samsara representative to request access.

 <b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).

To use this endpoint, select **Read Training Assignments** under the Training Assignments category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
 

 **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.

## Query parameters

- `after` string
- `startTime` string, required
- `endTime` string
- `learnerIds` string[]
- `courseIds` string[]
- `status` string[]
- `isOverdue` boolean
- `categoryIds` string[]

## Response `200`

OK response.

- TrainingAssignmentsGetTrainingAssignmentsStreamResponseBody
  - `data` TrainingAssignmentResponseObjectResponseBody[], required: List of training assignments.
    - `completedAtTime` string, date-time: Time training assignment is completed. UTC timestamp in RFC 3339 format. Returned when a training assignment completion status is "complete".
    - `course` TrainingCourseObjectResponseBody, required: Course that is associated with the training assignments.
      - `id` string, uuid, required: ID of the course.
      - `revisionId` string, uuid, required: ID of the course's specific version.
    - `createdAtTime` string, date-time, required: Creation time of the training assignment. UTC timestamp in RFC 3339 format.
    - `createdById` string, required: ID of the user who created the training assignment.
    - `deletedAtTime` string, date-time: Time training assignment is deleted. UTC timestamp in RFC 3339 format.
    - `dueAtTime` string, date-time: Time training assignment is due. UTC timestamp in RFC 3339 format. Returned when an assignment has a due date set by an admin.
    - `durationMinutes` integer, required: Time spent on the training assignment.
    - `id` string, required: ID of the training assignment.
    - `isCompletedLate` boolean: Indicates whether the training assignment was completed on time or not. Returned when a training assignment completion status is "complete" and has a dueAtTime set by an admin.
    - `isOverdue` boolean: Indicates whether the training assignment is past the due date. Returned when a training assignment completion status is 'inProgress' or 'notStarted' and has a dueAtTime set by an admin.
    - `learner` TrainingLearnerObjectResponseBody, required: Learner that is associated with the training assignment.
      - `id` string, required: ID of the polymorphic user.
      - `type` 'unknown' | 'driver' | 'user', required: The learner type. Returns `unknown` when the learner type is not recognized. Non-driver user learners are available only for organizations with non-driver training enabled. Contact your Samsara representative to request access. Valid values: `unknown`, `driver`, `user`
    - `scorePercent` number, double: Quiz score associated with training assignment. Returned when a training assignment completion status is "complete".
    - `startedAtTime` string, date-time: Time training assignment is started. UTC timestamp in RFC 3339 format. Returned when a training assignment completion status is "complete" or "inProgress".
    - `status` 'notStarted' | 'inProgress' | 'completed', required: State for the Training Assignment. Always returned. Valid values: `notStarted`, `inProgress`, `completed`
    - `updatedAtTime` string, date-time, required: Time training assignment was updated by either a learner or an admin. UTC timestamp in RFC 3339 format.
    - `updatedById` string, required: ID of the user who updated the training assignment, either an admin or a learner.
  - `pagination` GoaPaginationResponseResponseBody, required: Pagination parameters.
    - `endCursor` string, required: Cursor identifier representing the last element in the response. This value should be used in conjunction with a subsequent request's 'after' query parameter. This may be an empty string if there are no more pages left to view.
    - `hasNextPage` boolean, required: True if there are more pages of results immediately available after this endCursor.

## Other responses

- `401`: Unauthorized response.
- `404`: Not Found response.
- `405`: Method Not Allowed response.
- `413`: Content Too Large response.
- `429`: Too Many Requests response.
- `500`: Internal Server Error response.
- `501`: Not Implemented response.
- `502`: Bad Gateway response.
- `503`: Service Unavailable response.
- `504`: Gateway Timeout response.
- `default`: Bad Request response.

---

[API](https://skmtc.dev/samsara/apis/samsara-api.md) - [All operations](https://skmtc.dev/samsara/apis/samsara-api/llms.txt) - [OpenAPI document](https://skmtc.dev/samsara/apis/samsara-api/revisions/a9e35d4999be?raw)
