Jump to content
Welcome to our new Citrix community!

Nitro API - Call to disable GSLB Service?

Gregor Blaj

Recommended Posts



Just wondering if an API call exists for disabling a GSLB service? I cannot see it in the docs but I might be missing something. If there is no such call (yet) I guess the only other option is to remove the binding from the GSLB virtual server?


Thanks for any help.

Link to comment
Share on other sites

1 hour ago, Ross Bender said:

One way to check is to tail the nitro.log and request.log files in /var/log while you are doing the operation in the GUI. That should help point in the right direction as to the appropriate API/SDK method to use.


Thanks, that got it. I could see in nitro.log that it was a POST call and in httpaccess.log that it went to /nitro/v1/config/service, rather than 'gslbservice'. There is no request.log file.




Cheers for your help.

Link to comment
Share on other sites

Strange … I don't get my GSLB services returned with a GET to the service endpoint.

What I needed to do was to disable the target vpn vserver:


$body = @{

$body = ConvertTo-JSON $body
Invoke-RestMethod -uri "$hostname/nitro/v1/config/vpnvserver?action=disable" -body $body -WebSession $NSSession `
     -Headers @{"Content-Type"="application/vnd.com.citrix.netscaler.vpnvserver+json"} -Method POST


Link to comment
Share on other sites

Good point, disabling the VPN/LB vserver would work too but as long as the resource is Netscaler hosted.


I don't get GSLB services returned with a GET to the Service endpoint either, but I am able to modify them (at least the 'state' property) using the Service endpoint. To return GSLB services I have to use the GSLBService endpoint.

http://{{ inventory_hostname }}/nitro/v1/config/gslbservice?attrs=servicename

I did try creating a Service with the same name as a GSLB Service and it doesn't let you, which at least sort of adds up.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...