ADC NITRO APIs

nsconfig

Configuration for system config resource.

Properties

(click to see Operations )

Name Data Type Permissions Description
force Read-write Configurations will be cleared without prompting for confirmation.
level Read-write Types of configurations to be cleared.
  • basic: Clears all configurations except the following
  • NSIP, default route (gateway), static routes, MIPs, and SNIPs
  • Network settings (DG, VLAN, RHI and DNS settings)
  • Cluster settings
  • HA node definitions
  • Feature and mode settings
  • nsroot password
  • extended: Clears the same configurations as the ‘basic’ option. In addition, it clears the feature and mode settings.
  • full: Clears all configurations except NSIP, default route, and interface settings. Note: When you clear the configurations through the cluster IP address, by specifying the level as ‘full’, the cluster is deleted and all cluster nodes become standalone appliances. The ‘basic’ and ‘extended’ levels are propagated to the cluster nodes. Possible values = basic, extended, full
  • rbaconfig Read-write RBA configurations and TACACS policies bound to system global will not be cleared if RBA is set to NO.This option is applicable only for BASIC level of clear configuration.Default is YES, which will clear rba configurations.

    Default value: YES

    Possible values = YES, NO
    ipaddress Read-write IP address of the Citrix ADC. Commonly referred to as NSIP address. This parameter is mandatory to bring up the appliance.

    Minimum length = 1
    netmask Read-write Netmask corresponding to the IP address. This parameter is mandatory to bring up the appliance.
    nsvlan Read-write VLAN (NSVLAN) for the subnet on which the IP address resides.

    Minimum value = 2

    Maximum value = 4094
    ifnum <String[]> Read-write Interfaces of the appliances that must be bound to the NSVLAN.

    Minimum length = 1
    tagged Read-write Specifies that the interfaces will be added as 802.1q tagged interfaces. Packets sent on these interface on this VLAN will have an additional 4-byte 802.1q tag which identifies the VLAN.

    To use 802.1q tagging, the switch connected to the appliance’s interfaces must also be configured for tagging.

    Default value: YES

    Possible values = YES, NO
    httpport <Integer[]> Read-write The HTTP ports on the Web server. This allows the system to perform connection off-load for any client request that has a destination port matching one of these configured ports.

    Minimum value = 1
    maxconn Read-write The maximum number of connections that will be made from the system to the web server(s) attached to it. The value entered here is applied globally to all attached servers.

    Minimum value = 0

    Maximum value = 4294967294
    maxreq Read-write The maximum number of requests that the system can pass on a particular connection between the system and a server attached to it. Setting this value to 0 allows an unlimited number of requests to be passed.

    Minimum value = 0

    Maximum value = 65535
    cip Read-write The option to control (enable or disable) the insertion of the actual client IP address into the HTTP header request passed from the client to one, some, or all servers attached to the system.

    The passed address can then be accessed through a minor modification to the server.

    l If cipHeader is specified, it will be used as the client IP header.

    l If it is not specified, then the value that has been set by the set ns config CLI command will be used as the client IP header.

    Possible values = ENABLED, DISABLED
    cipheader Read-write The text that will be used as the client IP header.

    Minimum length = 1
    cookieversion Read-write The version of the cookie inserted by system.

    Possible values = 0, 1
    securecookie Read-write enable/disable secure flag for persistence cookie.

    Default value: ENABLED

    Possible values = ENABLED, DISABLED
    pmtumin Read-write The minimum Path MTU.

    Default value: 576

    Minimum value = 168

    Maximum value = 1500
    pmtutimeout Read-write The timeout value in minutes.

    Default value: 10

    Minimum value = 1

    Maximum value = 1440
    ftpportrange Read-write Port range configured for FTP services.

    Minimum length = 1024

    Maximum length = 64000
    crportrange Read-write Port range for cache redirection services.

    Minimum length = 1

    Maximum length = 65535
    timezone Read-write Name of the timezone.

    Default value: CoordinatedUniversalTime

    Minimum length = 1

    Maximum length = 64
    grantquotamaxclient Read-write The percentage of shared quota to be granted at a time for maxClient.

    Default value: 10

    Minimum value = 0

    Maximum value = 100
    exclusivequotamaxclient Read-write The percentage of maxClient to be given to PEs.

    Default value: 80

    Minimum value = 0

    Maximum value = 100
    grantquotaspillover Read-write The percentage of shared quota to be granted at a time for spillover.

    Default value: 10

    Minimum value = 0

    Maximum value = 100
    exclusivequotaspillover Read-write The percentage of max limit to be given to PEs.

    Default value: 80

    Minimum value = 0

    Maximum value = 100
    all Read-write Use this option to do saveconfig for all partitions.
    config1 Read-write Location of the configurations.
    config2 Read-write Location of the configurations.
    outtype Read-write Format to display the difference in configurations.

    Possible values = cli, xml
    template Read-write File that contains the commands to be compared.
    ignoredevicespecific Read-write Suppress device specific differences.
    weakpassword Read-write Option to list all weak passwords (not adhering to strong password requirements). Takes config file as input, if no input specified, running configuration is considered. Command => query ns config -weakpassword / query ns config -weakpassword /nsconfig/ns.conf.
    changedpassword Read-write Option to list all passwords changed which would not work when downgraded to older releases. Takes config file as input, if no input specified, running configuration is considered. Command => query ns config -changedpassword / query ns config -changedpassword /nsconfig/ns.conf.
    config Read-write configuration File to be used to find weak passwords, if not specified, running config is taken as input.
    message Read-only .
    mappedip Read-only Mapped IP Address of the System.

    Minimum length = 1
    range Read-only The range of Mapped IP addresses to be configured.

    Minimum value = 1
    svmcmd Read-only Identifies the source of command. When SVM fires the nitro command, it will set the value of SVMCMD to be 1 and in other cases it will be 0.

    Default value: 0
    systemtype Read-only The type of the System. Possible Values: Standalone, HA, Cluster.

    Possible values = Stand-alone, HA, Cluster
    primaryip Read-only HA Master Node IP address.
    primaryip6 Read-only .
    flags Read-only The flags for this entry.
    lastconfigchangedtime Read-only Time when the configuration was last modified.
    lastconfigsavetime Read-only Time when the configuration was last saved through savensconfig.
    currentsytemtime Read-only current system time in date format.
    systemtime Read-only current system time.
    configchanged Read-only returns True if configuration has changed since last saved config.
    response Read-only .

    Operations

    (click to see Properties )

    • CLEAR
    • UPDATE
    • UNSET
    • SAVE
    • GET (ALL)
    • DIFF

    Some options that you can use for each operations:

    • Getting warnings in response: NITRO allows you to get warnings in an operation by specifying the 'warning' query parameter as 'yes'. For example, to get warnings while connecting to the NetScaler appliance, the URL is as follows:

      http:// <netscaler-ip-address> /nitro/v1/config/login?warning=yes

      If any, the warnings are displayed in the response payload with the HTTP code '209 X-NITRO-WARNING'.

    • Authenticated access for individual NITRO operations: NITRO allows you to logon to the NetScaler appliance to perform individual operations. You can use this option instead of creating a NITRO session (using the login object) and then using that session to perform all operations,

      To do this, you must specify the username and password in the request header of the NITRO request as follows:

      X-NITRO-USER: <username>

      X-NITRO-PASS: <password>

      Note: In such cases, make sure that the request header DOES not include the following:

      Cookie:NITRO_AUTH_TOKEN= <tokenvalue>

    *Note: * Mandatory parameters are marked in red and placeholder content is marked in green

    clear

    URL: http:// <netscaler-ip-address> /nitro/v1/config/nsconfig? action=clear HTTP Method: POST

    Request Headers:

    Cookie:NITRO_AUTH_TOKEN= <tokenvalue>

    Content-Type:application/json

    Request Payload:

    {"nsconfig":{
    "force":<Boolean_value>,
    <b>"level":<String_value>,
    </b>"rbaconfig":<String_value>
    }}
    
    <!--NeedCopy-->
    

    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

    update

    URL: http:// <netscaler-ip-address> /nitro/v1/config/nsconfig HTTP Method: PUT

    Request Headers:

    Cookie:NITRO_AUTH_TOKEN= <tokenvalue>

    Content-Type:application/json

    Request Payload:

    {"nsconfig":{
    "ipaddress":<String_value>,
    "netmask":<String_value>,
    "nsvlan":<Double_value>,
    "ifnum":<String[]_value>,
    "tagged":<String_value>,
    "httpport":<Integer[]_value>,
    "maxconn":<Double_value>,
    "maxreq":<Double_value>,
    "cip":<String_value>,
    "cipheader":<String_value>,
    "cookieversion":<String_value>,
    "securecookie":<String_value>,
    "pmtumin":<Double_value>,
    "pmtutimeout":<Double_value>,
    "ftpportrange":<String_value>,
    "crportrange":<String_value>,
    "timezone":<String_value>,
    "grantquotamaxclient":<Double_value>,
    "exclusivequotamaxclient":<Double_value>,
    "grantquotaspillover":<Double_value>,
    "exclusivequotaspillover":<Double_value>
    }}
    
    <!--NeedCopy-->
    

    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

    unset

    URL: http:// <netscaler-ip-address> /nitro/v1/config/nsconfig? action=unset HTTP Method: POST

    Request Headers:

    Cookie:NITRO_AUTH_TOKEN= <tokenvalue>

    Content-Type:application/json

    Request Payload:

    {"nsconfig":{
    "nsvlan":true,
    "ftpportrange":true,
    "crportrange":true,
    "timezone":true,
    "ipaddress":true,
    "netmask":true,
    "ifnum":true,
    "tagged":true,
    "httpport":true,
    "maxconn":true,
    "maxreq":true,
    "cip":true,
    "cipheader":true,
    "cookieversion":true,
    "securecookie":true,
    "pmtumin":true,
    "pmtutimeout":true,
    "grantquotamaxclient":true,
    "exclusivequotamaxclient":true,
    "grantquotaspillover":true,
    "exclusivequotaspillover":true
    }}
    
    <!--NeedCopy-->
    

    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

    save

    URL: http:// <netscaler-ip-address> /nitro/v1/config/nsconfig? action=save HTTP Method: POST

    Request Headers:

    Cookie:NITRO_AUTH_TOKEN= <tokenvalue>

    Content-Type:application/json

    Request Payload:

    {"nsconfig":{
    "all":<Boolean_value>
    }}
    
    <!--NeedCopy-->
    

    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

    diff

    URL: http:// <netscaler-ip-address> /nitro/v1/config/nsconfig? action=diff HTTP Method: POST

    Request Headers:

    Cookie:NITRO_AUTH_TOKEN= <tokenvalue>

    Content-Type:application/json

    Request Payload:

    {"nsconfig":{
    "config1":<String_value>,
    "config2":<String_value>,
    "outtype":<String_value>,
    "template":<Boolean_value>,
    "ignoredevicespecific":<Boolean_value>
    }}
    
    <!--NeedCopy-->
    

    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 Payload:

    { "nsconfig": [ {
    "response":<String_value>
    
    }]}
    
    <!--NeedCopy-->
    

    get (all)

    URL: http:// <netscaler-ip-address> /nitro/v1/config/nsconfig HTTP Method: GET

    Request Headers:

    Cookie:NITRO_AUTH_TOKEN= <tokenvalue>

    Accept:application/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/json

    Response Payload:

    { "nsconfig": [ {
    "ipaddress":<String_value>,
    "netmask":<String_value>,
    "mappedip":<String_value>,
    "range":<Double_value>,
    "nsvlan":<Double_value>,
    "ifnum":<String[]_value>,
    "tagged":<String_value>,
    "svmcmd":<Double_value>,
    "httpport":<Integer[]_value>,
    "maxconn":<Double_value>,
    "maxreq":<Double_value>,
    "cip":<String_value>,
    "cipheader":<String_value>,
    "cookieversion":<String_value>,
    "securecookie":<String_value>,
    "failover":<String_value>,
    "systemtype":<String_value>,
    "primaryip":<String_value>,
    "primaryip6":<String_value>,
    "pmtumin":<Double_value>,
    "pmtutimeout":<Double_value>,
    "ftpportrange":<String_value>,
    "crportrange":<String_value>,
    "flags":<Double_value>,
    "timezone":<String_value>,
    "lastconfigchangedtime":<String_value>,
    "lastconfigsavetime":<String_value>,
    "currentsytemtime":<String_value>,
    "systemtime":<Double_value>,
    "grantquotamaxclient":<Double_value>,
    "exclusivequotamaxclient":<Double_value>,
    "grantquotaspillover":<Double_value>,
    "exclusivequotaspillover":<Double_value>,
    "configchanged":<Boolean_value>
    }]}
    
    <!--NeedCopy-->
    
    nsconfig