Filtering patches with REST API

As @JasonWalker said, this is not where this Session Relevance goes, this is for client relevance. You have to use a different API endpoint to get Session Relevance results, and it has nothing to do with baselines, but if you use this particular session relevance, then it will return which fixlets you should put in the baseline. Once you have the result of which fixlets to put in the baseline, THEN you can build the baseline with those fixlets. That said, it might be easier to start with building a baseline with just 2 hard coded fixlets just to learn how to do that part, THEN worry about which components you actually want in the baseline after you figure out how to properly make a baseline with the REST API.

You really need to break this down into the smallest possible steps. Figure out how to get Session Relevance results with the REST API. Figure out how to create an example fixlet / task (that doesn’t actually have actionscript that would make changes) with the REST API. Figure out how to use SourcedFixletAction to take action on it and target endpoints using ComputerNames or ComputerIDs. Figure out how to create simple baseline, figure out how to use SourcedFixletAction to create an action from that baseline. Then figure out how to make the baseline with the components from the Session Relevance result. Then use SourcedFixletAction with that resulting baseline to create an action.

Also, the part that really saves you the most time is generating the baseline automatically with the right components. Once you do that, you can just create the action and target it by hand in the console. You can figure out how to automate that last part later on, but getting the baseline built is by far the biggest time saver.

Also, you should probably be comfortable with most of these steps by hand in the console first, because that can give you something to build towards. You can often export things created in the console, then use that as a template with the REST API to recreate the same. First recreate it exactly with the REST API, then use it as a template to create something slightly different with the REST API, and so on.

There are many examples of ways to use the BigFix REST API on the forums and elsewhere. It really seems like you need to play around with them and understand them better in general. It does seem like there could be some better minimal examples on the BigFix GitHub REST API Examples Repo. Something to work on adding to in the future.

Related: