ENA browser fasta endpoint returns 500, even on their own example
1
0
Entering edit mode
5 months ago
Kevin • 0

Hey everyone, just wanted to try and confirm that this is not a user error on my side. It seems like ENA browser API changed their accepted input format for the /fasta POST endpoint from form encoded to JSON since i last used it. However, i only get 500 internal server error responses from that endpoint, even when just using their example in the OpenAPI docs.

https://www.ebi.ac.uk/ena/browser/api/swagger-ui/index.html#/content-controller/getFastaPost

Edit: Note that this is also true for supplying an accession array with a valid accession such as

{
  "accessions": [
    "BN000065"
  ]
}

screenshot of endpoint documentation

screenshot of error

ENA fasta • 453 views
ADD COMMENT
0
Entering edit mode
5 months ago
Michael 55k

This is autogenerated code, you need to replace the "string" in accessions: ["string"] with some real accession. Swagger doesn't extract parameters for HTTP POST messages because POST messages contain all the information in the message. If you want to see what needs to be specified, look at the same function with method GET below.

ADD COMMENT
0
Entering edit mode

I know what you are saying, but a 500 is not what you expect as a response to input that is incorrectly supplied by the user. In fact, it even returns a 500 if you just supply a accession array with a valid accession.

ADD REPLY
0
Entering edit mode

Hmm, true. I checked with your accession both on their dev and prod systems with the same result. You can use their contact form to report the problem. In the meantime, you may consider the GET method instead. That works. Possibly, the POST methods are not working properly for this end-point.

ADD REPLY

Login before adding your answer.

Traffic: 2554 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6