Commit f2014a79 authored by Kamal Dodiya's avatar Kamal Dodiya
Browse files

OpenAPI Specifcation

parent afa6c464
Pipeline #172922 canceled with stages
in 0 seconds
openapi: 3.0.1
info:
title: Search hub
description: 'API to transform SOLR search results into the shape needed for in-app search in ensembl-client'
contact:
email: ensembl-webteam@ebi.ac.uk
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
version: 1.0.0
servers:
- url: http://2020.ensembl.org/api/
tags:
- name: search
description: Search endpoint for in-app search aka gene-search
externalDocs:
description: Find out more
url: http://2020.ensembl.org
paths:
/search:
get:
tags:
- search
summary: Search gene name for given genome_id
operationId: get_search_result
requestBody:
description: Search Request object with query and genome_id
content:
application/json:
schema:
$ref: '#/components/schemas/SearchRequest'
required: true
responses:
200:
description: Success Response
content:
application/json:
schema:
$ref: '#/components/schemas/SearchResult'
components:
schemas:
SearchRequest:
type: object
properties:
query:
type: string
example: BRCA2
genome_ids:
type: array
items:
type: string
example: homo_sapiens_GCA_000001405_28
page:
type: integer
example: 1
per_page:
type: integer
example: 100
required:
- query
- genome_ids
SearchResult:
type: object
properties:
meta:
type: object
properties:
total_hits:
type: integer
example: 10
page:
type: integer
example: 1
per_page:
type: integer
example: 100
matches:
type: array
items:
$ref: '#/components/schemas/SearchResultItem'
SearchResultItem:
type: object
properties:
type:
type: string
example: Gene
stable_id:
type: string
example: ENSG00000139618.17
unversioned_stable_id:
type: string
example: ENSG00000139618
symbol:
type: string
example: BRCA2
biotype:
type: string
example: protein_coding
name:
type: string
example: BRCA2 DNA repair associated
genome_id:
type: string
example: homo_sapiens_GCA_000001405_28
transcript_count:
type: integer
example: 10
slice:
$ref: '#/components/schemas/Slice'
Slice:
type: object
properties:
location:
$ref: '#/components/schemas/Location'
region:
$ref: '#/components/schemas/Region'
strand:
$ref: '#/components/schemas/Strand'
Location:
type: object
properties:
start:
type: integer
example: 32315086
end:
type: integer
example: 32400268
Region:
type: object
properties:
name:
type: string
example: 13
Strand:
type: object
properties:
code:
type: string
example: forward
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment