• Forums
    • Public Forums
      • Community Connect
      • Dynatrace
        • Dynatrace Open Q&A
      • Application Monitoring & UEM
        • AppMon & UEM Open Q&A
      • Network Application Monitoring
        • NAM Open Q&A
  • Home /
  • Public Forums /
  • Application Monitoring & UEM /
  • AppMon & UEM Open Q&A /
avatar image
Question by Ivan K. · Feb 12, 2014 at 07:02 PM ·

REST api - invalid XML from list of dashboards

When calling http://localhost:8020/rest/management/dashboards (on 5.5), the XML that comes back is invalid.  There are two errors and I can't serialize this back to Java objects using a couple of different libraries (XStream and JAXB).

 

Errors:

  • are that the "jnlp" attribute is not escaped ("=" sign and others are an issue), and the 
  • <type> is within <description> and doesn't have a closing tag

 

Is there any way to filter the results that come back so that it's only href and id are returned for the list of dashboards, and no "description" for the overall call?

 

You can copy this to any online XML validator to see that it'll complain about invalid XML:


	
	
	
		Lists all Dashboards that are accessible to the user. The href points to a default report in HTML format. Choose a different
		type by adding '?type=' to the link. Additional supported parameters are 'source', 'compare', 'filter' and 'format', 
		see documentation for a detailed description.
	
Comment

People who like this

0 Show 0
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

3 Replies

  • Sort: 
  • Most voted
  • Newest
  • Oldest
avatar image

Answer by Ivan K. · Feb 13, 2014 at 03:06 PM

Martin - that's exactly what caused this!  Great spot!

I used the RESTclient plugin for Firefox and picked up the results from the wrong tab (Response Body preview), which changed the encoded files.  I saved those results and used them to write JUnit tests, so I didn't have the dynaTrace result from the server in my Java app to have noticed what it really should have been.

Thanks!

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image

Answer by Martin W. · Feb 13, 2014 at 09:09 AM

Thanks for your feedback!

Of course the above XML is invalid. http://validator.w3.org/check reports 6 errors.

But the document the REST interface actually responds looks differently - here is a short example:


    
    Lists all Dashboards that are accessible to the user. The href points to a default report in HTML format. Choose a different type by adding '?type=<type>' to the link. Additional supported parameters are 'source', 'compare', 'filter' and 'format', see documentation for a detailed description.

As you can see there are some little differences. See '?type=&lt;type&gt;' within the description element for example.

How do you access the dashboards REST interface? Within an application, script or manually via internet browser?

If the REST interface is requested using an internet browser, the browser usually visualizes '?type=&lt;type&gt;' as '?type=<type>'. But there is a difference if you save the document to a file with your browser and validate the file, or if you copy the browser content and paste it to an online validator. Validating the stored file with http://validator.w3.org/check succeed without an error.

On the server side JAXB is used for response generation, so JAXB on the client side should fit perfectly.

Martin

 

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image

Answer by Andreas G. · Feb 12, 2014 at 08:45 PM

Thanks. I forwarded this to the engineering team and see what they have to say about this regarding options for the current version and whether we can address (fix) this in upcoming versions

Andi

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

How to get started

First steps in the forum
Read Community User Guide
Best practices of using forum

NAM 2019 SP5 is available


Check the RHEL support added in the latest NAM service pack.

Learn more

LIVE WEBINAR

"Performance Clinic - Monitoring as a Self Service with Dynatrace"


JANUARY 15, 3:00 PM GMT / 10:00 AM ET

Register here

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Forum Tags

dotnet mobile monitoring load iis 6.5 kubernetes mainframe rest api dashboard framework 7.0 appmon 7 health monitoring adk log monitoring services auto-detection uem webserver test automation license web performance monitoring ios nam probe collector migration mq web services knowledge sharing reports window java hybris javascript appmon sensors good to know extensions search 6.3+ server documentation easytravel web dashboard kibana system profile purelytics docker splunk 6.1 process groups account 7.2 rest dynatrace saas spa guardian appmon administration production user actions postgresql upgrade oneagent measures security Dynatrace Managed transactionflow technologies diagnostics user session monitoring unique users continuous delivery sharing configuration alerting NGINX splitting business transaction client 6.3 installation database scheduler apache mobileapp RUM php dashlet azure purepath agent 7.1 appmonsaas messagebroker nodejs 6.2 android sensor performance warehouse
  • Forums
  • Public Forums
    • Community Connect
    • Dynatrace
      • Dynatrace Open Q&A
    • Application Monitoring & UEM
      • AppMon & UEM Open Q&A
    • Network Application Monitoring
      • NAM Open Q&A