Access features and scenarios by REST api?

Martin Heinemann April 16, 2013

Hi,

is it possible to access all linked features by the Jira REST API?

3 answers

1 accepted

0 votes
Answer accepted
Martin Heinemann April 16, 2013

Ok, wireshark and some guessing pointed me to the solution.

Get all features of a project:

http://myjira.com/rest/cucumber/1.0/project/RSG/features

Get the scenarios and steps of a feature:

http://myjira.com/rest/cucumber/1.0/project/RSG/feature/1/scenarios

Whats bogus is that the scenarios are not present in the feature json. At least there should be a link to it.

Alan Parkinson [Hindsight Software]
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.
April 16, 2013

The feature JSON would get rather large if the Scenarios were returned in full.

0 votes
Alan Parkinson [Hindsight Software]
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.
April 16, 2013

It's only possible to access all linked Scenarios in the Behave for JIRA REST API. Features are not directly linked JIRA issues

Have used the JIRA REST api browser to view the end points available?

To access scenarios directly you need to know the feature id and scenario id: /project/{KEY}/feature/{FID}/scenario/{SID}

0 votes
Michal Husar
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.
April 16, 2013

Hi Martin,

what do you mean under "all linked features" ?

Martin Heinemann April 16, 2013

Well, i meant all features of a project.

I did some research and found a way to get the features:

http://myjira.com/rest/cucumber/1.0/project/RSG/features

But how do i get the scenarios and the steps?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events