RQM REST API - get attachment with non-English file name
Hello,
My customer uses non-English files to attach them to test steps in Rational Quality Manager. But when I send HTTP GET request (REST API) with Postman to extract the attachment presentation:
https://jazz.server.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/debugRQMProject/attachment/urn:com.ibm.rqm:attachment:31
then I get data like next:
...
<ns4:webId>31</ns4:webId>
<ns6:title>????????+???+???.csv</ns6:title>
<ns6:description>Attachments Section</ns6:description>
<ns4:creationDate>2017-05-01T03:27:14.904Z</ns4:creationDate>
<ns6:creator ns1:resource="https://jazz.server.com:9443/jts/resource/itemName/com.ibm.team.repository.Contributor/dlesin">dlesin</ns6:creator>
<ns4:fileSize>0.6</ns4:fileSize>
<ns5:updated>2017-05-01T03:27:14.904Z</ns5:updated>
</ns4:attachment>
You can see that non-English file name is displayed as questions signs.
Can please somebody outline a possible workaround to fix this problem and get readable file name in non-English?
Thank you!
2 answers
I would assume Postman is not rendering these non-English characters. You can check by using the same characters in a test case (for example) name/title and GET the test case in Postman and Firefox's Poster/HttpRequester. Can you copy the HTTP response content to another editor to display these characters? Also, check the HTTP response header for the file name (see https://jazz.net/wiki/bin/view/Main/RqmApi#ResourcesFootnote6).
Comments
I have followed to the recommendations. The old environment where I did it was "Chrome/Postman; OS-Ubuntu". I tried the same at "Firefox/HTTP Requester; OS-Windows". Another word I used another desktop environment to make the new request but with the same parameters.
When I try to get filename in the response text, I get:
Another way, if I try to extract file name from response's "Content-Disposition" header then I have the characters displayed in another kind but they are unreadable as earlier:
This looks like a defect. Please open a PMR (How to open a PMR (external users)) with all the relevant information.