getrewriteactionResult Structure Definition

The getrewriteactionResult structure defines the return type for getrewriteaction API.

Syntax



Members

rc

If the method succeeds, rc is 0 else rc > 0. Values above 0x8000 indicate Warnings.

message

If the method succeeds, message is NULL else message contains Error/Warning message.

rewriteactionList

List of rewriteactions


rewriteaction Structure Definition

The rewriteaction structure defines the actual return type values for getrewriteaction API.

Syntax



Members

name

Name of the rewrite action.

type

Type of rewrite action. It can be: (delete|replace|insert_http_header|insert_before|insert_after|replace_http_res).

target

Expression specifying which part of HTTP header needs to be rewritten.

stringbuilderexpr

Expression specifying the value of rewritten HTTP header.

search

Search facility that is used to match multiple strings in the request or response. Used in the INSERT_BEFORE_ALL, INSERT_AFTER_ALL, REPLACE_ALL, and DELETE_ALL action types. The following search types are supported: * Text ("text(string)") - A literal string. Example: -search text("hello") * Regular expression ("regex(reregular exp)") - Pattern that is used to match multiple strings in the request or response. The pattern may be a PCRE-format regular expression with a delimiter that consists of any printable ASCII non-alphanumeric character except for the underscore (_) and space ( ) that is not otherwise used in the expression. Example: -search regex(re~^hello*~) The preceding regular expression can use the tilde (~) as the delimiter because that character does not appear in the regular expression itself. * XPath ("xpath(xpxpath expression)") - An XPath expression to search XML. The delimiter has the same rules as for regex. Example: -search xpath(xp%/a/b%) * JSON ("xpath_json(xpxpath expression)") - An XPath expression to search JSON. The delimiter has the same rules as for regex. Example: -search xpath_json(xp%/a/b%) NOTE: JSON searches use the same syntax as XPath searches, but operate on JSON files instead of standard XML files. * HTML ("xpath_html(xpxpath expression)") - An XPath expression to search HTML. The delimiter has the same rules as for regex. Example: -search xpath_html(xp%/html/body%) NOTE: HTML searches use the same syntax as XPath searches, but operate on HTML files instead of standard XML files; HTML 5 rules for the file syntax are used; HTML 4 and later are supported. * Patset ("patset(patset)") - A predefined pattern set. Example: -search patset("patset1"). * Datset ("dataset(dataset)") - A predefined dataset. Example: -search dataset("dataset1"). * AVP ("avp(avp number)") - AVP number that is used to match multiple AVPs in a Diameter/Radius Message. Example: -search avp(999) Note: for all these the TARGET prefix can be used in the replacement expression to specify the text that was selected by the -search parameter, optionally adjusted by the -refineSearch parameter. Example: TARGET.BEFORE_STR(",")

refinesearch

Specify additional criteria to refine the results of the search. Always starts with the "extend(m,n)" operation, where 'm' specifies number of bytes to the left of selected data and 'n' specifies number of bytes to the right of selected data to extend the selected area. You can use refineSearch only on body expressions, and for the INSERT_BEFORE_ALL, INSERT_AFTER_ALL, REPLACE_ALL, and DELETE_ALL action types. Example: -refineSearch 'EXTEND(10, 20).REGEX_SELECT(re~0x[0-9a-zA-Z]+~).

hits

The number of times the action has been taken.

undefhits

The number of times the action resulted in UNDEF.

referencecount

The number of references to the action.

description

Description of the action

comment

Comment. Can be used to preserve information about this rewrite action.

builtin

Flag to determine whether rewrite action is built-in or not

_nextgenapiresource


See Also