Forums

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

I'm trying to query "/project/search" and the archived field isn't being returned. Any ideas?

ben.wilen December 10, 2024

Here is the endpoint I'm hitting:

https://<our_domain>>.atlassian.net/rest/api/3/project/search?expand=description,lead&maxResults=1

2 answers

1 accepted

1 vote
Answer accepted
Trudy Claspill
Community Champion
December 10, 2024

Hello @ben.wilen 

Welcome to the Atlassian community.

It appears that the endpoint returns only non-archived, non-deleted projects by default, and since they are live projects it appears to exclude the archived-related fields.

You can search the archived projects by adding status=archived to the parameters.

 

ben.wilen December 10, 2024

Thank you! To keep the api calls symmetrical is there a "status=..." for active projects? "status=active" did not work.

Trudy Claspill
Community Champion
December 10, 2024

Adding to this...

The ?includeArchived=true parameter noted by @Aaron Pavez _ServiceRocket_ does not work with the /rest/v3/project/search endpoint.

ben.wilen December 10, 2024

@Trudy Claspill Yep, seeing that and thank you for pointing that out! Just to make sure I'm not missing anything, are there any other statuses besides "active" that can be passed to the URL?

Trudy Claspill
Community Champion
December 10, 2024
ben.wilen December 10, 2024

Ah, missed that thanks for your help!

Trudy Claspill
Community Champion
December 10, 2024

You're welcome!

If your question has been adequately addressed, please consider clicking on the Accept Answer button to mark your Question as Solved. This helps others searching the community find posts with validated solutions.

0 votes
Aaron Pavez _ServiceRocket_
Community Champion
December 10, 2024

Hi @ben.wilen 

Can you check if this works?

/rest/api/3/project?includeArchived=true

The property for that can be found here:

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

Although the project is deprecated, now we need to use this project paginated:

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

Regards

ben.wilen December 10, 2024

Thank you for the quick response @Aaron Pavez _ServiceRocket_ !

"/rest/api/3/project?includeArchived=true" returns the archive field, and "/rest/api/3/project" also returns the archive field.

 

Can you clarify "Although the project is deprecated, now we need to use this project paginated:"...does that mean the recommended method is to use the deprecated endpoint or is there a way to use the "project/search" endpoint and still get the archive field?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events