Trigger Multiple Fixlets using REST API with action settings

Hello All, We are trying to trigger an action using REST API Post using below XML body.

<?xml version="1.0" encoding="UTF-8"?>
<BES xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd">
<MultipleActionGroup>
<SourcedMemberAction>
<SourceFixlet>
<Sitename>Enterprise%20Security</Sitename>
<FixletID>460131801</FixletID>
<Action>Action1</Action>
</SourceFixlet>
</SourcedMemberAction>
<SourcedMemberAction>
<SourceFixlet>
<Sitename>Enterprise%20Security</Sitename>
<FixletID>458921007</FixletID>
<Action>Action1</Action>
</SourceFixlet>
</SourcedMemberAction>
<Target>
<ComputerID>8276255</ComputerID>
</Target>
</MultipleActionGroup>
<Settings>
    <PreActionShowUI>false</PreActionShowUI>
                <HasRunningMessage>false</HasRunningMessage>
                <HasTimeRange>false</HasTimeRange>
                <HasStartTime>true</HasStartTime>
                <StartDateTimeLocalOffset>PT0S</StartDateTimeLocalOffset>
                <HasEndTime>true</HasEndTime>
                <EndDateTimeLocalOffset>P2D</EndDateTimeLocalOffset>
                <HasDayOfWeekConstraint>false</HasDayOfWeekConstraint>
                <UseUTCTime>false</UseUTCTime>
                <ActiveUserRequirement>NoRequirement</ActiveUserRequirement>
                <ActiveUserType>AllUsers</ActiveUserType>
                <HasWhose>false</HasWhose>
                <PreActionCacheDownload>false</PreActionCacheDownload>
                <Reapply>false</Reapply>
                <HasReapplyLimit>true</HasReapplyLimit>
    <ReapplyLimit>3</ReapplyLimit>
                <HasReapplyInterval>false</HasReapplyInterval>
                <HasRetry>false</HasRetry>
                <HasTemporalDistribution>false</HasTemporalDistribution>
                <ContinueOnErrors>true</ContinueOnErrors>
                <PostActionBehavior Behavior="Restart">
                                <AllowCancel>false</AllowCancel>
                                <PostActionDeadlineBehavior>RunAutomatically</PostActionDeadlineBehavior>
                                <PostActionDeadlineInterval>P1D</PostActionDeadlineInterval>
                                <Title>Restart Now</Title>
                                <Text>Your system administrator is requesting that you restart your computer.  Please save any unsaved work and then take this action to restart your computer.</Text>
                </PostActionBehavior>
                <IsOffer>false</IsOffer>
</Settings>
</BES>

But it is not accepting <settings> after </MultipleActionGroup>. But we need to pass action settings also with the action.

Requesting your valuable opinions so that we can achieve this task.

1 Like

I believe ā€œSettingsā€ should be a child of ā€œMultipleActionGroupā€, not a sibling.

1 Like

Thank you so much JasonWalker for your reply. I have made ā€œSettingsā€ as a child of ā€œMultipleActionGroupā€. But after that, i am getting the below error
"""
XML parsing error: element ā€˜Settingsā€™ is not allowed for content model ā€˜(Title?,Relevance?,PreGroupActionScript?,MemberAction*,SourcedMemberAction*,PostGroupActionScript?,Settings?,SettingsLocks?,SkipLockedConstraint?,Domain?,Target?,SourceFixletID?,MIMEField*)ā€™ Line 51, Character 23

ā€œā€"

The order of the elements must be correct.
I donā€™t have a copy of the XSD handy but the error message lists the order in which the elements must appear (if they exist at all)
(Title?,Relevance?,PreGroupActionScript?,MemberAction*,SourcedMemberAction*,PostGroupActionScript?,Settings?,SettingsLocks?,SkipLockedConstraint?,Domain?,Target?,SourceFixletID?,MIMEField*)

If you didnā€™t change anything else from the earlier XML, ā€œSettingsā€ must come between your last ā€œSourcedMemberActionā€ and ā€œTargetā€