Skip to content

ENSWBSITED-2822 (Partial Search)

Kamal Dodiya requested to merge ENSWBSITES-2822 into master

This PR implements Partial Search

JIRA

ENSWBSITES-2822

Examples

symbol

symbol:BRCA2
curl  -H 'Content-Type: application/json' \
      -d '{"genome_ids": ["a7335667-93e7-11ec-a39d-005056b38ce3"], "query": "BRCA2", "page":1, "per_page":10}' \
      https://dev-2020.ensembl.org/api/search/genes | jq '.["meta"]'

{
  "total_hits": 1,
  "page": 1,
  "per_page": 10
}
symbol : BRCA
curl  -H 'Content-Type: application/json' \ 
      -d '{"genome_ids": ["a7335667-93e7-11ec-a39d-005056b38ce3"], "query": "BRCA2", "page":1, "per_page":10}' \
      https://dev-2020.ensembl.org/api/search/genes | jq '.["meta"]'

{
  "total_hits": 7,
  "page": 1,
  "per_page": 10
}

Stable ID

Versioned stable_id : ENSG00000234377.8
$ curl  -H 'Content-Type: application/json' \
        -d '{"genome_ids": ["a7335667-93e7-11ec-a39d-005056b38ce3"], "query": "ENSG00000234377.8", "page":1, "per_page":10}' \
        https://dev-2020.ensembl.org/api/search/genes | jq '.["meta"]'
{
  "total_hits": 1,
  "page": 1,
  "per_page": 10
}
Unversioned stable_id : ENSG00000234377
$ curl  -H 'Content-Type: application/json' \
        -d '{"genome_ids": ["a7335667-93e7-11ec-a39d-005056b38ce3"], "query": "ENSG00000234377", "page":1, "per_page":10}' \
         https://dev-2020.ensembl.org/api/search/genes | jq '.["meta"]' 
{
  "total_hits": 1,
  "page": 1,
  "per_page": 10
}
random stable_id : ENSG0000023437
$ curl  -H 'Content-Type: application/json' \
        -d '{"genome_ids": ["a7335667-93e7-11ec-a39d-005056b38ce3"], "query": "ENSG0000023437", "page":1, "per_page":10}' \ 
        https://dev-2020.ensembl.org/api/search/genes | jq '.["meta"]' 
{
  "total_hits": 0,
  "page": 1,
  "per_page": 10
}
Edited by Kamal Dodiya

Merge request reports