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

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

Munish Thakur March 30, 2023

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.
March 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? 

Munish Thakur March 30, 2023

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":{}}

Munish Thakur March 30, 2023

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.
March 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.

Munish Thakur March 30, 2023

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.
March 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
Munish Thakur March 30, 2023

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

Munish Thakur March 30, 2023

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.
March 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.

Munish Thakur March 31, 2023

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.
March 31, 2023

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

Munish Thakur March 31, 2023

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

ryandell August 31, 2023

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

Munish Thakur September 1, 2023

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