Product Documentation

Getting the Count of NetScaler Resources

Jun 14, 2016

To get a count of a specific resource type, in the URL specify the count query parameter as "yes".

For example, to get a count of all the load balancing virtual servers:

  • Request:

    HTTP Method
    GET
    URL
    http://<netscaler-ip-address>/nitro/v1/config/lbvserver?count=yes
    Request Headers
    Cookie:NITRO_AUTH_TOKEN=<tokenvalue> 
    Accept:application/vnd.com.citrix.netscaler.lbvserver+json
  • Response:

    HTTP Status Code on Success
    200 OK
    HTTP Status Code on Failure
    4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error.
    Response Header
    Content-Type:application/vnd.com.citrix.netscaler.lbvserver+json
    Response Payload
    { 
        "lbvserver": 
        [ 
            { 
                "__count": 4 
            } 
        ] 
    }