-
Notifications
You must be signed in to change notification settings - Fork 63
POST Requests
In the event of processing larger numbers of variants, please switch to using the POST message type encoded in JSON format.
Set your accept header to application/json
Set your content-type to application/json
The message body consists of a key (ids or variants) depending on the endpoint followed by a list of values.
Batch your requests by up to one thousand per POST and wait patiently. This is a shared resource, and excessive requests will not increase performance but will impact other users.
VEP options (hgvs, maf_1kg etc.) can be specified as additional keys in the message body as well as URL parameters.
[/vep/:species/region] accepts variants in all the VEP-supported formats, with one line of the original file comprising one element of the list.
Examples of these formats can be found in the Ensembl VEP help page
Example for the [/vep/:species/region] endpoint:
curl -H "content-type:application/json" -H "accept:application/json" \
--data '{ "variants" : ["21 26960070 rs116645811 G A . . .", "21 26965148 rs1135638 G A . . ." ] }' \
http://rest.ensembl.org/vep/human/region
Example for the [/vep/:species/id] endpoint::
curl -H "content-type:application/json" -H "accept:text/javascript" \
--data '{ "ids" : ["rs116035550", "COSM476" ] }' \
http://rest.ensembl.org/vep/human/id
Archive lookups are not as fast as the VEP, please limit your requests to up to 400 IDs per batch for decent performance and respectful usage.
Example:
curl -H "content-type:application/json" -H "accept:application/json" \
--data '{ "id" : ["ENSG00000157764", "ENSG00000248378" ] }' \
http://rest.ensembl.org/archive/id