Skip to content

Instantly share code, notes, and snippets.

@knmkr
Last active September 21, 2017 01:18
Show Gist options
  • Save knmkr/6d1614367611aaa88ff342f0a468951e to your computer and use it in GitHub Desktop.
Save knmkr/6d1614367611aaa88ff342f0a468951e to your computer and use it in GitHub Desktop.
G-Supernova Hackathon 201706 | API Doc | reports

/reports

Endpoints

GET /v1-dev/reports/<phenotype_name>?population=<population>

param types key required description
path param phenotype_name TRUE
query param population TRUE currently only european is a valid value. other population is not available now.

Response

Property

params type description
genome.id <integer> id of the genome
phenotype.category <string> category of the phenotype
phenotype.name <string> url-safe name of the phenotype (used in URI)
phenotype.display_name <string> display name of the phenotype
scores.<index>.score <integer> min: 0, max: 4` score of each phenotype interpretation
scores.<index>.text <string> description of each phenotype interpretation
summary.score <integer> min: 0, max: 4 summary score of interpreted phenotype of the genome
summary.text <string> summary description of interpreted phenotype of the genome

Eg.

GET /v1-dev/reports/eye-color?population=european
HTTP 200 OK
Allow: OPTIONS, GET
Content-Type: application/json
Vary: Accept

{
    "genome": {
        "id": 0
    },
    "phenotype": {
        "category": "trait",
        "display_name": "Eye color",
        "name": "eye-color"
    },
    "scores": [
        {
            "score": 0,
            "text": "tend to get blue eyes"
        },
        {
            "score": 1,
            "text": "tend to get blue eyes, slightly"
        },
        {
            "score": 2,
            "text": "normal"
        },
        {
            "score": 3,
            "text": "tend to get blown eyes, slightly"
        },
        {
            "score": 4,
            "text": "tend to get blown eyes"
        }
    ],
    "summary": {
        "score": 2,
        "text": "normal"
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment