Querying Issue lists via CSV

As the issues are treated like tabular data by the Issue Lists API API entry point, issue query results can also be retrieved in CSV format. The CSV cells will be quoted using double quotes (") and the columns separated using semicolons (;).

Retrieving issues via CSV functionality is also being used when exporting CSV from the Webinterface by clicking the Export button. If you want to automatize this you might not need an actual programming language in order to use the Dashboard JSON API but you could also achieve the result by using a command-line tool like wget or curl:

Authenticate via an ApiToken sent in the Authorization: AxToken header, and send along the X-Axivion-User-Agent: ApiClient client identification (see Authentication and General Hints).

Warning

The examples below reference the token via $DASHBOARD_API_TOKEN, but the shell expands it before running the command, so the token still appears in the process list (ps auwx), readable by any user on the machine. To avoid this, read the token from a file instead (e.g. curl’s --header @headerfile or a .netrc entry).

wget example:

wget -O download.csv --header "Authorization: AxToken $DASHBOARD_API_TOKEN" --header "X-Axivion-User-Agent: ApiClient" --header "Accept: text/csv" "http://localhost:9090/axivion/projects/<projectname>/issues/?kind=SV"

curl example:

curl --header "Authorization: AxToken $DASHBOARD_API_TOKEN" --header "X-Axivion-User-Agent: ApiClient" "http://localhost:9090/axivion/projects/<projectname>/issues/?kind=SV&format=csv"