Hi,

I've been attempting to execute an HTTP XML API using a GET query like so:

https://[url]/action?actionString=<?xml version="1.0" encoding="utf-16"?><SomeAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><Data>MyData</Data></SomeAction>

When I place this in the URL field and click Save, I see that all open and close tags have been converted to open and close curly braces. My requests are failing with a 500 error. I've also tried url encoding the parameter but I'm receiving the same error. I've tested the api and have confirmed that the request is valid and works so it's not related to the data in my API call.

The API I'm calling also supports POST calls so I've attempted putting the data in the Postdata field but when I click save I get the following error:

"The validation of the data provided failed due to the following:{br/}{ul}{li}Postdata: Character sequences ('<...>') which can potentially form a tag are not allowed here{/li}{li}in notify "HTTP"{/li}{/ul}{br/}The object has not been changed."

I also attempted to url encode this string but I also get a 500 error when it executes. I'm guessing PRTG does it's own encoding.

How can I execute this XML API via GET or POST?


Article Comments

The one field ('url') is not in the exceptions when '<'/'>' to '{'/'}' is replaced and the other ('postdata') is a normal Edit Field which doesn't permit any tags.

Unfortunately the kind of call you are trying to do here isn't possible without us changing the code for the notifications which we cannot do at this time since there hasn't been enough requests for it. If customers vote this thread up though it's not that we won't consider putting it into the software.


Jan, 2014 - Permalink