Running WI Export (html or cvs) via Java Client
2 answers
I would like to automate some query export (e.g. send it by mail every
day)
Is there a way to do it via API?
I can iterate a query results and ask every attribute, but is there a
way to perform the same action like exportin items in the UI?
The HTML and CSV export can be called via URL, which is probably the most
convenient way for you (I assume you would have a shell script which is
run once a day and could get the export using e.g. 'curl').
The URLs are of the form
https://jazz.net/jazz/resource/itemOid/com.ibm.team.workitem.query.QueryDescriptor/_g6IlwDWTEd6mccAyNHwwhQ?_mediaType=text/csv
To find the URL for your particular query, you can look at the links of
the 'Download as Spreadsheet' and 'View ... in Printable Format' buttons
in the Web UI.
--
Regards,
Patrick
Jazz Work Item Team
Thanks a lot Patric,
This script is working for me:
curl -k -c .\cookies.txt "https://<repository>:9943/jazz/authenticated/identity" > temp.html
curl -k -L -b .\cookies.txt -c .\cookies.txt -d j_username=%1 -d j_password=%2 https://<repository>:9943/jazz/authenticated/j_security_check > temp.html
curl -k -b .\cookies.txt https://<repository>:9943/jazz/resource/itemOid/com.ibm.team.workitem.query.QueryDescriptor/_pz6r4HdoEd6zr914Fr4kGg?_mediaType=text/csv > QueryResult.csv
Regards,
Moti
This script is working for me:
curl -k -c .\cookies.txt "https://<repository>:9943/jazz/authenticated/identity" > temp.html
curl -k -L -b .\cookies.txt -c .\cookies.txt -d j_username=%1 -d j_password=%2 https://<repository>:9943/jazz/authenticated/j_security_check > temp.html
curl -k -b .\cookies.txt https://<repository>:9943/jazz/resource/itemOid/com.ibm.team.workitem.query.QueryDescriptor/_pz6r4HdoEd6zr914Fr4kGg?_mediaType=text/csv > QueryResult.csv
Regards,
Moti