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

Next challenges

Recent achievements

Recognition

  • Give kudos
  • My kudos

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to create multiple issues (xray test) via REST API? Edited

 Hi, 

I want to create multiple issues, this issues are of type xray tests, but i need that they have got steps. 

I've got a jira cloud and documentation of rest api is very poor. I am using next documentation 

https://developer.atlassian.com/cloud/jira/platform/rest/v3/?_ga=2.142845757.902578191.1549535283-1503801545.1549357477#api-api-3-issue-post

my-domain/rest/api/3/issue/bulk

 

My Json is : 

{
"issueUpdates":[

{
"testtype": "Manual",
"fields":
{
"project":
{
"key": "MXTA"
},
"summary": "Testcase 1",
"issuetype":
{
"id": "10940"
}
},
"update":{
"issuelinks":[]
},
"steps": [
{
"action": "I choose the operation of the calculator Subtraction",
"data": "",
"result": "The operation must appear selected."
}
]
}
]
}

 

This Json work but the test in xray hasn't got steps.

 

I also try this json:

[ 

{
"testtype": "Manual",
"fields":
{
"project":
{
"key": "MXTA"
},
"summary": "Testcase 1",
"issuetype":
{
"id": "10940"
}
},
"update":{
"issuelinks":[]
},
"steps":
[
{
"action": "I choose the operation of the calculator Subtraction",
"data": "",
"result": "The operation must appear selected."
}
]
}
]

But i obtain next response:

{
"errorMessages": [
"Can not deserialize instance of com.atlassian.jira.rest.v2.issue.IssuesUpdateBean out of START_ARRAY token\n at [Source: org.apache.catalina.connector.CoyoteInputStream@1cac7894; line: 1, column: 1]"
]
}

 

I don't know how to resolve this problem.

 

Thanks. David

1 answer

2 votes
Andy Heinzer Atlassian Team Feb 07, 2019

The Jira Cloud REST document doesn't have examples of this because the xray test are functionality provided by a 3rd party plugin (xray).   Instead I would recommend referring to xpand-it's own REST documentation on how to do this, check out https://confluence.xpand-it.com/display/public/XRAY/REST+API

It lists a series of different REST guides depending on what aspects of test management you are looking to do here.

Thanks for answering.

I have read that documentation, but it is for jira server, I have got a jira cloud.

I think that /rest/api/3/issue/bulk is the endpoint that I must use but y have got problem with Json form to include steps in test.

I've been working on it for 3 days and I'm running out of ideas.

Thanks.

David

I'm having an alike issue right now, because i have been looking through all the documentation (Xray Cloud, Xray Server and Jira Native) and there's no information about getting the information within a Testplan (Such as Tests, Executions, etc..)

As far as i know, the way of creating multiple issues is with that endpoint you posted previously ({yourAtlassianUrl}/rest/api/3/issue/bulk)

If i get any information 'bout it, i would send it to you.

I wish you good luck finding your solution.

 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

5 mobile apps for Jira Cloud to boost productivity

  It’s very important to have access to the workflow process from anywhere. Especially if you manage the work of others. There is no difference whether you’re out of office, or drive a ca...

273 views 2 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you