changes.mady.by.user Sergio Vieira
Saved on Nov 09, 2020
Saved on Sep 17, 2021
...
Request
QUERY PARAMETERS
parameter
type
description
key of the project where the tests and pre-conditions are going to be created.
multipart/form-data:
"file" : a MultipartFormParam containing a ".feature" file or a ZIP file to import.
"testInfo" : a MultipartFormParam containing a JSON file with extra Test information. (optional)
"precondInfo" : a MultipartFormParam containing a JSON file with extra Precondition information. (optional)
curl -H "Content-Type: multipart/form-data" -X POST -H "Authorization: Bearer $token" -F "file=@1.feature" https://xray.cloud.xpand-itgetxray.comapp/api/v2/import/feature?projectKey=DEMO
curl -H "Content-Type: multipart/form-data" -X POST -H "Authorization: Bearer $token" -F "file=@features.zip" https://xray.cloud.xpand-itgetxray.comapp/api/v2/import/feature?projectId=1000
curl -H "Content-Type: multipart/form-data" -X POST -H "Authorization: Bearer $token" -F "file=@features.zip" https://xray.cloud.xpand-itgetxray.comapp/api/v2/import/feature?projectId=1000&source= project_lambda
curl -H "Content-Type: multipart/form-data" -X POST -H "Authorization: Bearer $token" -F "file=@1.feature" -F "testInfo=testInfo.json" -F "precondInfo=precondInfo.json" https://xray.cloud.xpand-itgetxray.comapp/api/v2/import/feature?projectKey=DEMO
Responses
200 OK : application/octet-stream : Successful. The cucumber features where successfully imported to Jira.
{ "errors": [ "Error in file calculator.feature: Precondition with key DEMO-54321 was not found!" ], "updatedOrCreatedTests": [ { "id": "32495", "key": "DEMO-15119", "self": "https://devxray3.atlassian.net/rest/api/2/issue/32495" }, { "id": "32493", "key": "DEMO-15117", "self": "https://devxray3.atlassian.net/rest/api/2/issue/32493" } ], "updatedOrCreatedPreconditions": [ { "id": "12345", "key": "DEMO-12345", "self": "https://devxray3.atlassian.net/rest/api/2/issue/12345" } ] }
400 BAD_REQUEST : text/plain: Returns the error.
401 UNAUTHORIZED : text/plain : The Xray license is not valid.
500 INTERNAL SERVER ERROR : text/plain : An internal error occurred when generating the feature file(s).