I can get the default action for a fixlet like this…
default action of bes fixlets whose (name of it =
"INSERT-NAME-OF-FIXLET-HERE")
… but the properties of bes fixlet action are just the following…
content id of <bes fixlet action>: string script of <bes fixlet action>: string script type of <bes fixlet action>: string
… There seems to be no way to get the list of named parameters expected by a script. I really really don’t want to have to try writing a BigFix Action Script interpreter in Javascript to extract the parameter names. Is there an easier way to get the list of parameters?
Are you referring to the “action parameter query” action script?
Since the script uses a pretty simple syntax, you can parse it with regexes and string inspectors.
This session relevance will list all the fixlets on your deployment with default actions that have an action parameter query, along with the parameter name:
( ( name of it, id of it, name of site of it, ( parenthesized part 1 of it ) of matches ( regex
"action parameter query %22([^%22]*)" ) of script of
default action of it ) ) of bes fixlets whose ( exists
default action whose ( script of it contains
"action parameter query" ) of it )
Here’s that relevance from 2012 but modified to show all actions:
(
(
name of it, id of it, display name of site of it,
(
(
parenthesized part 1 of it
)
of matches
(
regex "action parameter query %22([^%22]*)"
)
of script of it, content id of it
)
of
(
actions of it
)
)
)
of bes fixlets
whose
(
exists action
whose
(
script of it contains "action parameter query"
)
of it
)
Hello,
am I missing something or why I just get this error?
<Query Resource="((name of it,id of it,name of site of it,(parenthesized part 1 of it) of matches (regex “action parameter query “([^”]*)”) of script of default action of it)) of bes fixlets whose (exists default action whose (script of it contains “action parameter query”) of it)">
This expression contained a character which is not allowed.
This is interesting. I used CTRL+C from browser output and put it there. Some of quotes looks different. To query with relevance in browser I copied previous example part of code.