Start Time Groups (Startmomentgroepen)¶
Current version: 1.1.0
Create¶
- POST /api2/startmomentgroepen¶
Create a new start time group
Example request:
POST /api2/startmomentgroepen HTTP/1.1 Host: demo.recras.nl Accept: application/json { "naam": "Klimbos", }
Example response:
HTTP/1.1 201 Created Content-Type: application/json Location: /api2/startmomentgroepen/2 { "id": 2, "naam": "Klimbos", "has_startmoments_in_future": false, }
- JSON Parameters:
naam (string) – Required The name of the start time group (naam means name)
- Status Codes:
201 Created – Group created (Groep gemaakt)
406 Not Acceptable – Error in input (Fout in de invoer)
403 Forbidden – User does not have the
editStartmomenten
(editStartTimes) permission (Gebruiker heeft het recht editStartmomenten niet)
Read¶
- GET /api2/startmomentgroepen¶
The start time groups in Recras
Example request:
GET /api2/startmomentgroepen HTTP/1.1 Host: demo.recras.nl Accept: application/json
Example response:
HTTP/1.1 200 OK Content-Type: application/json [ { "id": 1, "naam": "Restaurant", // (name) "has_startmoments_in_future": true, }, { "id": 2, "naam": "Klimbos", // (name: "Climbing Forest") "has_startmoments_in_future": true, }, ]
- Status Codes:
200 OK – OK
- GET /api2/startmomentgroepen/(int: id)¶
A specific start time group
Example request:
GET /api2/startmomentgroepen/2 HTTP/1.1 Host: demo.recras.nl Accept: application/json
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "id": 2, "naam": "Klimbos", // (name: "Climbing Forest") "has_startmoments_in_future": true, }
- Status Codes:
200 OK – OK
404 Not Found – No start time group with this
id
(Geen startmomentgroep met dit id)
Update¶
- PUT /api2/startmomentgroepen/(int: id)¶
Example request:
PUT /api2/startmomentgroepen/2 HTTP/1.1 Host: demo.recras.nl Accept: application/json { "id": 2, "naam": "Grote klimbos", }
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "id": 2, "naam": "Grote klimbos", }
- JSON Parameters:
id (int) – ID-nummer, mag niet veranderd worden
- Status Codes:
200 OK – Group updated (Groep aangepast)
406 Not Acceptable – Error in input (Fout in de invoer)
403 Forbidden – User does not have the
editStartmomenten
(editStartTimes) permission (Gebruiker heeft het recht editStartmomenten niet)
Delete¶
- DELETE /api2/startmomentgroepen/(int: id)¶
Example request:
DELETE /api2/startmomentgroepen/2 HTTP/1.1 Host: demo.recras.nl
Example response:
HTTP/1.1 200 OK
- Status Codes:
200 OK – Group deleted (Groep verwijderd)
403 Forbidden – User does not have the
editStartmomenten
(editStartTimes) permission (Gebruiker heeft het recht editStartmomenten niet)