Product Documentation

REST Web Services

Jan 27, 2016

REST (REpresentational State Transfer) is an architectural style based on simple HTTP requests and responses between the client and the server. REST is used to query or change the state of objects on the server side. In REST, the server side is modeled as a set of entities where each entity is identified by a unique URL.

For information on the NITRO SDKs, see Java, .NET, and Python API.

The general format for NITRO URLs is as follows:

  • For configurations. http://<netscaler-ip-address>/nitro/v1/config/<resource-type>
  • For retrieving statistics. http://<netscaler-ip-address>/nitro/v1/stat/<resource-type>

For example, for a load balancing virtual server, <resource-type> can be replaced by lbvserver.


From NetScaler 10.1 version onwards, the following Content-Type is supported:


However, content types such as "application/x-www-form-urlencoded" and of the form "application/" that were supported in NetScaler 9.3 and earlier versions can also be used. You must make sure that the payload is the same as used in earlier versions.

The payloads provided in this documentation are applicable only for the "application/json" Content-Type.

For NetScaler version below 11.0 67.X and version 10.5 63.X and later, if you use "application/json" as the Content-Type the request/response format is different depending on the HTTP method used.

 For PUT requests, provide warning and onerror parameters in the request payload rather than in the URI or Header.

For example:

For PUT and DELETE operations, read the warning message from response payload rather than from X-NITRO-WARNING and note that status code is set to "200 Ok" instead of "209 NetScaler specific warning".

  For example:
      errorcode: 1067,
      message: "Feature(s) not enabled [LB]",
      severity: "WARNING"

Some points to remember:

  • In addition to the CRUD operations (Create, Read, Update, and Delete), resources (such as lbvserver) can support other operations or actions. These operations use the HTTP POST method, with the URL specifying the operation to be performed and the request body specifying the parameters for that operation.
  • All NITRO operations are logged in the /var/log/nitro.log file on the NetScaler appliance.

For more information on the REST objects and the usage, see the documentation provided in the <NITRO_SDK_HOME>/index.html file.