---
title: "Exporting Cucumber Tests - REST v2"
canonical: "https://docs.getxray.app/space/XRAYCLOUD/44577687/Exporting%20Cucumber%20Tests%20-%20REST%20v2"
format: markdown
---
# Exporting Cucumber Tests

When exporting Cucumber *feature* files, the [Generate Cucumber Features](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565307) rules are followed. The input for the export REST method is a String containing Jira issue keys separated by **";"**.

These keys must reference issues with the Xray issues types **Test, Test Set, (Sub) Test** **Execution** or** Test Plan **or any issue type mapped as being a coverable issue. 

A mix of these issue types is supported. In the same export call, you can include keys from each of the above issue types. The service will build a set of Test issues based on these keys. This set will include all direct Tests issues and all Test issues associated with either Test Sets, Test Executions or Test Plans and all the tests for the requirements that matched.

The reference to keys in Jira are necessary for importing back the execution results to the respective Test and Test Execution issues.

> Macro (rw-ui-expands-macro)
> 
> > Macro (rw-expand)
> 
> |  |
> | --- |
> | Returns the generated *feature* file(s) for the Tests matched by the input **keys **or/and by the input **filter.**** **<br><span style="color: #003366">**Request**</span>** **<br><span style="color: #003366">**QUERY PARAMETERS**</span><br>> Macro (nested-table)<br>***keys**** and ****filter**** query parameters are optional if the other one provided but they can both be provided at the same time.*<br>> ✅ **Example Request**
> > ✅ 
> > ✅ <span style="color: #003366">curl -H "Content-Type: application/json" -X GET -H "Authorization: Bearer $token"  "</span><span style="color: #003366">https://xray.cloud.getxray.app/api/v2/export/cucumber</span><span style="color: #003366">?keys=DEMO-6;DEMO-7"</span>
> > ✅ 
> > ✅ 
> > ✅ <span style="color: #003366">curl -H "Content-Type: application/json" -X GET -H "Authorization: Bearer $token"  "</span><span style="color: #003366">https://xray.cloud.getxay.app/</span><span style="color: #003366">api/v2/export/cucumber</span><span style="color: #003366">?</span><span style="color: #003366">filter=134</span><span style="color: #003366">"</span>
> > ✅ 
> > ✅ 
> > ✅ <span style="color: #003366">curl -H "Content-Type: application/json" -X GET -H "Authorization: Bearer $token"  "</span><span style="color: #003366">https://xray.cloud.getxray.app/</span><span style="color: #003366">api/v2/export/cucumber</span><span style="color: #003366">?</span><span style="color: #003366">keys=DEMO-6;DEMO-7&filter=134</span><span style="color: #003366">"</span><br><span style="color: #003366">**Responses**</span><span style="color: #000000">** **</span><br>200 OK : **application/****octet-stream** :  Successful. A compressed zip file will be downloaded containing the generated *feature* files.<br>400 BAD_REQUEST : **text/plain**** ****: **No feature files where generated. Please check Jira log.<br>401 UNAUTHORIZED : **text/plain** : The Xray license is not valid.<br>500  INTERNAL SERVER ERROR : **text/plain** : An internal error occurred when generating the *feature* file(s). |