ADC NITRO APIs

locationparameter

Configuration for location parameter resource.

Properties

(click to see Operations )

Name Data Type Permissions Description
context Read-write Context for describing locations. In geographic context, qualifier labels are assigned by default in the following sequence: Continent.Country.Region.City.ISP.Organization. In custom context, the qualifiers labels can have any meaning that you designate.

Possible values = geographic, custom
q1label Read-write Label specifying the meaning of the first qualifier. Can be specified for custom context only.

Minimum length = 1
q2label Read-write Label specifying the meaning of the second qualifier. Can be specified for custom context only.

Minimum length = 1
q3label Read-write Label specifying the meaning of the third qualifier. Can be specified for custom context only.

Minimum length = 1
q4label Read-write Label specifying the meaning of the fourth qualifier. Can be specified for custom context only.

Minimum length = 1
q5label Read-write Label specifying the meaning of the fifth qualifier. Can be specified for custom context only.

Minimum length = 1
q6label Read-write Label specifying the meaning of the sixth qualifier. Can be specified for custom context only.

Minimum length = 1
matchwildcardtoany Read-write Indicates whether wildcard qualifiers should match any other

qualifier including non-wildcard while evaluating

location based expressions.

Possible values: Yes, No, Expression.

Yes - Wildcard qualifiers match any other qualifiers.

No - Wildcard qualifiers do not match non-wildcard

qualifiers, but match other wildcard qualifiers.

Expression - Wildcard qualifiers in an expression

match any qualifier in an LDNS location,

wildcard qualifiers in the LDNS location do not match

non-wildcard qualifiers in an expression.

Default value: NO

Possible values = YES, NO, Expression
Locationfile Read-only Currently loaded location database file.
format Read-only Location file format.

Possible values = netscaler, ip-country, ip-country-isp, ip-country-region-city, ip-country-region-city-isp, geoip-country, geoip-region, geoip-city, geoip-country-org, geoip-country-isp, geoip-city-isp-org
custom Read-only Number of configured custom locations.
Static Read-only Number of configured locations in the database file (static locations).
lines Read-only Number of lines in the databse files.
errors Read-only Number of errros encountered while reading the database file.
warnings Read-only Number of warnings encountered while reading the database file.
entries Read-only Number of successfully added entries.
locationfile6 Read-only Currently loaded location database file.
format6 Read-only Location file format.

Possible values = netscaler6, geoip-country6
custom6 Read-only Number of configured custom locations.
static6 Read-only Number of configured locations in the database file (static locations).
lines6 Read-only Number of lines in the databse files.
errors6 Read-only Number of errros encountered while reading the database file.
warnings6 Read-only Number of warnings encountered while reading the database file.
entries6 Read-only Number of successfully added entries.
flags Read-only Information needed for display. This argument passes information from the kernel to the user space.
status Read-only This argument displays when the status (success or failure) of database loading.
databasemode Read-only This argument displays the database mode.

Possible values = File, Internal, Not applicable
flushing Read-only This argument displays the state of flushing.

Possible values = In progress, Idle
loading Read-only This argument displays the state of loading.

Possible values = In progress, Idle
builtin <String[]> Read-only .

Possible values = MODIFIABLE, DELETABLE, IMMUTABLE, PARTITION_ALL
feature Read-only The feature to be checked while applying this config.

Operations

(click to see Properties )

  • UPDATE
  • UNSET
  • GET (ALL)

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

unset

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

Request Headers:

Cookie:NITRO_AUTH_TOKEN= <tokenvalue>

Content-Type:application/json

Request Payload:

{"locationparameter":{
"context":true,
"q1label":true,
"q2label":true,
"q3label":true,
"q4label":true,
"q5label":true,
"q6label":true,
"matchwildcardtoany":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

update

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

Request Headers:

Cookie:NITRO_AUTH_TOKEN= <tokenvalue>

Content-Type:application/json

Request Payload:

{"locationparameter":{
"context":<String_value>,
"q1label":<String_value>,
"q2label":<String_value>,
"q3label":<String_value>,
"q4label":<String_value>,
"q5label":<String_value>,
"q6label":<String_value>,
"matchwildcardtoany":<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

get (all)

URL: http:// <netscaler-ip-address> /nitro/v1/config/locationparameter 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:

{ "locationparameter": [ {
"context":<String_value>,
"q1label":<String_value>,
"q2label":<String_value>,
"q3label":<String_value>,
"q4label":<String_value>,
"q5label":<String_value>,
"q6label":<String_value>,
"Locationfile":<String_value>,
"format":<String_value>,
"custom":<Double_value>,
"Static":<Double_value>,
"lines":<Double_value>,
"errors":<Double_value>,
"warnings":<Double_value>,
"entries":<Double_value>,
"locationfile6":<String_value>,
"format6":<String_value>,
"custom6":<Double_value>,
"static6":<Double_value>,
"lines6":<Double_value>,
"errors6":<Double_value>,
"warnings6":<Double_value>,
"entries6":<Double_value>,
"flags":<Double_value>,
"status":<Double_value>,
"databasemode":<String_value>,
"flushing":<String_value>,
"loading":<String_value>,
"matchwildcardtoany":<String_value>,
"builtin":<String[]_value>,
"feature":<String_value>
}]}

<!--NeedCopy-->
locationparameter