Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

404 error response when making a web request to '/rest/api/3/project/{projectIdOrKey}'

We are currently using the Basic Authorization in the request.

 

When making a web request to the Jira Standard API endpoint "rest/api/3/project/{projectKeyOrId}", the request intermittently returns a 404 error response after some requests.

 

{projectKeyOrId} is passed through the smart variables.

We are using Jira Standard version, and it's not clear why the 404 error response is occurring.

Could you please share what could be causing the issue ?

1 answer

0 votes
Kai Becker
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 30, 2023

Hi @Munish Thakur 

welcome to the community.

Could you please give some more information? What is the exact call?

Do you use a certain app to send the request? 

Hello Kai, thank you so much for responding.

 

I am using the component Send web request as part of my Jira automation and getting the {{ProjectKey}} from "Create variable".

https://<domain>/rest/api/3/project/{{ProjectKey}}.

Using Basic Authorization to send the request.

But the Jira automation fails after one call with the following error:- 

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

Send Web Request call.png

Please find the attached screenshot for reference

Like Kai Becker likes this
Kai Becker
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 30, 2023

Hi @Munish Thakur 

could you please make sure, that {{ProjectKey}} has a value. You could use log action to push the value of the variable to the audit log.

And could you make sure, that you have provided valid credentials with your request.
If you are not identified correctly, that the api will not list any projects and you will get the "No project could be found with key 'XXXX'." error.

Thanks for the quick response. ProjectKey has a value as the rule once run with the correct values but fails the second time. I have used the valid credentials to send the request but i will use the log action to check the value of the variable in the audit log. Thanks 

Kai Becker
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 30, 2023

In addition, check the attached screenshot for a reference regarding authorization:

Screenshot 2023-03-17 at 22.39.49-1.png

Like Munish Thakur likes this

I have removed the Accept header from the request and magically it is working now. I will try to test few more cases and see how it goes. 

Thank you so much Kai

failed send web request.png

Got the correct projectKey in the audit logs.

Disabled and enabled the rule with no changes in the automation rule and it failed again with 404 error message.

Kai Becker
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 31, 2023

@Munish Thakur could you try to make a call via another tool or terminal command  like curl.

It is a little hard to debug, but I guess there is still something wrong with the authorization.

It works perfectly fine with Postman and even with terminal with the same authorization.

Kai Becker
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 31, 2023

Do you have access to the specific project? Or might there be something missing?

Yes i do because if the access was missing then the automation should fail the first time. I know this is kind of weird.

@Munish Thakur Did you ever figure this one out? I'm having the same problem. 200 in postman, 404 with the automation tools.

Hello @ryandell , i explored a lot about the issue but couldn't find the solution as yet.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events