ADC NITRO APIs

policyevaluation

Configuration for expr evaluation resource.

Properties

(click to see Operations )

Name Data Type Permissions Description
expression Read-write Expression string. For example: http.req.body(100).contains(“this”).
action Read-write Rewrite action name. Supported rewrite action types are -delete -delete_all -delete_http_header -insert_after -insert_after_all -insert_before -insert_before_all -insert_http_header -replace -replace_all . Minimum length = 1
type Read-write Indicates request or response input packet.

Possible values = HTTP_REQ, HTTP_RES, TEXT
input Read-write Text representation of input packet.
pitmodifiedinputdata Read-only Text representation of packet after evaluating expression or rewrite action.
pitboolresult Read-only Result of the expression in bool format.
pitnumresult Read-only Result of the expression in num format.
pitdoubleresult Read-only Result of the expression in double format.
pitulongresult Read-only Result of the expression in unsigned long format.
pitrefresult Read-only Result of the expression in string format.
pitoffsetresult Read-only Offset of the resultant sting.
pitoffsetresultlen Read-only Offset length of the resultant sting.
istruncatedrefresult Read-only Identify whether ref result is truncated result.
pitboolevaltime Read-only Average evaluation time of bool type expression in nanoseconds.
pitnumevaltime Read-only Average evaluation time of num type expression in nanoseconds.
pitdoubleevaltime Read-only Average evaluation time of double type expression in nanoseconds.
pitulongevaltime Read-only Average evaluation time of unsigned long type expression in nanoseconds.
pitrefevaltime Read-only Average evaluation time of string type expression in nanoseconds.
pitoffsetevaltime Read-only Average evaluation time in finding offset of the resultant string in the input. Time is in nanoseconds.
pitactionevaltime Read-only Average evaluation time of rewrite action in nanoseconds.
pitoperationperformerarray <String[]> Read-only Details of the operation Citrix ADC performed at various offsets during applying of rewrite action on input data. Operation can be insertion, modfication or deletion.

Possible values = INSERT, MODIFY, DELETE
pitoldoffsetarray <Double[]> Read-only Details of the offsets in the input data at which Citrix ADC either inserted or modified or deleted data during applying of rewrite action.
pitnewoffsetarray <Double[]> Read-only Details of the offsets in the output data at which Citrix ADC either inserted or modified or deleted data during applying of rewrite action.
pitoffsetlengtharray <Double[]> Read-only Details of the lengths of the data which Citrix ADC modified or deleted during applying of rewrite action.
pitoffsetnewlengtharray <Double[]> Read-only Details of the lengths of the data which Citrix ADC either inserted or modified during applying of rewrite action.
pitboolerrorresult Read-only Result of the bool type expression if any error occurs during evaluation. Result will be in string format.
pitnumerrorresult Read-only Result of the num type expression if any error occurs during evaluation. Result will be in string format.
pitdoubleerrorresult Read-only Result of the double type expression if any error occurs during evaluation. Result will be in string format.
pitulongerrorresult Read-only Result of the unsigned long type expression if any error occurs during evaluation. Result will be in string format.
pitreferrorresult Read-only Result of the ref type expression if any error occurs during evaluation. Result will be in string format.
pitoffseterrorresult Read-only Result of the expression if any error occurs in calculating offset. Result will be in string format.
pitactionerrorresult Read-only Result of the action if any error occurs in evaluation. Result will be in string format.
__count Read-only count parameter

Operations

(click to see Properties )

  • GET (ALL)
  • 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

get (all)

URL: http:// <netscaler-ip-address> /nitro/v1/config/policyevaluation Query-parameters: args http:// <netscaler-ip-address> /nitro/v1/config/policyevaluation? args=expression: <String_value> ,action: <String_value> , type:<String_value>, input:<String_value>,

Use this query-parameter to get policyevaluation resources based on additional properties.

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

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

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

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

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

{ "policyevaluation": [ {
expression:<String_value>,action:<String_value>,<b>type:<String_value>,</b><b>input:<String_value>,</b>"pitmodifiedinputdata":<String_value>,
"pitboolresult":<Boolean_value>,
"pitnumresult":<Double_value>,
"pitdoubleresult":<Double_value>,
"pitulongresult":<Double_value>,
"pitrefresult":<String_value>,
"pitoffsetresult":<Double_value>,
"pitoffsetresultlen":<Double_value>,
"istruncatedrefresult":<Boolean_value>,
"pitboolevaltime":<Double_value>,
"pitnumevaltime":<Double_value>,
"pitdoubleevaltime":<Double_value>,
"pitulongevaltime":<Double_value>,
"pitrefevaltime":<Double_value>,
"pitoffsetevaltime":<Double_value>,
"pitactionevaltime":<Double_value>,
"pitoperationperformerarray":<String[]_value>,
"pitoldoffsetarray":<Double[]_value>,
"pitnewoffsetarray":<Double[]_value>,
"pitoffsetlengtharray":<Double[]_value>,
"pitoffsetnewlengtharray":<Double[]_value>,
"pitboolerrorresult":<String_value>,
"pitnumerrorresult":<String_value>,
"pitdoubleerrorresult":<String_value>,
"pitulongerrorresult":<String_value>,
"pitreferrorresult":<String_value>,
"pitoffseterrorresult":<String_value>,
"pitactionerrorresult":<String_value>
}]}

<!--NeedCopy-->

count

URL: http:// <netscaler-ip-address> /nitro/v1/config/policyevaluation? args=expression: <String_value> ,action: <String_value> , type:<String_value>, input:<String_value>, ;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:

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

<!--NeedCopy-->
policyevaluation