I have recently been working with the SA REST API to automate the creation of plans.
I have been able to create plans using Fixlets but now I need to add a baseline to the steps.
I’m using the following xml structure:
<sa-rest
xmlns="http://iemfsa.tivoli.ibm.com/REST"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<plan name="Test-Plan" domain="ALL CONTENT" pending-restart="PausePlan" version="2.0" source-plan-id="undefined" prefetch="false" source-plan-site-url="undefined">
<description>SA Plan created via API</description>
<category />
<source />
<source-severity />
<source-release-date />
<plan-steps>
<step id="101">
<fixlet fixlet-id="12902" site-type="custom" site-name="CustomSiteName" />
<targets>
<target-group name="ComputerGroupName" id="11111 />
</targets>
</step>
</plan-steps>
<execution-order>
<step id="101" depends="">
<on-failure action="StopPlan" targets="IncludeFailed" threshold="0" />
</step>
</execution-order>
<plan-settings>
<boolean-setting name="exclude-non-reporting-endpoint">true</boolean-setting>
</plan-settings>
</plan>
</sa-rest>'
The plan is actually “created”, I receive a 200 response code and it shows up in the console but it seems to lack data to be properly handled by the BigFix SA module as everytime I click on it to see the details I get the following error:
The error only shows up when I try adding a baseline instead of a regular Fixlet/Task. So I am wondering I need to include additional information when sending the create-plan request, specifically here:
<fixlet fixlet-id="12902" site-type="custom" site-name="CustomSiteName" />