14.1.1.5. Tokengroup endpoints¶
The tokengroup endpoint allows administrators to manage tokengroup definitions.
- POST /tokengroup/(groupname)¶
This call creates a new tokengroup or updates the description of an existing tokengroup.
Note, that the identifier (name) of the tokengroup needs to be unique.
- Parameters:
tokengroup – The unique name of the tokengroup
description – The description of the tokengroup
- Return:
Example request:
To create a new tokengroup “groupA” with a description call:
POST /tokengroup/groupA HTTP/1.1 Host: example.com Accept: application/json Content-Length: 26 Content-Type: application/x-www-form-urlencoded description=My cool first tokengroup
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "id": 1, "jsonrpc": "2.0", "result": { "status": true, "value": 1 } "version": "eduMFA unknown" }
- GET /tokengroup/(groupname)¶
- GET /tokengroup/¶
This call returns the information for the given tokengroup. If no groupname is specified, it returns a list of all defined tokengroups.
- Return:
a json result with a list of tokengropups
Example request:
GET /tokengroup/ HTTP/1.1 Host: example.com Accept: application/json
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "id": 1, "jsonrpc": "2.0", "result": { "status": true, "value": { "gruppe1": {"description": "1st group"}, "gruppe2": {"description": "2nd group"} } } }, "version": "eduMFA unknown" }
- DELETE /tokengroup/(groupname)¶
This call deletes the given tokengroup.
- Parameters:
groupname – The name of the token.
- Return:
a json result with value=1 if deleting the realm was successful
Example request:
DELETE /tokengroup/gruppe1 HTTP/1.1 Host: example.com Accept: application/json
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "id": 1, "jsonrpc": "2.0", "result": { "status": true, "value": 1 }, "version": "eduMFA unknown" }