Go to file
Jose M. Guisado 4fca62a8ee rest: extend /repository/add
POST /repository/add checks validity of the repository ip address
specified in the request payload.

/repository/add can optionally receive a center id parameter inside its
request payload. For backward compatibility, the default center id (1)
is used if no center is received inside the request payload.

POST /repository/add returns a JSON response payload containing relevant
fields from the inserted repository.

$ curl 	-D-
	\ -X POST
	\ -H "Authorization: a0e9ab768cbe93dab5b1998e952bcdb7"
  	\ --json '{"name": "helloworld", "ip": "192.168.21.21a", "center": 2}'
	\ localhost:8888/repository/add
HTTP/1.1 400 Bad Request
Content-Length: 0

$ curl 	-D-
	\ -X POST
	\ -H "Authorization: a0e9ab768cbe93dab5b1998e952bcdb7"
  	\ --json '{"name": "helloworld", "ip": "192.168.21.21a", "center": 2}'
	\ localhost:8888/repository/add
HTTP/1.1 200 OK
Content-Length: 54

{"id": 7, "ip": "192.168.21.21", "name": "helloworld"}
2023-10-11 10:28:22 +02:00
cfg #981 Use 'Wants' for mysql systemd unit dependency 2021-07-27 17:12:40 +02:00
src rest: extend /repository/add 2023-10-11 10:28:22 +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