Ga naar inhoud
API: learning objects

API: learning objects

De leerobjecten van een cursus opvragen en een SCORM-pakket toevoegen, bijwerken of verwijderen.

Een leerobject is een activiteit in een cursus. Met deze endpoints vraag je de leerobjecten van een cursus op en voeg je een SCORM-pakket toe, werk je het bij of verwijder je het. Toevoegen en bijwerken is een multipart-upload, dus die twee aanroepen gaan alleen met POST. De velden voor beoordeling en weergave zijn dezelfde als de SCORM-instellingen in de Linqur-interface.

Elk endpoint accepteert zowel GET als POST; de kop toont de methode die de specificatie als eerste noemt. Uploads gaan alleen met POST. Stuur je API-sleutel mee in de header Access-Token. De basis-URL is https://<your-platform>/local/ltisaas/api.php/v1; met v0 en het token dummy krijg je testdata. Foutmeldingen komen terug als JSON met success: false, error en debuginfo. Authenticatie, versies en limieten staan in API-documentatie. De beschrijvingen van endpoints en velden hieronder komen uit de specificatie en zijn Engels.

Gegenereerd uit de LtiSaas API-specificatie 1.0, opgehaald op 2026-10-30 van dev-auto.

EndpointBeschrijving
GET /course/learningobject/listGet learning objects for a course
POST /course/learningobject/scorm/addAdd an SCORM package to a course
POST /course/learningobject/scorm/updateUpdate SCORM Learning Object
GET /course/learningobject/deleteDelete a specific learning object

GET /course/learningobject/list

Get learning objects for a course. This endpoint retrieves a list of learning objects associated with a specific course identified by its unique ID.

Parameters

NaamInTypeVerplichtBeschrijving
courseidqueryintegerjaThe unique identifier of the course.

Voorbeeldverzoek

curl -H "Access-Token: <your token>" \
  "https://<your-platform>/local/ltisaas/api.php/v1/course/learningobject/list?courseid=<courseid>"

Voorbeeldantwoord (200). Successful retrieval of learning objects.

{
  "success": true,
  "results": [
    {
      "id": 3,
      "type": "scorm",
      "name": "The big scorm example",
      "is_hidden": false
    }
  ]
}

Fouten: 400 Bad Request, 401 Unauthorized

POST /course/learningobject/scorm/add

Add an SCORM package to a course. This endpoint allows adding a SCORM package as a learning object to a specified course.

Request body (multipart/form-data). The properties of the SCORM package.

VeldTypeVerplichtBeschrijving
courseidintegerjaThe unique identifier of the course.
packagefilebestandjaThe .zip file of the SCORM package.
namestringjaThe name of the SCORM package.
popupintegerneeIndicates if the SCORM package should open in a new window (1) or not (0). Toegestane waarden: 0, 1.
widthintegerneeThe display width for the SCORM package.
heightintegerneeThe display height for the SCORM package.
grademethodintegerneeThe grading method for the SCORM package (0: learning objects, 1: highest grade, 2: average grade, 3: sum grade). Toegestane waarden: 0, 1, 2, 3.
maxgradeintegerneeThe maximum grade possible for the SCORM package. Minimaal 0, maximaal 100.
maxattemptintegerneeThe maximum number of attempts allowed for the SCORM package. Minimaal 0, maximaal 6.
whatgradeintegerneeThe grading strategy for multiple attempts (0: highest attempt, 1: average grade, 2: first attempt). Toegestane waarden: 0, 1, 2.
forcenewattemptintegerneePolicy for forcing new attempts (0: no, 1: every new attempt is a new grade, 2: every new attempt resets previous grades). Toegestane waarden: 0, 1, 2.
lastattemptlockintegerneeIndicates if the SCORM package should be locked after the last attempt (0: no, 1: yes). Toegestane waarden: 0, 1.
autocommitintegerneeIndicates if the SCORM package grades should auto commit (0: no, 1: yes). Toegestane waarden: 0, 1.
masteryoverrideintegerneeIndicates if the mastery grade overrides the max grade (0: no, 1: yes). Toegestane waarden: 0, 1.

Voorbeeldverzoek

curl -X POST -H "Access-Token: <your token>" \
  -F "courseid=<courseid>" \
  -F "packagefile=@<packagefile.zip>" \
  -F "name=<name>" \
  "https://<your-platform>/local/ltisaas/api.php/v1/course/learningobject/scorm/add"

Voorbeeldantwoord (200). Successful addition of the SCORM package to the course.

{
  "success": true,
  "learningobjectid": 0
}

Fouten: 400 Bad Request, 401 Unauthorized

POST /course/learningobject/scorm/update

Update SCORM Learning Object. This endpoint enables the updating of a SCORM learning object within a course. Required parameters include the ID of the learning object, the .zip package file, name, popup mode, and other grading and display properties.

Request body (multipart/form-data). The properties of the SCORM package.

VeldTypeVerplichtBeschrijving
learningobjectidintegerjaThe ID of the learning object.
packagefilebestandneeThe .zip file of the SCORM package.
namestringneeThe name of the SCORM package.
popupintegerneeIndicates if the SCORM package should open in a new window (1) or not (0). Toegestane waarden: 0, 1.
widthintegerneeThe display width for the SCORM package.
heightintegerneeThe display height for the SCORM package.
grademethodintegerneeThe grading method for the SCORM package (0: learning objects, 1: highest grade, 2: average grade, 3: sum grade). Toegestane waarden: 0, 1, 2, 3.
maxgradeintegerneeThe maximum grade possible for the SCORM package. Minimaal 0, maximaal 100.
maxattemptintegerneeThe maximum number of attempts allowed for the SCORM package. Minimaal 0, maximaal 6.
whatgradeintegerneeThe grading strategy for multiple attempts (0: highest attempt, 1: average grade, 2: first attempt). Toegestane waarden: 0, 1, 2.
forcenewattemptintegerneePolicy for forcing new attempts (0: no, 1: every new attempt is a new grade, 2: every new attempt resets previous grades). Toegestane waarden: 0, 1, 2.
lastattemptlockintegerneeIndicates if the SCORM package should be locked after the last attempt (0: no, 1: yes). Toegestane waarden: 0, 1.
autocommitintegerneeIndicates if the SCORM package grades should auto commit (0: no, 1: yes). Toegestane waarden: 0, 1.
masteryoverrideintegerneeIndicates if the mastery grade overrides the max grade (0: no, 1: yes). Toegestane waarden: 0, 1.

Voorbeeldverzoek

curl -X POST -H "Access-Token: <your token>" \
  -F "learningobjectid=<learningobjectid>" \
  "https://<your-platform>/local/ltisaas/api.php/v1/course/learningobject/scorm/update"

Voorbeeldantwoord (200). Returns success when updating a SCORM package.

{
  "success": true
}

Fouten: de specificatie noemt geen foutantwoorden voor dit endpoint.

GET /course/learningobject/delete

Delete a specific learning object. This endpoint deletes a specific learning object based on the given identifier. It returns a success response upon successful deletion and relevant error responses for invalid requests or unauthorized access.

Parameters

NaamInTypeVerplichtBeschrijving
learningobjectidqueryintegerjaThe identifier of the learning object.

Voorbeeldverzoek

curl -H "Access-Token: <your token>" \
  "https://<your-platform>/local/ltisaas/api.php/v1/course/learningobject/delete?learningobjectid=<learningobjectid>"

Voorbeeldantwoord (200). Returns success if the operation was successful.

{
  "success": true
}

Fouten: 400 Bad Request, 401 Unauthorized

Laatst bijgewerkt op