Command
curl -i \
--header "Content-Type: application/json" \
--request POST \
--data '{ "role" : "roleThatDoesNotExist" }' \
http://localhost:8093/roles/add
Expected result
HTTP/1.1 400 Bad Request
...
{"result":"role not found"}%
Command
curl -i \
--header "Content-Type: application/json" \
--request POST \
--data '{ "role" : "<role name>", "user": "<user ID>" }' \
http://localhost:8093/roles/add
Expected result
HTTP/1.1 200 OK
...
{"result":"added"}%
Command
curl -i \
--header "Content-Type: application/json" \
--request POST \
--data '{ "role" : "<role ID>", "user": "<user ID>" }' \
http://localhost:8093/roles/add
Expected result
HTTP/1.1 200 OK
...
{"result":"added"}%
Command
curl -i \
--header "Content-Type: application/json" \
--request POST \
--data '{ "role" : "roleThatDoesNotExist" }' \
http://localhost:8093/roles/remove
Expected result
HTTP/1.1 400 Bad Request
...
{"result":"role not found"}%
Command
curl -i \
--header "Content-Type: application/json" \
--request POST \
--data '{ "role" : "<role name>", "user": "<user ID>" }' \
http://localhost:8093/roles/remove
Expected result
HTTP/1.1 200 OK
...
{"result":"removed"}%
Command
curl -i \
--header "Content-Type: application/json" \
--request POST \
--data '{ "role" : "<role ID>", "user": "<user ID>" }' \
http://localhost:8093/roles/remove
Expected result
HTTP/1.1 200 OK
...
{"result":"removed"}%