Forums

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

How to get only required fields as response in jira api/2/Project API ?

PK
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!
December 25, 2019

I will be retrieving all Projects using the API "/rest/api/2/project".  I need only id, key & name from the response. Is it possible to get only these 3 values using the above API? If yes, what will be the param values ?

please advise? 

1 answer

0 votes
brbojorque
Community Champion
December 26, 2019

@PK ,

Based on the documentation, you can't but there is no stopping you from parsing the responses to your desired data structure.

The only option in the documentation is to expand, adding more information in the responses.

rest/api/2/project?expand=description,lead,url,projectKeys
PK
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!
January 2, 2020

Yes. right now I am parsing the response. I thought of retrieving only required fields to improve the performance.

Thanks for your response.

Suggest an answer

Log in or Sign up to answer