cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Reporting problem - payload format

jose-antonio_ra
Inactive

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

5 REPLIES 5

dirk_wall
Dynatrace Helper
Dynatrace Helper

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

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

dirk_wall
Dynatrace Helper
Dynatrace Helper

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

MevlutS
Contributor

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)")} )

 

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

Featured Posts