get projects jira server API

maria cammisa March 21, 2024

Hello Team!  I reaching out bc we have an API integration, and when te customer wants to list all it's projects through the integration, is getting this error 

{\"errno\":-51,\"code\":\"ENETUNREACH\",\"syscall\":\"connect\",\"address\":\"x.xx.xxx.xx\",\"port\":443}",

the url is "/project/search" 

which one is the right endpoint to list all projects and issuetypes for Jira server / data center??

thank you for your support!

1 answer

1 accepted

0 votes
Answer accepted
Kseniia Trushnikova
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 21, 2024

Hi @maria cammisa,

To get all Jira projects and issue types, use the method /rest/api/2/project and the method /rest/api/2/issuetype. Please refer to the Jira Data Center API documentation.

maria cammisa March 25, 2024

Hi Ksenia! thanks for your answer! does the expand works with this endpoint?

rest/api/2/project&expand=issueTypes\ ?
Kseniia Trushnikova
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 25, 2024

@maria cammisa, no, you can get issue types for specific projects only. Use this method:

/rest/api/2/project/{projectIdOrKey}

 Replace {projectIdOrKey} with your project key.

Like maria cammisa likes this
maria cammisa March 26, 2024

thanks Again Ksenia! so there's no way to retrieve all projects with their issuetypes in one request? like in jira cloud I'm able to retrieve all in once using projects/search&expand=IssueTypes, there's no way to make something similar on jira server?

Kseniia Trushnikova
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 26, 2024

@maria cammisa,

Indeed, there's the method /rest/api/3/project/search for Jira Cloud that gets all in once, but I can't find any method that will work he same way for Jira Data Center... You see, API for Jira Cloud and Data center differs from each other.

Like maria cammisa likes this
maria cammisa March 26, 2024

Thank you a lot for your support! it was very clarifying

Suggest an answer

Log in or Sign up to answer