XRay API seemingly giving always 404 Null URI

Diego Castillo Giraldo
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 31, 2023

Hi everyone.

I'm trying to reach out to the XRay API to mark some test executions as PASSED, however I'm always getting a 404 Null URI error for all possible endpoints, trying those that start of with /rest/raven/1.0/api/, for example /rest/raven/1.0/api/testrun/{id}/. I'm trying all possible endpoints from the documentation and none of them is working.

By the way, I have an active API key, and I am able to make requests for the JIRA Agile Endpoints without issue. Is there anything I might be missing? I think the issue is not related to authentication because that is usually clear by the API response, maybe I need more permissions for it?

Thank you.

2 answers

1 vote
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 31, 2023

Hi @Diego Castillo Giraldo and welcome to the community,

Requests made to Xray's REST API must be authenticated based on an API Key created for some user in the Xray Global Settings: API Keys.

See the detailed description here:
https://docs.getxray.app/plugins/servlet/mobile?contentId=68411320#content/view/68411320

According to this there is a similar post I answered some time ago:
https://community.atlassian.com/t5/Jira-questions/Getting-null-for-uri-404-Not-Found-when-importing-JSON-result/qaq-p/1975014

Furthermore: Could you copy the whole call you are trying to call?

Best
Stefan

Stefan Salzl
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 3, 2023

@Diego Castillo Giraldo 

any updates ?

Best
Stefan

Stefan Salzl
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 7, 2023

Hi @Marco Pietropolli 

In case this answer was helpful for you please consider to hit the "Accept" button so that the post is marked as resolved. This will make it easier for other users to find propper solutions to the same problem.

Best
Stefan

0 votes
Marco Pietropolli March 3, 2023

Hi, me too I've the same issue!

I've tried all combinations of urls (on docs there are 2-3 different urls, one deprecated!) bubt it's impossible to import a junit execution on xray; we've cloud jmira with XRAY plugin installed on, then I'm using our jira server

https://xxx.atlassian.net/rest/raven/1.0/import/execution/junit?projectKey=xxx

If I put right token, wrong token, wrong url after raven/... I have the same result: 404 null for uri

Stefan Salzl
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 3, 2023

Hi @Marco Pietropolli and welcome to the community,

did you do all the things I described in my former answer?

did you create the bearer token with the ClientID and Client-secret?

furthermore for importing results it´s not the jira api to call (as described in your post) but the xray api. Please see the examples in the docu:

https://docs.getxray.app/display/XRAYCLOUD/Import+Execution+Results+-+REST

eg:
curl -H "Content-Type: text/xml" -X POST -H "Authorization: Bearer $token"  --data @"data.xml" https://xray.cloud.getxray.app/api/v1/import/execution/junit?projectKey=XTP

Best
Stefan

Marco Pietropolli March 3, 2023

OMG, Now it's working but please make an unique documentation with all steps.. it's not clear. Thanks,

M.

Stefan Salzl
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 3, 2023

@Diego Castillo Giraldo 

what exactly did you do/change? what exactly is not clear?

it´s all documented by XRAY ;) I got everything working just by reading the vendor´s documentation. Therefore I can guarantee that it contains everything that´s needed.

Best
Stefan

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events