BigFix REST API Blank Action

Hello

I would like to use the BigFix REST API to create a blank action but I would like to configure a message under the message tab, Something Like “Hello World”

I am using Postman as a tool to run the post command with. I am not sure how one would add a message under the message tab. Any ideas??

Have you reviewed the REST API examples or tutorial on the BigFix developer site?

The easiest way is to first create the action in the Console, then export the action which produces the XML file of the action. Then you just need to fill in the usual <Target> nodes when you send a copy of the action. The Messages are in the <Settings> nodes of the action.

Here’s one I exported

<?xml version="1.0" encoding="UTF-8"?>
<BES xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BES.xsd">
	<SingleAction>
		<Title>Test Empty Action</Title>
		<Relevance>true</Relevance>
		<ActionScript MIMEType="application/x-Fixlet-Windows-Shell">// Enter your action script here</ActionScript>
		<SuccessCriteria Option="RunToCompletion"></SuccessCriteria>
		<Settings>
			<ActionUITitle>This is my Running-Action Message Title</ActionUITitle>
			<PreActionShowUI>true</PreActionShowUI>
			<PreAction>
				<Text>This is my message text.  There are many like it but this one is mine.</Text>
				<AskToSaveWork>false</AskToSaveWork>
				<ShowActionButton>false</ShowActionButton>
				<ShowCancelButton>false</ShowCancelButton>
				<DeadlineBehavior>RunAutomatically</DeadlineBehavior>
				<DeadlineType>Interval</DeadlineType>
				<DeadlineInterval>P1D</DeadlineInterval>
				<ShowConfirmation>false</ShowConfirmation>
			</PreAction>
			<HasRunningMessage>true</HasRunningMessage>
			<RunningMessage>
				<Text>The Action is running now.</Text>
			</RunningMessage>
			<HasTimeRange>false</HasTimeRange>
			<HasStartTime>false</HasStartTime>
			<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="Nothing"></PostActionBehavior>
			<IsOffer>false</IsOffer>
		</Settings>
		<SettingsLocks>
			<ActionUITitle>false</ActionUITitle>
			<PreActionShowUI>false</PreActionShowUI>
			<PreAction>
				<Text>false</Text>
				<AskToSaveWork>false</AskToSaveWork>
				<ShowActionButton>false</ShowActionButton>
				<ShowCancelButton>false</ShowCancelButton>
				<DeadlineBehavior>false</DeadlineBehavior>
				<ShowConfirmation>false</ShowConfirmation>
			</PreAction>
			<HasRunningMessage>false</HasRunningMessage>
			<RunningMessage>
				<Text>false</Text>
			</RunningMessage>
			<TimeRange>false</TimeRange>
			<StartDateTimeOffset>false</StartDateTimeOffset>
			<EndDateTimeOffset>false</EndDateTimeOffset>
			<DayOfWeekConstraint>false</DayOfWeekConstraint>
			<ActiveUserRequirement>false</ActiveUserRequirement>
			<ActiveUserType>false</ActiveUserType>
			<Whose>false</Whose>
			<PreActionCacheDownload>false</PreActionCacheDownload>
			<Reapply>false</Reapply>
			<ReapplyLimit>false</ReapplyLimit>
			<RetryCount>false</RetryCount>
			<RetryWait>false</RetryWait>
			<TemporalDistribution>false</TemporalDistribution>
			<ContinueOnErrors>false</ContinueOnErrors>
			<PostActionBehavior>
				<Behavior>false</Behavior>
				<AllowCancel>false</AllowCancel>
				<Deadline>false</Deadline>
				<Title>false</Title>
				<Text>false</Text>
			</PostActionBehavior>
			<IsOffer>false</IsOffer>
			<AnnounceOffer>false</AnnounceOffer>
			<OfferCategory>false</OfferCategory>
			<OfferDescriptionHTML>false</OfferDescriptionHTML>
		</SettingsLocks>
		<IsUrgent>false</IsUrgent>
	</SingleAction>
</BES>
2 Likes

Great Stuff!! Thank you very much

Sure would be nice someday if someone created example REST API calls and be importable into Postman.

Over at developer.bigfix.com we have a number of examples under the REST API section, including this one for posting an Action from curl or Python…
https://developer.bigfix.com/rest-api/examples/create-action.html

I wouldn’t be as interested in Postman, because usually when doing an API thing I expect some higher-level logic like I’d implement in Python or PowerShell. I think it would be useful to have some end-to-end examples, mostly demonstrating XML replacement/addition… I’m looking into a tutorial “in my free time”

1 Like

Would love to see XML exit stage left and usher in json.