Go to file
Jose M. Guisado 351069b591 rest: add /server GET and POST methods
DB stores different ogserver addresses in the "entornos" table.

Expose addition and deletion operations for the "entornos" table using
the /server endpoint.

GET /server returns a list of rows from the "entornos" table including
the "identorno" and "ipserveradm" columns. For example:

>>>
GET /server

<<<
200 OK
...
{
  "servers": [
    {
      "id": 1,
      "address": "10.141.10.1"
    }
  ]
}

POST /server inserts into the "entornos" table and returns the
id ("identorno") of the new row.

>>>
POST /server
{
  "address": "192.168.2.240"
}

<<<
200 OK
...
{
  "id": 2
}

If the server address already exists the response is 400 Bad Request
with no payload.

>>>
POST /server
{
  "address": "192.168.2.240"
}

<<<
400 Bad Request
2023-08-23 11:39:10 +02:00
cfg #981 Use 'Wants' for mysql systemd unit dependency 2021-07-27 17:12:40 +02:00
src rest: add /server GET and POST methods 2023-08-23 11:39:10 +02:00
tests #915 Add commands and procedures to procedure creation 2021-06-10 17:00:01 +02:00
.gitignore #985 add .gitignore file 2020-06-17 18:20:32 +02:00
COPYING #985 add COPYING file 2020-06-18 16:48:20 +02:00
Makefile.am #915 Add schedule/command 2021-06-09 13:41:28 +02:00
configure.ac #986 rename to ogserver 2020-06-19 11:19:55 +02:00