Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Export projects and all associated users

Jordan King
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 2, 2021

Is there a way in the existing product, or possibly an add-on that allows you to export all projects and the associated users?

1 answer

1 accepted

0 votes
Answer accepted
Pramodh M
Community Champion
February 2, 2021

Hi @Jordan King 

To get all users, follow this API

curl --request GET \ 
--url 'https://your-domain.atlassian.com/rest/api/3/users/search' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'

To get all the projects, follow this API

curl --request GET \ 
--url 'https://your-domain.atlassian.net/rest/api/3/project' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'

Replace your Atlassian site name, email address, and token

The token can be generated here

https://id.atlassian.com/manage-profile/security/api-tokens

The documentation links are here

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-users-search-get

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-projects/#api-rest-api-3-project-get

Once you have got the data, save it to file and use CSV Formatter to sort the data in here https://json-csv.com

Thanks,
Pramodh

Petr AST
Contributor
February 3, 2021

@Pramodh M Hi!

Can you tell me if it is possible to export all advanced search fields to csv in a similar way?

I cannot automate this process in any way. Now I have to follow the download link like 

https://domain.atlassian.net/sr/jira.issueviews:searchrequest-csv-all-fields/temp/SearchRequest.csv?jqlQuery=project+%3D+ProjectName+order+by+created+DESC&tempMax=1000

The download of the file begins, which I then transfer the file to the desired folder.
Thanks a lot!

Pramodh M
Community Champion
February 3, 2021

Hi @Petr AST 

It is possible to get the list of issues through API's but we have to make multiple calls

 curl --request GET \
--url 'https://your-domain.atlassian.net/rest/api/3/search?jql=project%3DJIRA%20ORDER%20BY%20key&maxResults=100&startAt=0' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'

We have to change startAt for every Call and change the JQL query

Thanks,
Pramodh

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events