Ga naar inhoud

API: tokens

API-tokens opvragen, aanmaken en verwijderen.

API-tokens zijn de sleutels tot deze API. Je kunt ze ook in de interface aanmaken, zie Een API-sleutel maken. Een token verwijderen stopt elke koppeling die dat token gebruikt.

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 /token/listGet list of API tokens
GET /token/addAdd a new API token
GET /token/deleteDelete an API token

GET /token/list

Get list of API tokens. This endpoint retrieves a list of all API tokens. The result is a list of API tokens with their respective information, such as token, endpoint, name, etc. This can be used for managing or auditing the use of API tokens in the system.

Parameters

Dit endpoint heeft geen parameters.

Voorbeeldverzoek

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

Voorbeeldantwoord (200). The list of all public available tokens.

{
  "results": [
    {
      "token": "<your token>",
      "endpoint": "https://<your-platform>/local/ltisaas/api.php/v0/",
      "name": "string",
      "lastaccess": 1688735837,
      "timecreated": 1688393426
    }
  ]
}

Fouten: 400 Bad Request, 401 Unauthorized

GET /token/add

Add a new API token. This endpoint creates a new API token. It requires necessary name for creating a new API token. Upon successful operation, a new API token will be added to the system and its details will be returned. In case the API token cannot be created due to certain reasons, appropriate error responses will be returned.

Parameters

NaamInTypeVerplichtBeschrijving
namequerystringjaThe name of the token for your own administration purposes.

Voorbeeldverzoek

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

Voorbeeldantwoord (200). Returns the identifier of the course.

{
  "success": true,
  "token": "<your token>",
  "endpoint": "https://<your-platform>/local/ltisaas/api.php/v0/"
}

Fouten: 400 Bad Request, 401 Unauthorized

GET /token/delete

Delete an API token. This endpoint deletes an API token based on a given token ID. It requires the token of the API to perform this operation. Upon successful deletion, the API token will be removed from the system. In case the token ID is not found or cannot be deleted due to certain reasons, appropriate error responses will be returned.

Parameters

NaamInTypeVerplichtBeschrijving
tokenquerystringjaThe tokenkey you want to delete.

Voorbeeldverzoek

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

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

{
  "success": true
}

Fouten: 400 Bad Request, 401 Unauthorized

Laatst bijgewerkt op