28 Sep 2020 11:32 AM
Hi all.
I'm doing a custom integration for problem reporting, but I have a problem. The webhook only supports payload in xml format.
Is there any way to fix it? Has anyone worked on something like this?
Thank you very much.
best regards!
Jose A
Solved! Go to Solution.
28 Sep 2020 02:56 PM
Hi Jose,
Please take a loot at the documentation (https://www.dynatrace.com/support/help/setup-and-configuration/integrations/third-party-integrations...), especially the section about 'Additional HTTP headers'. You can specify 'application/xml' as a header and then you can specify the payload as XML. Please be aware that you can't escape characters from the placeholders.
Hope this helps,
Cheers,
Dirk
28 Sep 2020 03:06 PM
Thanks Dirk!!
just one more thing, what do you mean by "escape characters from the placeholders" ??
Do you have an example to see if it affects my work?
Cheers
Jose A
28 Sep 2020 03:12 PM
The notification were built with JSON in mind. It could be that certain placeholders (e.g. the {ProblemDetailsHTML} contains HTML tags) contain one of the characters that should be escaped, e.g. https://www.freeformatter.com/xml-escape.html
Cheers,
Dirk
10 Apr 2022 04:59 PM - last edited on 11 Apr 2022 08:23 PM by Karolina_Linda
Hello @dirk_wall,
I have an issue for this topic. Could you help us please with this situation?
When we post the problem notification as XML to 3rd party system. The {ProblemDetailText} value include data like <masked>. Because of this the structure of XML element corrupts. So, can we replace it in custom payload like below method ? We can do that with AppDynamics, i don't know if we can do that in Dynatrace or not ?
#set( tmp_ProblemDetailText= !{ProblemDetailsText.replace("<masked>","(masked)")} )
12 Apr 2022 07:55 AM
Hi @MevlutS,
We don't support this as of today - the problem notifications were primarily designed and built for JSON payloads. It's great that XML payloads are also possible. However, nothing has been optimized in this direction, as more and more third-party systems are offering REST APIs that work with JSON payloads.
However, we're currently in the process of implementing a new notification system that will offer much more flexibility in designing the payload and will also be able to meet the requirements mentioned before. I can't share an ETA yet.
Cheers,
Dirk