No project could be found with key '<project key>'.

swapnil kumbhar
Contributor
May 9, 2022

From POST man am trying to get project details by key using the cloud jira APIS jira cloud API docs 

https://<mysite>.atlassian.net/rest/api/3/project/<peoject key>

its returning me 

{
    "errorMessages": [
        "No project could be found with key '<project key>'."
    ],
    "errors": {}
}

for authentication am using   username:<APIToken>  => this user has full access to that project.

by logging in using UI  that project is present  but  using API it return error No project could be found with key What will be the cause?

3 answers

1 accepted

4 votes
Answer accepted
swapnil kumbhar
Contributor
May 12, 2022

I got this answer myself.

i auth header i was adding  <username>:<API Token> which was wrong

it should use  basic auth and  in place of password user API token then it has worked

 

But i still dont know why JIRA Rest APIs  not returning proper error message?  as this issue is related to authentication and its returning me project did not found. 

1 vote
Ulrich Kuhnhardt _IzymesCo_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
May 9, 2022

Hi,

my guess is that you copied the url from the API spec or somewhere else and did not change the <project_key> placeholder with the actual project key. Say you have a project with key 'SWAP' you would use the following url

https://<mysite>.atlassian.net/rest/api/3/project/SWAP

Good luck,

Best Ulrich,

Izymes

// We eliminate boring from work!

0 votes
Mohamed Benziane
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 9, 2022

Hi,

Did you respect the case ? The API is case sensitive (at least in Jira server)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events