API: courses
List, create, update and delete courses, and set a learner’s course grade.
The Courses group covers the course itself. You can list all courses with their registration counts, create a course, change its name, delete it, or set a manual course grade for one learner. Learning objects and LTI tools inside a course have their own groups: API: learning objects and API: LTI tools.
Every endpoint accepts both GET and POST; the heading shows the method the specification lists first. Uploads must use POST. Send your API key in the Access-Token header. The base URL is https://<your-platform>/local/ltisaas/api.php/v1; use v0 with the token dummy to get test data. Error responses are JSON with success: false, error and debuginfo. Authentication, versions and limits are explained in API documentation.
Generated from the LtiSaas API specification 1.0, retrieved 2026-10-30 from dev-auto.
| Endpoint | Description |
|---|---|
| GET /course/list | Retrieve all courses |
| GET /course/add | Create a new course |
| GET /course/update | Update an existing course |
| GET /course/delete | Delete an existing course by its ID |
| POST /course/grade | Set or reset a user’s course grade |
GET /course/list
Retrieve all courses. Fetches a list of courses along with associated LTI information.
Parameters
This endpoint has no parameters.
Example request
curl -H "Access-Token: <your token>" \
"https://<your-platform>/local/ltisaas/api.php/v1/course/list"Example response (200). Successful retrieval of course list.
{
"success": true,
"results": [
{
"courseid": 2,
"categoryid": 4,
"categoryname": "Cybersecurity",
"coursename": "Moodle training for dummies",
"coursenameshort": "MLD01",
"description": "Introduction to Moodle.",
"imageurl": "https://<your-platform>/local/linqur_courseimages/public.php?courseid=123",
"totalregistrations": 506,
"ltiregistrations": 300,
"magicregistrations": 180,
"proxyregistrations": 26,
"totalltitools": 3,
"toolids": [
3,
5,
6
]
}
]
}Errors: 400 Bad Request, 401 Unauthorized
GET /course/add
Create a new course. This endpoint allows you to create a new course. The course name should be passed as a query parameter.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
coursename | query | string | yes | The name of the course to be created. |
coursenameshort | query | string | no | The shortname of the course to be created. |
Example request
curl -H "Access-Token: <your token>" \
"https://<your-platform>/local/ltisaas/api.php/v1/course/add?coursename=<coursename>"Example response (200). Course created successfully.
{
"success": true,
"courseid": 131
}Errors: 400 Bad Request, 401 Unauthorized
GET /course/update
Update an existing course. This endpoint allows you to update an existing course. The course id should be passed as a query parameter.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
coursename | query | string | yes | The name of the course to be created. |
coursenameshort | query | string | no | The name of the course to be created. |
courseid | query | integer | yes | The unique identifier of the course to be deleted. |
Example request
curl -H "Access-Token: <your token>" \
"https://<your-platform>/local/ltisaas/api.php/v1/course/update?coursename=<coursename>&courseid=<courseid>"Example response (200). Course created successfully.
{
"success": true
}Errors: 400 Bad Request, 401 Unauthorized
GET /course/delete
Delete an existing course by its ID. This endpoint allows you to delete an existing course by providing its unique identifier (course ID).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
courseid | query | integer | yes | The unique identifier of the course to be deleted. |
Example request
curl -H "Access-Token: <your token>" \
"https://<your-platform>/local/ltisaas/api.php/v1/course/delete?courseid=<courseid>"Example response (200). Successful operation.
{
"success": true
}Errors: 400 Bad Request, 401 Unauthorized
POST /course/grade
Set or reset a user’s course grade. Set or reset a user’s course grade. Grade between 0 and 100, interpreted as a manual entry in the Moodle gradebook. If reset=1, removes the override and restores the original calculated grade.
Request body (multipart/form-data). Grade setting parameters.
| Field | Type | Required | Description |
|---|---|---|---|
userid | integer | yes | Moodle user ID of the student. Example: 123. |
courseid | integer | yes | Identifier of the course. Example: 456. |
grade | number | yes | Grade. Example: 1.1. Minimum 0. |
reset | integer | no | If 1, resets the course grade to its original calculated value (removes override). Allowed values: 0, 1. Example: 0. |
Example request
curl -X POST -H "Access-Token: <your token>" \
-F "userid=123" \
-F "courseid=456" \
-F "grade=1.1" \
"https://<your-platform>/local/ltisaas/api.php/v1/course/grade"Example response (200). Grade set successfully.
{
"success": true,
"message": "Grade set successfully",
"finalgrade": 85
}Errors: 400 Bad request - validation error or user not enrolled, 401 Unauthorized access