Hi There,
I’m using curl command and it returns with 'Specified source object does not exist’
while running the curl command
curl -k -u "username@password" -X POST -H "Content-Type: application/xml" -d "<BES xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='BES.xsd'><SourcedFixletAction><SourceFixlet><Sitename>Windows</Sitename><FixletID>123</FixletID></SourceFixlet><Target><ComputerName>com123</ComputerName></Target></SourcedFixletAction></BES>" "https://servername:52311/api/actions"
here , I tried pasting the xml after -d in the curl command, but it is not getting pasted.
You can use the “code tag” icon to format your XML as code. I’ve fixed your post already.
Ok, so are you abke to find the issue, why it is returning this error
It took me a while to get to a computer - I posted earlier from my phone where I couldn’t really check it out but I could reformat so maybe others could help.
It looks like the SourceFixlet is missing the Action ID - usually “Action1” but it could vary if you wanted to send “Action2” from the source fixlet.
See https://developer.bigfix.com/rest-api/iem_cli/iem_samples.html#actions
<BES xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BES.xsd">
<SourcedFixletAction>
<SourceFixlet>
<Sitename>ActionSite</Sitename>
<FixletID>42</FixletID>
<Action>Action1</Action>
</SourceFixlet>
<Target>
<ComputerName>my_computer.my_domain.com</ComputerName>
</Target>
</SourcedFixletAction>
</BES>
1 Like
With action name also it is retuning the same error. Here my KB id is of 7 digits , I have taken the source id from bigfix web console, will that be a problem?
The Fixlet ID required is … the Fixlet ID, not the Source ID. Right-click your column headers in the Fixlets view and be sure “ID” is displayed. It should be just a number, not KBxxxxx
instead of source id, I’ve just taken the value under Id column but still it is showing the same error.
Updating the XML to match a site name, fixlet id, and computer name in my deployment, the XML works but…the curl command doesn’t.
On curl, the -u takes the format “username:password”, not “username@password”. I wouldn’t expect to get the “specified source object does not exist” message though, but rather something like a password prompt or a 401:Unauthorized.
I’d still check that your SiteName and FixletID values are correct. If you post your actual XML here I can help you with a session relevance query to check that.
1 Like
Actually I’m not using the right id before and now it is getting executed and as a result I’m getting the action id. Thanks for your help
1 Like