[ensembl-dev] Ensembl REST API | GET xrefs/name/:species/:name

Tiago Grego tgrego at ebi.ac.uk
Tue Oct 22 15:06:48 BST 2019


Hello Ramiro,

indeed that endpoint does not check availability of genes, only of 
xrefs. That means an empty array (no xrefs) for a nonexistent gene.

Availability of genes can however be queried through the 
lookup/symbol/:species/:symbol endpoint.




On 21/10/2019 10:02, Ramiro Magno wrote:
> Hi Devs,
> 
> Still regarding this endpoint: 
> https://rest.ensembl.org/documentation/info/xref_name
> 
> Should not the responses return errors on not available genes?
> 
> Example: Let's query for the human gene "EMBL":
> 
> curl 
> 'https://rest.ensembl.org/xrefs/name/human/EMBL?content-type=application/json' 
> -i -H 'Accept: application/json'
> 
>    HTTP/1.1 200 OK
>    Vary: Content-Type
>    Content-Type: application/json
>    Content-Length: 2
>    X-Runtime: 0.015372
>    X-RateLimit-Limit: 55000
>    X-RateLimit-Reset: 123
>    X-RateLimit-Period: 3600
>    X-RateLimit-Remaining: 54999
>    Vary: Origin
>    Date: Mon, 21 Oct 2019 08:57:57 GMT
>    
>    []⏎
> 
> Cheers!
> 
> _______________________________________________
> Dev mailing list    Dev at ensembl.org
> Posting guidelines and subscribe/unsubscribe info: https://lists.ensembl.org/mailman/listinfo/dev_ensembl.org
> Ensembl Blog: http://www.ensembl.info/
> 




More information about the Dev mailing list