Powershell WAPI Restart Services

Posts: 1
3641     1



I have written some Powershell functions for working with Infoblox and we have wapi v1.6.  The functions for fixed address, host and reservations all work OK, but I am having problems with the restartservices function.


I am using the uri below and I have looked at the definitive list etc, but the commands for the body of the call don't work for my applinaces.  Has something changed that is not in the documentation as I have tried some and all of the options and all I get back is the dreaded 400 error, which I suspect is a badly formated command.




An example of the json data is below

$Data = "{`"restart_option`":'RESTART_IF_NEEDED',`"service_option`":'ALL',`"member_order`":'SEQUENTIAL',`"sequential_delay`":10}"


All I really need is to restart the DHCP services so I have tried replacing ALL with DHCP, but it throws it in my face.


Can anyone adivse on the correct function call, or data components?



Re: Powershell WAPI Restart Services

Posts: 87
3641     1

This command works fine for me but my lab grid is on 8.0:



curl -k1 -u admin:infoblox -H "Content-Type: applition/json" -X POST -d '{"restart_option":"RESTART_IF_NEEDED","service_option":"ALL","member_order":"SEQUENTIALLY","sequential_delay":10}'


Note that in your example 'SEQUENTIAL' needs to be 'SEQUENTIALLY':


member_order ( One of: “SEQUENTIALLY”, “SIMULTANEOUSLY” ). This parameter is mandatory. The order
in which Grid members are being restarted. If this field is set to ‘SEQUENTIALLY’, sequential_delay must also be



Showing results for 
Search instead for 
Did you mean: 

Recommended for You