ltm rule command CATEGORY resultΒΆ

iRule(1)						BIG-IP TMSH Manual						  iRule(1)

CATEGORY::result
       Returns the category or safesearch results retrieved during normal traffic flow.

SYNOPSIS
       CATEGORY::result (('category' ('-display' | '-id')? ('custom' | 'request_default' | 'request_default_and_custom')?) |
       'safesearch')

DESCRIPTION
       This iRule command is useful for when it is necessary to know the category or safesearch parameters returned during the
       categorization in the Category Lookup Agent in the per-request policy. As opposed to CATEGORY::lookup and
       CATEGORY::safesearch, which each require an additional query to the categorization engine, CATEGORY::result will give back
       what was found and stored, eliminating the need for additional lookups.

       Choose which should be returned (either "category" or "safesearch"). If "category", additional specifications may apply:
       "-display" will return categories in display name format. "custom", "request_default", or "request_default_and_custom"
       maybe be used to return respectively ONLY custom categories, ONLY database default categories, or both custom and default
       categories.

RETURN VALUE
       Returns a list of categories or safe search parameters. Return format is the same as CATEGORY::lookup and
       CATEGORY::safesearch.

VALID DURING
       CATEGORY_MATCHED

EXAMPLES
	when CATEGORY_MATCHED {
	    set cat [CATEGORY::result category -display request_default_and_custom]
	    log local0. "Category result retrieved: [lindex $cat 0]"
	    set ss [CATEGORY::result safesearch]
	    log local0. "Safe Search result retrieved: [lindex $ss 0], [lindex $ss 1]"
	}

HINTS
       Requires successful Category Lookup Agent in the per-request policy.

SEE ALSO
       CATEGORY::lookup CATEGORY::safesearch

CHANGE LOG
       @BIGIP-12.1.0 --First introduced the command.

BIG-IP							    2022-04-12							  iRule(1)