summaryrefslogtreecommitdiffstats
path: root/src/wol.c
diff options
context:
space:
mode:
authorJose M. Guisado <jguisado@soleta.eu>2023-08-22 16:09:58 +0200
committerJose M. Guisado <jguisado@soleta.eu>2023-08-23 13:17:03 +0200
commit44745a3f22875af77da8f6e25ebc48b9840964ac (patch)
tree8ec61abf7cf1d5393845820d75a330e636612d55 /src/wol.c
parenta67c1088efac08840458c6b66660e06e5119f0cc (diff)
rest: add POST client/server method
Enable modification of the associated ogserver of a given client. This API is exposed via the POST /client/server endpoint and expects a JSON payload with an array of clients ("client":[]) and the "id" of the ogserver ("identorno" column value inside the "entornos" table) For example: >>> POST /client/server { "client": [ "10.141.10.100", "10.141.10.101", "10.141.10.104", "10.141.10.102" ], "id": "6" } <<< HTTP/1.1 200 OK If the ogserver id does not exist the foreign key constraint (ON UPDATE RESTRICT) inside the "ordenadores" table will cancel the operation and the server will reply with 400 Bad Request. >>> POST /client/server { "client": [ "10.141.10.100", "10.141.10.101", "10.141.10.104", "10.141.10.102" ], "id": "666" } <<< HTTP/1.1 400 Bad Request The OpenGnsys database stores different ip addresses for the ogServer inside the "entornos" table. This table is related to the "ordenadores" table using a foreign key on the "identorno" column. i.e: Clients in the "ordenadores" table associate to an specific server in the database using the "identorno" column (from "entornos" table).
Diffstat (limited to 'src/wol.c')
0 files changed, 0 insertions, 0 deletions