Headers

These headers should be included in all requests (with the exception of Authorization, which is only required for authenticated requests)

Authentication

Issuing an API token may be done by submitting a POST request to the /api/login endpoint with the form-data parameters used to authenticate a user via the web interface. The response will be a JSON object containing the token, which should be stored and used for all subsequent requests.

Revoking an API token may be done by submitting a GET request to the /api/revoke-tokens/{user_id} endpoint with the token in the Authorization header. The response will be a JSON object containing a success message.

Users

Learning Paths

Courses

Assignments

{
 "assignment": {
   "name": "API Test Assignment - updated",
   "description": "Description for API Test Assignment",
   "submission_option": "upload-wysiwyg-learning",
   "updated_at": "2023-09-19T03:34:15.000000Z",
   "created_at": "2023-09-19T03:34:15.000000Z",
   "id": 10,
   "class_name": "App\\Models\\Assignment",
   "image_url": "<url>",
   "excerpt": "Description for API Test Assignment",
   "featured_image": null
 },
 "success": "Assignment updated successfully."
}

Submissions

Resources

These endpoints are used to retrieve Resources, access metadata, and store download records for a User/Resource. Some endpoints additionally include data on related entities.

Resource Packs

These endpoints are used to retrieve Resources, access metadata, and store download records for a User/Resource. Some endpoints additionally include data on related entities.

LRS Results

These are the endpoints for interacting with LEAD's LRS Result object.

Badges

These endpoints retrieve information about Badges, and the Badges awarded to specific Users.

Featured Images

These endpoints are used to upload and retrieve images for use in the application. The images are stored in an S3 bucket and are retrieved via a CDN. The endpoints are used to upload images for Courses, Learning Paths, and other features.

Groups and Group Types

LRS

These are the endpoints exposed for xAPI statements. A properly formatted xAPI/TinCan URL from a Course Asset will already be structured to hit/authenticate to these endpoints. There are documented briefly here for reference. All endpoints record logs of the events, and PUT endpoints check for completion and trigger back-end updates.

Misc

Miscellaneous API endpoints.

Common Errors

These error responses may be returned from many different endpoints. Some endpoints may have differently phrased messages, but these status codes are common and can usually be handled in a generalized way.

HTTP 401

{
  "message": "Unauthenticated"
}

HTTP 403

{
  "message": "Unauthorized"
}

HTTP 404

{
  "message": "Not found"
}