hello,
i want to use the api of my jira to export all the ticket on the file Excel .csv
this is my code :
$username = '.........';
$password = '.........
$url = 'https://................................';
$curl = curl_init();
curl_setopt($curl, CURLOPT_USERPWD, "$username:$password");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
$issue_list = (curl_exec($curl));
echo $issue_list;
i need your help,
thanx you :) :)
Hey, Guy!
I'm not a PHP programmer, but I can give you some information regarding Jira's API. Depending on how you want to search the issues and if you want one or a list of issues, you can use the below REST call:
Get the issue information with the Issue Key or ID(One issue at the a time): /rest/api/2/issue/{issueIdOrKey}
Get issues with a JQL query(List of Issues: /rest/api/2/search?jql={jql}
There are other REST calls you can use, which are all listed in the following documentation:
JIRA Server platform REST API reference
From this, you'll receive a response from Jira in JSON with all the issues and field values and you'll need to arrange them to save it as a CSV.
----
Also, you probably know this and you have other reasons to do this via the REST API, but Jira has a built-in export function. When you search for issues in the issue navigator you can click on "Export", then in CSV(All Fields) to generate a CSV file with all the list of issues.
Kind regards,
Maurício Karas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.