How can I get multiple item attributes in the Reportable REST API?
I'm trying to grab multiple attributes of any item or artifact from the Reportable REST API using XMLHttpRequest in JavaScript, but each time I try, I get an empty response back from the server. However, if I put the URI I'm using directly in my browser, I can see the XML result that I'm expecting. For example, this works:
2 answers
I have explained how the reportable REST API for EWM works with an example here: https://rsjazz.wordpress.com/2022/03/02/ewm-reportable-rest-api/ . The example gets multiple work items and multiple attributes as well.
Comments
I appreciate your response, Ralph! I've been referring to your document quite frequently, it has been a really good resource so far as I've been trying to get started. From what I can tell, I've formulating my URIs just as you've described here, and it works great when requested from a browser, but I am unable to get a request through my coded GET request. It's especially perplexing that the format for selecting multiple attributes - with the /(att1|att2) format - has worked perfectly while working with the ETM REST API but is stumping me here.
If you use RESTClient in the browser, it inherits the authentication from your login to the CCM. If you try that with Postman, you will not have that luxury and it will behave like an application that is not logged in.
We've been running our requests through OpenSocial gadgets embedded in the tool in order to inherit the authentication. I'll take a look at encoding the URL. I assume that's being done in some code we inherited, since it's worked for everything else up to this point, but I'm about out of ideas of things to look at. Appreciate the help!
Got it working by running the widget from the mini dashboard while inside the EWM application. I was running it from the ETM application before, assuming that as long as I had the correct URL, my authentication and everything could be used to query any of our server applications. I'm still not exactly sure what's different between running the same widget while on each of the two tools, especially where I was allowed to get a single attribute while still it ETM, but I can get multiple attributes now.