I am working with PowerShell to create tasks via the API. I have it working fine using the XML below. What I cannot figure out is how do I set the REAPPLY and RETRY options while scheduling the task? When I add them under SETTINGS my request fails. I found on the forum mention of a slightly different XML structure to be used with SourcedFixletAction, but the link in that post goes to a dead webpage.
Do you happen to have examples of what youâve tried for reapply and retry options?
For reference to the XML schema definition, please see https://developer.bigfix.com/rest-api/schema_files.html. As it says, you can find the XSD files from the Root Server itself (via the filesystem or via https), or you can even find them today in the Utilities section of the downloads pages for the given version:
One tip that can help here: if you have access to the Console or WebUI and can create actions with the desired behavior via the UI, you can then export the action definition (in the Console, right-click the Action and select âExport Actionâ OR you can also access the XML definition via the REST API through /api/action/<action id> - https://developer.bigfix.com/rest-api/api/action.html). This action XML definition can then be used as an example that you can adjust for your purposes to deploy via the API.
I did do just that - copied the XML from the API url of another action with the settings I want⌠all I get is âREQUEST FAILEDâ here is the XML I am using that fails:
Ok, I reproduced this. A common issue is that the ActionSettings node is defined as a sequence - all the elements in Settings, if they appear at all, must be present in the correct order.
I put together a sample XML based on what I think the settings are that youâre trying to produce -
In addition to rearranging some of your element order, I changed your StartDateTimeLocal and EndDateTimeLocal to StartDateTime and EndDateTime since you appear to be trying schedule in UTC time rather than endpoint local time, right?
edit: fixed some quote backslash-escapes that were a copy/paste artifact from the script