Create Baseline with CLI (command line interface) API

hi all.
if i know the IDs of several fixletx… can i create a Baseline by CLI (iem.exe)??

I am looking for in this URL:
https://developer.bigfix.com/rest-api/iem_cli/iem_samples.html

Thanks in advance.

Does this help:
https://developer.bigfix.com/rest-api/api/baseline.html

You can make baselines or multi-action groups with the CLI or with the REST API. If you use the REST API, it makes it easier to write the logic in whatever language you prefer.

What kind of baselines?

I have example content that uses session relevance to determine what to make the baselines out of dynamically, then makes the baselines with session relevance.

The are a bit old at this point and I haven’t used them recently, but as far as I know they still work.

I should also point out that the webui has an “autopatch” feature that makes patch multi-action groups for Windows & RHEL patches automatically based upon criteria you specify.

hi @jgstew. i´m trying to use your task for create beslines to deploy patch for os Windows:
this one
https://bigfix.me/fixlet/details/6132
but is fail in this point:


is like no exist the file baselinecomponents.xml

Also i had to put some parameters like this in the top of the task:
image

what can i do?
thanks guru. :wink:

@jgstew Forget it. I get it.

Thanks you so much.
really you are a bigfix machine :ok_hand:

P.S : the curl url don´t work, but i changed it and the task work correctly

1 Like

Glad it worked out.

The fixlet/task is supposed to get those dynamically. You might have to override the root server URL or the site name depending on your needs, but the rest should have worked dynamically.

@jgstew when I search for relevant fixlets for a particular pc group it works with the application “big fix sessions relevance tester” :

unique values of ids of relevant fixlets whose(exists source release dates of it AND ( 0 < applicable computer count of it ) AND exists default action of it AND fixlet flag of it AND globally visible flag of it AND name of it does not contain "(Superseded)" AND name of it does not contain "Network Installation)" AND name of it does not contain "Local Installation)" AND name of it does not contain "(Administrative Installation)") of (members of bes computer group whose (name of it = "GRP_Equipos_1ª_Distribucion")) of bes sites whose("Enterprise Security" = name of it)

But, when i put the relevance in your task to generate the xml file… don´t work :neutral_face: :

concatenations “” of (“<BaselineComponent Name=%2522” & ( concatenation “%26amp; " of substrings separated by “%26 " of item 0 of it) & “%2522 IncludeInRelevance=%2522” & item 1 of it & “%2522 SourceSiteURL=%2522” & item 2 of it & “%2522 SourceID=%2522” & item 3 of it & “%2522 ActionName=%2522” & item 4 of it & “%2522><ActionScript MIMEType=%2522” & item 5 of it & “%2522>” & item 6 of it & “<SuccessCriteria Option=%2522” & item 7 of it & “%2522>” & item 8 of it & “” & item 9 of it & “”) of ( (if (it contains “%2522”) then (concatenations “%26quot;” of substrings separated by “%2522” of it) else it) of name of it, (it as string as lowercase) of (not success on run to completion of default action of it), url of site of it, (it as string) of id of it, content id of default action of it, script type of default action of it, (”<![CDATA[” & it & “%5d%5d>”) of script of default action of it, (if (success on custom relevance of it) then “CustomRelevance” else if (success on original relevance of it) then “OriginalRelevance” else if (success on run to completion of it) then “RunToCompletion” else “”) of default action of it, (if (not success on custom relevance of it) then “” else (“<![CDATA[” & it & “%5d%5d>”) of (custom success relevance of it)) of default action of it, (“<![CDATA[” & it & “%5d%5d>”) of relevance of it) of relevant fixlets whose (exists source release dates of it AND ( 0 < applicable computer count of it ) AND exists default action of it AND fixlet flag of it AND globally visible flag of it AND name of it does not contain “(Superseded)” AND name of it does not contain “Network Installation)” AND name of it does not contain “Local Installation)” AND name of it does not contain “(Administrative Installation)”) of (members of bes computer group whose (name of it = “GRP_Equipos_1ª_Distribucion”)) of bes sites whose(“Enterprise Security” = name of it)

Can you help me?

ok, work like this:

concatenations %22%22 of (%22<BaselineComponent Name=%2522%22 & ( concatenation %22%26amp; %22 of substrings separated by %22%26 %22 of item 0 of it) & %22%2522 IncludeInRelevance=%2522%22 & item 1 of it & %22%2522 SourceSiteURL=%2522%22 & item 2 of it & %22%2522 SourceID=%2522%22 & item 3 of it & %22%2522 ActionName=%2522%22 & item 4 of it & %22%2522><ActionScript MIMEType=%2522%22 & item 5 of it & %22%2522>%22 & item 6 of it & %22<SuccessCriteria Option=%2522%22 & item 7 of it & %22%2522>%22 & item 8 of it & %22%22 & item 9 of it & %22%22) of ( (if (it contains %22%2522%22) then (concatenations %22%26quot;%22 of substrings separated by %22%2522%22 of it) else it) of name of it, (it as string as lowercase) of (not success on run to completion of default action of it), url of site of it, (it as string) of id of it, content id of default action of it, script type of default action of it, (%22<![CDATA[%22 & it & %22%5d%5d>%22) of script of default action of it, (if (success on custom relevance of it) then %22CustomRelevance%22 else if (success on original relevance of it) then %22OriginalRelevance%22 else if (success on run to completion of it) then %22RunToCompletion%22 else %22%22) of default action of it, (if (not success on custom relevance of it) then %22%22 else (%22<![CDATA[%22 & it & %22%5d%5d>%22) of (custom success relevance of it)) of default action of it, (%22<![CDATA[%22 & it & %22%5d%5d>%22) of relevance of it) of unique values of relevant fixlets whose (exists source release dates of it AND name of site of it contains %22Security%22 AND exists default action of it AND fixlet flag of it AND globally visible flag of it AND name of it does not contain %22(Superseded)%22 AND name of it does not contain %22Network Installation%22 AND name of it does not contain %22Local Installation%22 AND name of it does not contain %22(Administrative Installation)%22) of (members of bes computer group whose (name of it = %22PRUEBA-BASELINE-PARCHES%22))

thanks for everything

1 Like