xRay - Create test execution ticket via API (v.1 & v.2) failed

Aroesti, Mor January 14, 2021

Hello,

I'm trying to create (via API) a test execution ticket and update one test status (pass for now).

Using postman:

Post request

URI: https://{MY JIRA DNS SERVER}/api/v1/import/execution

Authorization: Basic Auth (user, password)

Body(JSON):

{
"info": {
"summary": "Execution of automated tests for MorROST",
"description": "This execution is automatically created by Nimoy",
"version": "v1.3",
"user": "{MY USER}",
"revision": "1.0.42134",
"startDate": "2014-08-30T11:47:35+01:00",
"finishDate": "2014-08-30T11:53:00+01:00",
"testPlanKey": "{JIRA TP KEY}",
"testEnvironments": [
"Beta"
]
},
"tests": [
{
"testKey": "{JIRA TEST KEY}",
"start": "2021-01-11T11:47:35+01:00",
"finish": "2021-01-12T11:50:56+01:00",
"comment": "Successful execution",
"status": "PASS"
}
]
}

 

I'm getting as a result:

<status-code>404</status-code>    <message>null for uri: https://jira.cloud.fpdev.io/rest/raven/2.0/api/import/execution</message>

 

Could someone know why??? :/ can't figure it.

Please help me :(

Thank you

2 answers

0 votes
Rogério Paiva - Xray Xporter
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.
March 28, 2021

Hi @Aroesti, Mor @[deleted] 

Each format has a specific REST API and so it is necessary to use the right format with the right request, it is also necessary to use the specific authentication method. Server and Cloud use different authentication methods.

The documentation links are here:

Xray server: https://docs.getxray.app/display/XRAY/REST+API

Xray cloud: https://docs.getxray.app/display/XRAYCLOUD/API

If you need further help, please contact the Xray Support (http://xraysupport.xpand-it.com) so that we guide you through the process of setting up the API requests.

Kind regards,
Rogério Paiva [Xray Support Team]

0 votes
Gonchik Tsymzhitov
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 23, 2021

Hi @Aroesti, Mor !  

As i see your installation is server. 

Please, use the next https://docs.getxray.app/display/XRAY/v2.0#/Import/post-import-execution doc

it means the next rest end point


/rest/raven/2.0/api/import/execution

Cheers,

Gonchik

Deleted user March 23, 2021

Hi

I have the same issue but we use JIRA cloud

How do I import test execution results to a JIRA test plan using the API? Anything related to raven does not work for us, only native JIRA API seems to work.

Thanks

Suggest an answer

Log in or Sign up to answer