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:
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.
Answer by Ivan K. ·
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!
Answer by Martin W. ·
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=<type>'
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=<type>'
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
Answer by Andreas G. ·
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
JANUARY 15, 3:00 PM GMT / 10:00 AM ET