Forums

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

Jira REST API Get Project Name

Joseph Robbins July 19, 2023

Hi, I am trying to use the REST API to get the name of a project, given that we have its key. I am using the Get Project request. As far as I understand, I should be able to make the following request URL in order to get just the name of the project:

https://my-domain.atlassian.net/rest/api/3/project/myKey?properties=name

However, it just returns all of the same properties that I get if I just use that same URL without the query e.g. lead, components, issues etc. rather than just the name. I have also tried using "fields" as a query parameter in place of "properties". How can I get the API to just return a specified field only?

1 answer

1 accepted

1 vote
Answer accepted
Vikrant Yadav
Community Champion
July 19, 2023

Hi @Joseph Robbins  Welcome to Atlassian Community!

Name is in the root of the json content. You can directly parse project name using {{name}}.

You won't get name only via API. In the application where you are using the API, you need to parse http response and get project name. 

Thanks,

V.Y

Joseph Robbins July 20, 2023

Ok that is fine, thanks for the quick response! My confusion came from the description of the "properties" query parameter in the api reference for "Get Project" which reads "A list of project properties to return for the project.". I am not experienced with REST so I just assumed that meant I could choose which properties the http response would contain. Thanks again.

Like Vikrant Yadav likes this
Vikrant Yadav
Community Champion
July 20, 2023

You're Welcome :)
Glad to hear I am able to help you!

Suggest an answer

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

Atlassian Community Events