Skip to content

Concept Library API

Ieuan Scanlon edited this page Oct 11, 2023 · 1 revision

2. Concept Library API

The concept library API allows programmatic interaction with phenotypes so that they can be directly used in queries, statistical scripts, etc.

Relevant pages:

2.1. Endpoints

Templates

Endpoint Description
/api/v1/templates/ Returns all templates
/api/v1/templates/{template_id}/get-versions Get the version history of a template
/api/v1/templates/{template_id}/detail Get the details of a template
/api/v1/templates/{template_id}/version/{version_id}/detail Get the details of a specific version of a template

Phenotypes

Endpoint Description
/api/v1/phenotypes/ Returns all phenotypes accessible by the user, provide query params to search/filter
/api/v1/phenotypes/{phenotype_id}/get-versions Get the version history of a phenotype
/api/v1/phenotypes/{phenotype_id}/detail Get the details of a phenotype
/api/v1/phenotypes/{phenotype_id}/version/{version_id}/detail Get the details of a specific version of a phenotype
/api/v1/phenotypes/{phenotype_id}/export/{field} Returns a specific field from a phenotype, e.g. /export/codes
/api/v1/phenotypes/{phenotype_id}/version/{version_id}/export/{field} Returns a specific field from a specific version of a phenotype, e.g. /export/codes

Concepts

Endpoint Description
/api/v1/concepts/ Returns all concepts accessible by the user, provide query params to search/filter
/api/v1/concepts/{concept_id}/get-versions Get the version history of a concept
/api/v1/concepts/{concept_id}/detail Get the details of a concept
/api/v1/concepts/{concept_id}/version/{version_id}/detail Get the details of a specific version of a concept
/api/v1/concepts/{concept_id}/export/{field} Returns a specific field from a concept, e.g. /export/codes
/api/v1/concepts/{concept_id}/version/{version_id}/export/{field} Returns a specific field from a specific version of a concept, e.g. /export/codes

Collections

Endpoint Description
/api/v1/collections Returns all collections
/api/v1/collections/{collection_id}/detail Get the details of a collection

Tags

Endpoint Description
/api/v1/tags Returns all tags
/api/v1/tags/{tag_id}/detail Get the details of a tag

Datasources

Endpoint Description
/api/v1/data-sources Returns all datasources
/api/v1/data-sources/{datasource_id}/detail Get the details of a datasource