ADC NITRO APIs

hanode

Configuration for node resource.

Properties

(click to see Operations )

Name Data Type Permissions Description
id <Double> Read-write Number that uniquely identifies the node. For self node, it will always be 0. Peer node values can range from 1-64.

Minimum value = 1

Maximum value = 64
ipaddress <String> Read-write The NSIP or NSIP6 address of the node to be added for an HA configuration. This setting is neither propagated nor synchronized.

Minimum length = 1
inc <String> Read-write This option is required if the HA nodes reside on different networks. When this mode is enabled, the following independent network entities and configurations are neither propagated nor synced to the other node: MIPs, SNIPs, VLANs, routes (except LLB routes), route monitors, RNAT rules (except any RNAT rule with a VIP as the NAT IP), and dynamic routing configurations. They are maintained independently on each node.

Default value: DISABLED

Possible values = ENABLED, DISABLED
rpcnodepassword <String> Read-write Password to be used in authentication with the peer rpc node.

Minimum length = 1
hastatus <String> Read-write The HA status of the node. The HA status STAYSECONDARY is used to force the secondary device stay as secondary independent of the state of the Primary device. For example, in an existing HA setup, the Primary node has to be upgraded and this process would take few seconds. During the upgradation, it is possible that the Primary node may suffer from a downtime for a few seconds. However, the Secondary should not take over as the Primary node. Thus, the Secondary node should remain as Secondary even if there is a failure in the Primary node.

STAYPRIMARY configuration keeps the node in primary state in case if it is healthy, even if the peer node was the primary node initially. If the node with STAYPRIMARY setting (and no peer node) is added to a primary node (which has this node as the peer) then this node takes over as the new primary and the older node becomes secondary. ENABLED state means normal HA operation without any constraints/preferences. DISABLED state disables the normal HA operation of the node.

Possible values = ENABLED, STAYSECONDARY, DISABLED, STAYPRIMARY
hasync <String> Read-write Automatically maintain synchronization by duplicating the configuration of the primary node on the secondary node. This setting is not propagated. Automatic synchronization requires that this setting be enabled (the default) on the current secondary node. Synchronization uses TCP port 3010.

Default value: ENABLED

Possible values = ENABLED, DISABLED
haprop <String> Read-write Automatically propagate all commands from the primary to the secondary node, except the following:

* All HA configuration related commands. For example, add ha node, set ha node, and bind ha node.

* All Interface related commands. For example, set interface and unset interface.

* All channels related commands. For example, add channel, set channel, and bind channel.

The propagated command is executed on the secondary node before it is executed on the primary. If command propagation fails, or if command execution fails on the secondary, the primary node executes the command and logs an error. Command propagation uses port 3010.

Note: After enabling propagation, run force synchronization on either node.

Default value: ENABLED

Possible values = ENABLED, DISABLED
hellointerval <Double> Read-write Interval, in milliseconds, between heartbeat messages sent to the peer node. The heartbeat messages are UDP packets sent to port 3003 of the peer node.

Default value: 200

Minimum value = 200

Maximum value = 1000
deadinterval <Double> Read-write Number of seconds after which a peer node is marked DOWN if heartbeat messages are not received from the peer node.

Default value: 3

Minimum value = 3

Maximum value = 60
failsafe <String> Read-write Keep one node primary if both nodes fail the health check, so that a partially available node can back up data and handle traffic. This mode is set independently on each node.

Default value: OFF

Possible values = ON, OFF
maxflips <Double> Read-write Max number of flips allowed before becoming sticky primary.

Default value: 0
maxfliptime <Double> Read-write Interval after which flipping of node states can again start.

Default value: 0
syncvlan <Double> Read-write Vlan on which HA related communication is sent. This include sync, propagation , connection mirroring , LB persistency config sync, persistent session sync and session state sync. However HA heartbeats can go all interfaces.

Minimum value = 1

Maximum value = 4094
syncstatusstrictmode <String> Read-write strict mode flag for sync status.

Default value: DISABLED

Possible values = ENABLED, DISABLED
name <String> Read-only Node Name.
flags <Double> Read-only The flags for this entry.
state <String> Read-only HA Master State.

Possible values = Primary, Secondary, UNKNOWN
enaifaces <String> Read-only Enabled interfaces.
disifaces <String> Read-only Disabled interfaces.
hamonifaces <String> Read-only HAMON ON interfaces.
haheartbeatifaces <String> Read-only HAHEARTBEAT OFF interfaces.
pfifaces <String> Read-only Interfaces causing Partial Failure.
ifaces <String> Read-only Interfaces on which non-multicast is not seen.
netmask <String> Read-only The netmask.
ssl2 <String> Read-only SSL card status.

Possible values = DOWN, UP, NOT PRESENT, UNKNOWN
masterstatetime <Double> Read-only Time elapsed in current master state.
routemonitor <String> Read-only The IP address (IPv4 or IPv6).
curflips <Double> Read-only Keeps track of number of flips that have happened till now in current interval.
completedfliptime <Double> Read-only To inform user whether flip time is elapsed or not.
routemonitorstate <String> Read-only State for route monitor.

Possible values = UP, DOWN
hasyncfailurereason <String> Read-only Displays the reason for HA SYNC Failure.

Possible values =
__count <Double> Read-only count parameter

Operations

(click to see Properties )

  • ADD
  • DELETE
  • UPDATE
  • UNSET
  • GET (ALL)
  • GET
  • COUNT

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

add

URL: http:// <netscaler-ip-address> /nitro/v1/config/hanode HTTP Method: POST

Request Headers:

Cookie:NITRO_AUTH_TOKEN= <tokenvalue>

Content-Type:application/json

Request Payload:

{"hanode":{
<b>"id":<Double_value>,
</b><b>"ipaddress":<String_value>,
</b>"inc":<String_value>,
"rpcnodepassword":<String_value>
}}

<!--NeedCopy-->

Response: HTTP Status Code on Success: 201 Created

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

delete

URL: http:// <netscaler-ip-address> /nitro/v1/config/hanode/ id_value<Double> HTTP Method: DELETE

Request Headers:

Cookie:NITRO_AUTH_TOKEN= <tokenvalue>

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/hanode HTTP Method: PUT

Request Headers:

Cookie:NITRO_AUTH_TOKEN= <tokenvalue>

Content-Type:application/json

Request Payload:

{"hanode":{
"id":<Double_value>,
"hastatus":<String_value>,
"hasync":<String_value>,
"haprop":<String_value>,
"hellointerval":<Double_value>,
"deadinterval":<Double_value>,
"failsafe":<String_value>,
"maxflips":<Double_value>,
"maxfliptime":<Double_value>,
"syncvlan":<Double_value>,
"syncstatusstrictmode":<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

unset

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

Request Headers:

Cookie:NITRO_AUTH_TOKEN= <tokenvalue>

Content-Type:application/json

Request Payload:

{"hanode":{
"id":<Double_value>,
"hastatus":true,
"hasync":true,
"haprop":true,
"hellointerval":true,
"deadinterval":true,
"failsafe":true,
"maxflips":true,
"maxfliptime":true,
"syncvlan":true,
"syncstatusstrictmode":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

get (all)

URL: http:// <netscaler-ip-address> /nitro/v1/config/hanode Query-parameters: attrs http:// <netscaler-ip-address> /nitro/v1/config/hanode? attrs=property-name1,property-name2

Use this query parameter to specify the resource details that you want to retrieve.

filter http:// <netscaler-ip-address> /nitro/v1/config/hanode? filter=property-name1:property-val1,property-name2:property-val2

Use this query-parameter to get the filtered set of hanode resources configured on NetScaler.Filtering can be done on any of the properties of the resource.

view http:// <netscaler-ip-address> /nitro/v1/config/hanode? view=summary

Use this query-parameter to get the summary output of hanode resources configured on NetScaler.

Note: By default, the retrieved results are displayed in detail view (?view=detail).

pagination http:// <netscaler-ip-address> /nitro/v1/config/hanode? pagesize=#no;pageno=#no

Use this query-parameter to get the hanode resources in chunks.

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:

{ "hanode": [ {
"id":<Double_value>,
"name":<String_value>,
"ipaddress":<String_value>,
"flags":<Double_value>,
"hastatus":<String_value>,
"state":<String_value>,
"hasync":<String_value>,
"haprop":<String_value>,
"enaifaces":<String_value>,
"disifaces":<String_value>,
"hamonifaces":<String_value>,
"haheartbeatifaces":<String_value>,
"pfifaces":<String_value>,
"ifaces":<String_value>,
"netmask":<String_value>,
"inc":<String_value>,
"ssl2":<String_value>,
"hellointerval":<Double_value>,
"deadinterval":<Double_value>,
"masterstatetime":<Double_value>,
"failsafe":<String_value>,
"routemonitor":<String_value>,
"maxflips":<Double_value>,
"maxfliptime":<Double_value>,
"curflips":<Double_value>,
"completedfliptime":<Double_value>,
"syncvlan":<Double_value>,
"routemonitorstate":<String_value>,
"hasyncfailurereason":<String_value>,
"syncstatusstrictmode":<String_value>
}]}

<!--NeedCopy-->

get

URL: http:// <netscaler-ip-address> /nitro/v1/config/hanode/ id_value<Double> Query-parameters: attrs http:// <netscaler-ip-address> /nitro/v1/config/hanode/ id_value<Double> ? attrs=property-name1,property-name2

Use this query parameter to specify the resource details that you want to retrieve.

view http:// <netscaler-ip-address> /nitro/v1/config/hanode/ id_value<Double> ? view=summary

Use this query-parameter to get the summary output of hanode resources configured on NetScaler.

Note: By default, the retrieved results are displayed in detail view (?view=detail).

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:

{  "hanode": [ {
"id":<Double_value>,
"name":<String_value>,
"ipaddress":<String_value>,
"flags":<Double_value>,
"hastatus":<String_value>,
"state":<String_value>,
"hasync":<String_value>,
"haprop":<String_value>,
"enaifaces":<String_value>,
"disifaces":<String_value>,
"hamonifaces":<String_value>,
"haheartbeatifaces":<String_value>,
"pfifaces":<String_value>,
"ifaces":<String_value>,
"netmask":<String_value>,
"inc":<String_value>,
"ssl2":<String_value>,
"hellointerval":<Double_value>,
"deadinterval":<Double_value>,
"masterstatetime":<Double_value>,
"failsafe":<String_value>,
"routemonitor":<String_value>,
"maxflips":<Double_value>,
"maxfliptime":<Double_value>,
"curflips":<Double_value>,
"completedfliptime":<Double_value>,
"syncvlan":<Double_value>,
"routemonitorstate":<String_value>,
"hasyncfailurereason":<String_value>,
"syncstatusstrictmode":<String_value>
}]}

<!--NeedCopy-->

count

URL: http:// <netscaler-ip-address> /nitro/v1/config/hanode? count=yes 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:

{ "hanode": [ { "__count": "#no"} ] }

<!--NeedCopy-->
hanode