ADC NITRO APIs

nsicapprofile

Configuration for ICAP profile resource.

Properties

(click to see Operations )

Name Data Type Permissions Description
name Read-write Name for an ICAP profile. Must begin with a letter, number, or the underscore (_) character. Other characters allowed, after the first character, are the hyphen (-), period (.), hash (#), space ( ), at (@), colon (:), and equal (=) characters. The name of a ICAP profile cannot be changed after it is created.



CLI Users: If the name includes one or more spaces, enclose the name in double or single quotation marks (for example, “my icap profile” or ‘my icap profile’).

Minimum length = 1

Maximum length = 127
preview Read-write Enable or Disable preview header with ICAP request. This feature allows an ICAP server to see the beginning of a transaction, then decide if it wants to opt-out of the transaction early instead of receiving the remainder of the request message.

Default value: DISABLED

Possible values = ENABLED, DISABLED
previewlength Read-write Value of Preview Header field. Citrix ADC uses the minimum of this set value and the preview size received on OPTIONS response.

Default value: 4096

Minimum value = 0

Maximum value = 4294967294
uri Read-write URI representing icap service. It is a mandatory argument while creating an icapprofile.

Minimum length = 1
hostheader Read-write ICAP Host Header.

Minimum length = 1
useragent Read-write ICAP User Agent Header String.

Minimum length = 1
mode Read-write ICAP Mode of operation. It is a mandatory argument while creating an icapprofile.

Possible values = REQMOD, RESPMOD
queryparams Read-write Query parameters to be included with ICAP request URI. Entered values should be in arg=value format. For more than one parameters, add ; separated values. e.g.: arg1=val1;arg2=val2.

Minimum length = 1
connectionkeepalive Read-write If enabled, Citrix ADC keeps the ICAP connection alive after a transaction to reuse it to send next ICAP request.

Default value: ENABLED

Possible values = ENABLED, DISABLED
allow204 Read-write Enable or Disable sending Allow: 204 header in ICAP request.

Default value: ENABLED

Possible values = ENABLED, DISABLED
inserticapheaders Read-write Insert custom ICAP headers in the ICAP request to send to ICAP server. The headers can be static or can be dynamically constructed using PI Policy Expression. For example, to send static user agent and Client’s IP address, the expression can be specified as “User-Agent: NS-ICAP-Client/V1.0\r\nX-Client-IP: “+CLIENT.IP.SRC+”\r\n”.

The Citrix ADC does not check the validity of the specified header name-value. You must manually validate the specified header syntax.

Minimum length = 1
inserthttprequest Read-write Exact HTTP request, in the form of an expression, which the Citrix ADC encapsulates and sends to the ICAP server. If you set this parameter, the ICAP request is sent using only this header. This can be used when the HTTP header is not available to send or ICAP server only needs part of the incoming HTTP request. The request expression is constrained by the feature for which it is used.

The Citrix ADC does not check the validity of this request. You must manually validate the request.

Minimum length = 1
reqtimeout Read-write Time, in seconds, within which the remote server should respond to the ICAP-request. If the Netscaler does not receive full response with this time, the specified request timeout action is performed. Zero value disables this timeout functionality.

Default value: 0

Minimum value = 0

Maximum value = 86400
reqtimeoutaction Read-write Name of the action to perform if the Vserver/Server representing the remote service does not respond with any response within the timeout value configured. The Supported actions are

* BYPASS - This Ignores the remote server response and sends the request/response to Client/Server.

* If the ICAP response with Encapsulated headers is not received within the request-timeout value configured, this Ignores the remote ICAP server response and sends the Full request/response to Server/Client.

* RESET - Reset the client connection by closing it. The client program, such as a browser, will handle this and may inform the user. The client may then resend the request if desired.

* DROP - Drop the request without sending a response to the user.

Default value: RESET

Possible values = BYPASS, DROP, RESET
logaction Read-write Name of the audit message action which would be evaluated on receiving the ICAP response to emit the logs.
__count 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/nsicapprofile

HTTP Method: POST

Request Headers:

Cookie:NITRO_AUTH_TOKEN= <tokenvalue>

Content-Type:application/json

Request Payload:


{"nsicapprofile":{
<b>      "name":<String_value>,
</b>      "preview":<String_value>,
      "previewlength":<Double_value>,
<b>      "uri":<String_value>,
</b>      "hostheader":<String_value>,
      "useragent":<String_value>,
<b>      "mode":<String_value>,
</b>      "queryparams":<String_value>,
      "connectionkeepalive":<String_value>,
      "allow204":<String_value>,
      "inserticapheaders":<String_value>,
      "inserthttprequest":<String_value>,
      "reqtimeout":<Double_value>,
      "reqtimeoutaction":<String_value>,
      "logaction":<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/nsicapprofile/ name_value<String>

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/nsicapprofile

HTTP Method: PUT

Request Headers:

Cookie:NITRO_AUTH_TOKEN= <tokenvalue>

Content-Type:application/json

Request Payload:


{"nsicapprofile":{
<b>      "name":<String_value>,
</b>      "preview":<String_value>,
      "previewlength":<Double_value>,
      "uri":<String_value>,
      "hostheader":<String_value>,
      "useragent":<String_value>,
      "mode":<String_value>,
      "queryparams":<String_value>,
      "connectionkeepalive":<String_value>,
      "allow204":<String_value>,
      "inserticapheaders":<String_value>,
      "inserthttprequest":<String_value>,
      "reqtimeout":<Double_value>,
      "reqtimeoutaction":<String_value>,
      "logaction":<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/nsicapprofile? action=unset

HTTP Method: POST

Request Headers:

Cookie:NITRO_AUTH_TOKEN= <tokenvalue>

Content-Type:application/json

Request Payload:


{"nsicapprofile":{
<b>      "name":<String_value>,
</b>      "preview":true,
      "previewlength":true,
      "hostheader":true,
      "useragent":true,
      "queryparams":true,
      "connectionkeepalive":true,
      "allow204":true,
      "inserticapheaders":true,
      "inserthttprequest":true,
      "reqtimeout":true,
      "reqtimeoutaction":true,
      "logaction":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/nsicapprofile

Query-parameters:

attrs

http:// <netscaler-ip-address> /nitro/v1/config/nsicapprofile? 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/nsicapprofile? filter=property-name1:property-val1,property-name2:property-val2

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

view

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

Use this query-parameter to get the summary output of nsicapprofile 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/nsicapprofile? pagesize=#no;pageno=#no

Use this query-parameter to get the nsicapprofile 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:


{ "nsicapprofile": [ {
      "name":<String_value>,
      "preview":<String_value>,
      "previewlength":<Double_value>,
      "uri":<String_value>,
      "hostheader":<String_value>,
      "useragent":<String_value>,
      "mode":<String_value>,
      "queryparams":<String_value>,
      "connectionkeepalive":<String_value>,
      "allow204":<String_value>,
      "inserticapheaders":<String_value>,
      "inserthttprequest":<String_value>,
      "reqtimeout":<Double_value>,
      "reqtimeoutaction":<String_value>,
      "logaction":<String_value>
}]}

<!--NeedCopy-->

get

URL: http:// <netscaler-ip-address> /nitro/v1/config/nsicapprofile/ name_value<String>

Query-parameters:

attrs

http:// <netscaler-ip-address> /nitro/v1/config/nsicapprofile/ name_value<String> ? 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/nsicapprofile/ name_value<String> ? view=summary

Use this query-parameter to get the summary output of nsicapprofile 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:


{  "nsicapprofile": [ {
      "name":<String_value>,
      "preview":<String_value>,
      "previewlength":<Double_value>,
      "uri":<String_value>,
      "hostheader":<String_value>,
      "useragent":<String_value>,
      "mode":<String_value>,
      "queryparams":<String_value>,
      "connectionkeepalive":<String_value>,
      "allow204":<String_value>,
      "inserticapheaders":<String_value>,
      "inserthttprequest":<String_value>,
      "reqtimeout":<Double_value>,
      "reqtimeoutaction":<String_value>,
      "logaction":<String_value>
}]}

<!--NeedCopy-->

count

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


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

<!--NeedCopy-->
nsicapprofile