TrainingAssignments

Create training assignments.

Create training assignments. Existing assignments will remain unchanged. 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> 10 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 Write 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.

post/training-assignments

Request

  • Base URL
    https://api.samsara.com
  • Auth
    HTTP bearer

Query parameters

courseIdstring required

String for the course ID.

dueAtTimestring required

Due date of the training assignment in RFC 3339 format. Millisecond precision and timezones are supported.

learnerIdsstring[] required

String of comma separated learner IDs using the format driver-<id> or user-<id>. Training assignments for the specified course ID and learner(s) will be created. Max value for this value is 100 objects. Example: learnerIds=driver-281474,user-46282156. Non-driver user learners are available only for organizations with non-driver training enabled. Contact your Samsara representative to request access.

Response

OK response.

Example response

{
  "data": [
    {
      "course": {
        "id": "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7",
        "revisionId": "1214a1fa-f0c6-408b-bf85-51dc3bc71ac7"
      },
      "createdAtTime": "2019-06-13T19:08:25Z",
      "createdById": "user-4392",
      "dueAtTime": "2019-06-13T19:08:25Z",
      "id": "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7",
      "isExistingAssignment": true,
      "learner": {
        "id": "938172",
        "type": "driver"
      }
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.