REST API returns "Success" but nothing happens...

I’ve written a script to add pools and groups to a slave instance, using the REST API. When I make the REST API call, I get the expected “Success” result back – but the group and pool membership is never updated within the monitor.

Does the API simply return “Success” if it receives a valid JSON vi the HTTP PUT? Looking at the webservice logs, I don’t see the slightest indication of what might be going on…

2016-07-14 17:15:55: Web Service - Received request from: 10.200.0.4 2016-07-14 17:15:55: Web Service - Request: PUT http://redacted:8082/api/pools 2016-07-14 17:15:55: Web Service - Found API command: pools 2016-07-14 17:15:55: Web Service - Input stream: {"Pools": ["group1,group2"], "Slave": "don-dev-box"} 2016-07-14 17:15:55: Web Service - Web Service listening for requests... 2016-07-14 17:15:55: Web Service - Received request from: 10.200.0.4 2016-07-14 17:15:55: Web Service - Request: PUT http://redacted:8082/api/groups 2016-07-14 17:15:55: Web Service - Found API command: groups 2016-07-14 17:15:55: Web Service - Input stream: {"Slave": "don-dev-box", "Groups": ["test_group"]} 2016-07-14 17:15:55: Web Service - Web Service listening for requests...

Mmm, after double-checking this, I believe the issue is that the JSON property should be “Pool” and not “Pools” (regardless of whether or not there’s more than one).

You are definitely correct that we should be printing a more helpful message in this case, however, since calling this function without a correctly-name list of pools should be invalid.

We’ll get this looked at, and definitely let me know if switching the property name from “pools” to “pool” doesn’t work!

Cheers,
Jon

Thanks for catching the typo – changing the JSON property from ‘Pools’ to ‘Pool’ did the trick.