How can I find out the names of all parameters of a given fixlet?

(imported topic written by walterHiggins)

I would like to be able to obtain a list of all parameter names for the actions of a given fixlet/task.

Is there any way I can find out if a Fixlet has actions which will require parameters and what those parameter names are?

As far as I can tell , this metadata is not available except for open actions.

(imported comment written by walterHiggins)

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?

(imported comment written by Lee Wei)

You are correct and you are not missing anything.

Are you trying to find the Parameters so that you can create an Action via the Platform Server API?

There is an enhancement #11028 to add Action Parameters to the XML interface.

The BESAPI.FixletActionCreator class has a method AddParameter(name, value), but we will still have to parse to find out the names of the parameters.

In some code that I write, I parse and then replace the parameters myself.

Lee Wei

(imported comment written by jeremylam)

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 )
1 Like

(imported comment written by Lee Wei)

Nice Jeremy, where is the Like button on this forum?

Lee Wei

How to get action parameter query (parameters) for non default or particular action of bes fixlets?

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.


Please be mindful of smart quotes replacing standard double-quotes.

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.