Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

JIRA/Xray - Not able to import cucumber tests using curl due to error "The file is required!"


We are trying to import cucumber tests that we already have developed into the Xray project that exists in our JIRA cloud.

We are following the information present on Importing Cucumber Tests - REST 

The authentication is done using the client_id/client_secret with the following command:

curl -H "Content-Type: application/json" -X POST --data '{"client_id": "<client_id>","client_secret": "<client_secret>"}'

which returns the authentication token.

Then we try to import an existing and simple feature file by using the rest api:

feature file.png

curl -H "Content-Type: multipart/form-data" -X POST -H "Authorization: Bearer <token>" -F "file=@<absolute path>/xray.feature"<our xray project key> -v


The response is "The file is required".
We have tried multiple ways but the response is always the same and there's no clue regarding what's wrong.

Any help regarding this would be very appreciated.


Curl version:
curl 7.64.1 (x86_64-apple-darwin19.0) libcurl/7.64.1 (SecureTransport) LibreSSL/2.8.3 zlib/1.2.11 nghttp2/1.39.2

2 answers

Hi @Nuno Oliveira 

Please run the command from the folder where the feature file is located and without the path in the command line. I suspect that it could be something related to the file path.

Hi @Zakaria Boutami 

Please try to place the file argument between quotes, like this:

... -F "" ...

If none of these works, it is best to contact Xray Support ( to share your configuration so that the support team can investigate further.

Thank you.

Kind regards,
Rogerio Paiva [Xray Support Team]

Hi @Nuno Oliveira ,

that's weird. I'm unable to replicate it.

Were you able to overcome this?



Hi Sergio,

I'm experiencing the same problem:

curl -H "Content-Type: multipart/form-data" -F -H "Authorization: Bearer <REMOVED>"\?projectKey\=<REMOVED>\&source\=<REMOVED> -v
* Trying
* Connected to ( port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
* CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: CN=*
* start date: Dec 17 00:00:00 2020 GMT
* expire date: Jan 17 23:59:59 2022 GMT
* subjectAltName: host "" matched cert's "*"
* issuer: C=GB; ST=Greater Manchester; L=Salford; O=Sectigo Limited; CN=Sectigo RSA Domain Validation Secure Server CA
* SSL certificate verify ok.
> POST /api/v1/import/feature?projectKey=<REMOVED>&source=<REMOVED> HTTP/1.1
> Host:
> User-Agent: curl/7.77.0
> Accept: */*
> Authorization: Bearer <REMOVED>
> Content-Length: 15306
> Content-Type:  multipart/form-data; boundary=------------------------fe356ce82ce1f9af
* We are completely uploaded and fine
* Mark bundle as not supporting multiuse
< HTTP/1.1 400 Bad Request
< Cache-Control: no-store, no-cache, must-revalidate, proxy-revalidate
< Content-Type: application/json; charset=utf-8
< Date: Tue, 04 Jan 2022 16:25:15 GMT
< ETag: W/"21-9pZPaqO5pJmSaTVV6u0NXjAN8rg"
< Expires: 0
< Pragma: no-cache
< Retry-After: 60
< Surrogate-Control: no-store
< X-Powered-By: Express
< X-RateLimit-Limit: 60
< X-RateLimit-Remaining: 59
< X-RateLimit-Reset: Tue Jan 04 2022 16:26:15 GMT+0000 (Coordinated Universal Time)
< Content-Length: 33
< Connection: keep-alive
* Connection #0 to host left intact
{"error":"The file is required!"}%

Suggest an answer

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

Marketplace Partner Spotlight: AppLiger

This month the spotlight is on AppLiger. We caught up with Pavel Pavlovsky, CEO and Product Manager, to learn how the company started and what fuels the team's creativity.    Atlassian:...

397 views 0 7
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