API POST: /api/actions (BES XML for the action) How do I pass html tags?

The below is the XML I am passing to /api/actions. Notice the parameter name Test. the &lt; and &gt; are not converting to < > in the Bigfix console. Instead they are inserting the literals. Has anyone else successfully passed HTML tags inside of the XML post for bigfix actions?

   <BES xsi:noNamespaceSchemaLocation="BES.xsd">
    <MultipleActionGroup>
       <Title>Executor(v1):2155811041fa8125</Title>
       <Relevance>true</Relevance>
       <SourcedMemberAction>
          <SourceFixlet>
             <Sitename>CrossPlatformCustomContent</Sitename>
             <FixletID>6217</FixletID>
             <Action>Action1</Action>
          </SourceFixlet>
          <Parameter Name="test">&lt;test&gt;</Parameter>
       </SourcedMemberAction>
       <Target>
          <ComputerID>6587934</ComputerID>
       </Target>
    </MultipleActionGroup>
    </BES>

https://bigfix.me/restapi/?id=261

Have you tried passing them without escaping?

obviously passing this would be invalid XML.

<Parameter Name="test"><test></Parameter>

Try using CDATA to escape.

<Parameter Name="test"><![CDATA[<test>]]></Parameter>
1 Like

You can also try this site:

http://www.mikezilla.com/exp0012.html

It works for me. I had problems with the “é” sign, but this solved it for me (use the Unicode Value).

1 Like

Thanks Steini44 - the unicode solved it!

1 Like