Start Time Groups (Startmomentgroepen) ====================================== Current version: 1.1.0 Create ------ .. http:post:: /api2/startmomentgroepen Create a new start time group **Example request**: .. sourcecode:: http POST /api2/startmomentgroepen HTTP/1.1 Host: demo.recras.nl Accept: application/json { "naam": "Klimbos", } **Example response**: .. sourcecode:: http HTTP/1.1 201 Created Content-Type: application/json Location: /api2/startmomentgroepen/2 { "id": 2, "naam": "Klimbos", "has_startmoments_in_future": false, } :json string naam: **Required** The name of the start time group (`naam` means name) :statuscode 201: Group created (`Groep gemaakt`) :statuscode 406: Error in input (`Fout in de invoer`) :statuscode 403: User does not have the ``editStartmomenten`` (editStartTimes) permission (`Gebruiker heeft het recht editStartmomenten niet`) Read ---- .. http:get:: /api2/startmomentgroepen The start time groups in Recras **Example request**: .. sourcecode:: http GET /api2/startmomentgroepen HTTP/1.1 Host: demo.recras.nl Accept: application/json **Example response**: .. sourcecode:: http 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, }, ] :statuscode 200: OK .. http:get:: /api2/startmomentgroepen/(int:id) A specific start time group **Example request**: .. sourcecode:: http GET /api2/startmomentgroepen/2 HTTP/1.1 Host: demo.recras.nl Accept: application/json **Example response**: .. sourcecode:: http HTTP/1.1 200 OK Content-Type: application/json { "id": 2, "naam": "Klimbos", // (name: "Climbing Forest") "has_startmoments_in_future": true, } :statuscode 200: OK :statuscode 404: No start time group with this ``id`` (`Geen startmomentgroep met dit id`) Update ------ .. http:put:: /api2/startmomentgroepen/(int:id) **Example request**: .. sourcecode:: http PUT /api2/startmomentgroepen/2 HTTP/1.1 Host: demo.recras.nl Accept: application/json { "id": 2, "naam": "Grote klimbos", } **Example response**: .. sourcecode:: http HTTP/1.1 200 OK Content-Type: application/json { "id": 2, "naam": "Grote klimbos", } :json int id: ID-nummer, mag niet veranderd worden :statuscode 200: Group updated (`Groep aangepast`) :statuscode 406: Error in input (`Fout in de invoer`) :statuscode 403: User does not have the ``editStartmomenten`` (editStartTimes) permission (`Gebruiker heeft het recht editStartmomenten niet`) Delete ------ .. http:delete:: /api2/startmomentgroepen/(int:id) **Example request**: .. sourcecode:: http DELETE /api2/startmomentgroepen/2 HTTP/1.1 Host: demo.recras.nl **Example response**: .. sourcecode:: http HTTP/1.1 200 OK :statuscode 200: Group deleted (`Groep verwijderd`) :statuscode 403: User does not have the ``editStartmomenten`` (editStartTimes) permission (`Gebruiker heeft het recht editStartmomenten niet`)