Retrieve projects in "Category" using REST

nicolas.carrivale February 10, 2020

Hi, i'm using Jira Cloud and making some PHP scripts to get information from the instance. I'm retrieving the whole project list with different data. But Project category is missing, or i cannot find it. I need to display in my list the category for every project or projects from only one category.
I read documentation and i cannot find where projects are mixed with categories, i can retrieve project list or category list, but i need them to be crossed. Thanks!

2 answers

1 accepted

1 vote
Answer accepted
DPKJ
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 10, 2020

@nicolas.carrivale  Welcome to the community!

 If you use this API https://developer.atlassian.com/cloud/jira/platform/rest/v3/?#api-rest-api-3-project-search-get

You should receive projectCartegory value with this API.

Please validate results against this page in UI - SITE_URL/secure/project/ViewProjects.jspa

nicolas.carrivale February 10, 2020

Thanks for the welcome! yes, i'm using that endpoint, and doc says that should display projectCategory, but look at the response i get:

4.png

What could it be? Best.

0 votes
DPKJ
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 10, 2020

Have you checked SITE_URL/secure/project/ViewProjects.jspa this page.

This will tell you if you have categories define against projects.

nicolas.carrivale February 10, 2020

Yes, i've checked and i have 11 project categories and different projects with them. Also i'm using an "Archived" category, for unused projects (as Jira cloud doesn't have "Archive" feature). Best.

DPKJ
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 10, 2020

@nicolas.carrivale  This is strange behaviour, I have checked with all the sites that I own and I get projectCategory information on all sites ( I am admin on all sites)

Screenshot 2020-02-10 at 3.41.10 PM.png

nicolas.carrivale February 10, 2020

@DPKJthanks! i figured out... there are some projects without category and many of them (maybe because alphabetically) appeared first. I've checked some middle values without success too. I guess that if project has no category, projectCategory would be empty(or maybe category "none"), but when there is no category, there isn't section neither. Best!

Like DPKJ likes this
DPKJ
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 10, 2020

@nicolas.carrivale  Great going!

Suggest an answer

Log in or Sign up to answer