Ga naar inhoud

API: gebruikers

De gebruikers van een LTI-tool opvragen, een gebruiker uitschrijven uit een cursus of gebruikers verwijderen.

Met deze endpoints lees je de gebruikers die zich via een LTI-tool hebben geregistreerd en verwijder je gebruikers. Uitschrijven haalt een gebruiker uit één cursus en kan de voortgang daar resetten; verwijderen haalt het account van het platform. Gebruikers die zich via een sign-up URL hebben aangemeld, vraag je op en verwijder je in API: sign-up URL’s (magic).

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 /user/listGet list of users in a tool
POST /user/unenrolUnenrol a user from a course
GET /user/deleteDelete a user by ID
GET /user/delete_bulkDelete multiple users by IDs

GET /user/list

Get list of users in a tool. This endpoint retrieves a list of users that are registered in a specific tool. The result is a list of users with their respective information, which can be used for further operations or analysis.

Parameters

NaamInTypeVerplichtBeschrijving
toolidqueryintegerneeThe identifier of the tool (optional).

Voorbeeldverzoek

curl -H "Access-Token: <your token>" \
  "https://<your-platform>/local/ltisaas/api.php/v1/user/list"

Voorbeeldantwoord (200). LTI registrations within a tool for a specific time period.

{
  "results": [
    {
      "userid": 14,
      "firstname": "John",
      "lastname": "Doe",
      "email": "test@example.com",
      "lastip": "127.0.0.1",
      "lti_lastgrade": 0.9,
      "lti_lastaccess": 1689797870,
      "lti_timecreated": 1589797870
    }
  ]
}

Fouten: 400 Bad Request, 401 Unauthorized

POST /user/unenrol

Unenrol a user from a course. Unenrols a user from a course and optionally resets all course progress, including completion data, activity completion, SCORM tracking data, and grades. The user account itself is not deleted.

Request body (application/json).

VeldTypeVerplichtBeschrijving
useridintegerjaUser ID. Voorbeeld: 123.
courseidintegerjaCourse ID. Voorbeeld: 45.
resetintegerneeWhether to reset all progress for the user in the course. 0 = keep progress, 1 = reset progress. Toegestane waarden: 0, 1. Standaard: 0. Voorbeeld: 1.

Voorbeeldverzoek

curl -X POST -H "Access-Token: <your token>" -H "Content-Type: application/json" \
  -d '{"userid": 123, "courseid": 45}' \
  "https://<your-platform>/local/ltisaas/api.php/v1/user/unenrol"

Voorbeeldantwoord (200). User successfully unenrolled.

{
  "status": true,
  "resetperformed": true,
  "message": "User unenrolled from course."
}

Fouten: 400 Invalid request

GET /user/delete

Delete a user by ID. This endpoint deletes a user based on a given ID. Upon successful deletion, the user will be removed from the system. In case the user ID is not found or cannot be deleted due to certain reasons, appropriate error responses will be returned.

Parameters

NaamInTypeVerplichtBeschrijving
idqueryintegerjaThe identifier of the user.

Voorbeeldverzoek

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

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

{
  "success": true
}

Fouten: 400 Bad Request, 401 Unauthorized

GET /user/delete_bulk

Delete multiple users by IDs. This endpoint deletes multiple users based on given IDs. Upon successful deletion, the users will be removed from the system. In case any of the user IDs are not found or cannot be deleted due to certain reasons, an appropriate error response will be returned.

Parameters

NaamInTypeVerplichtBeschrijving
idsqueryarray van integerjaComma-separated list of identifiers of the users to delete. Kommagescheiden.

Voorbeeldverzoek

curl -H "Access-Token: <your token>" \
  "https://<your-platform>/local/ltisaas/api.php/v1/user/delete_bulk?ids=<ids>"

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

{
  "success": true
}

Fouten: 400 Bad Request, 401 Unauthorized

Laatst bijgewerkt op