Forums

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

JIRA REST API How to get Projectkey over the username/Projectname

WITTE April 2, 2019

Hello together,

i would like to automate some processes with the JIRA REST API and now i need to find out some projectkeys.

Is it possible to get all Projectkeys from the projects a user is in over the Username or the Projecktname?

Or is there a Quick solution to list all Projectkeys/ids where the user is Projectlead of?

 

I've found a method to find the projectkey by projectname :
https://<jira>/rest/api/latest/search?jql=project="<projectname>"

But this request would be to unperformant - too much results...

1 answer

0 votes
Warren
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 2, 2019

Hi @WITTE 

I'm not sure I fully understand what you're trying to do, but this would seem to give you what you're after. 

/rest/api/3/project/search will return details of all projects that the user has Browse permissions for

WITTE April 2, 2019

we're not using the cloud version, so unfortunately i can't check this option.... (api version). But thanks for answer.

Warren
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 2, 2019

Okay, so can't you then use /rest/api/2/project from here which seems to be the server equivalent?

WITTE April 2, 2019

I think this wouldn't help me by my issue, because i would like to list up all projects of one specific user and not all projects of my jira instance.

Background :

I would like to check if the user is projectlead in one of his projects and write it out.

Suggest an answer

Log in or Sign up to answer