RTC - Query
Accepted answer
This is a Batch file that downloads the CSV file:
@echo off rem *********** rem * Licensed Materials - Property of IBM rem * © Copyright IBM Corporation 2007, 2022. All Rights Reserved. rem * rem * Note to U.S. Government Users Restricted Rights: Use, rem * duplication or disclosure restricted by GSA ADP Schedule rem * Contract with IBM Corp. rem ***********/ rem set CURLPATH=C:\Development\cURL\curl-7.64.1-win64-mingw\bin set CURLPATH=C:\Windows\System32 set COOKIES=./cookies.txt set USER=ralph set PWD=ralph set HOST=https://elm.example.com:9443/ccmrem For JAS Enabled Setup follow guidance from see https://jazz.net/wiki/bin/view/Main/NativeClientAuthentication#Open_ID_Connect_and_the_Jazz_Sec "%CURLPATH%\curl" -k -c %COOKIES% "%HOST%/authenticated/identity" "%CURLPATH%\curl" -k -L -b %COOKIES% -c %COOKIES% -d j_username=%USER% -d j_password=%PWD% "%HOST%/authenticated/j_security_check" "%CURLPATH%\curl" -X GET -k -b %COOKIES% "%HOST%/resource/itemOid/com.ibm.team.workitem.query.QueryDescriptor/_MP6ZcAS7EeyiDIlAjMF45Q?_mediaType=text/csv" -o query.csv
</pre>
One other answer
The first question would be, why you even need to export the data every day. The data is available in the tool and creating a copy does not make so much sense.
There are several possible solutions for this. One solution is, to run the query in the Web UI. There are several actions in the top right menu. One is to download the query as CSV. Another is to the far right, directly left to the dark X called View Full Result Set in Printable Format. Click that button and a new tab opens with the data in HTML. Copy the URL from the new tab. It looks like
Change the media type from text/html to text/csv like so:
If you run that URL in a browser, it performs the download. I believe you should be able to use cURL to automate this. Use RESTClient (Firefox extension) to get the cURL call for
I don't know how the file download works. The CSV file is in the response. It is likely that cURL allows to save it as a file.
An alternative option would be to use https://github.com/jazz-community/work-item-command-line and to use the export capability.