Skip to content

Using EpiGraphDB API

The EpiGraphDB API is a RESTful web API service that offers a standardardised way for users to query with the EpiGraphDB graph database.

Here we offer a brief discussion on the major functionalities of the API, and the common methods for users to get data from the API service.

OpenAPI / Swagger interface

The Swagger interface of the API service looks like this:

As an example, by clicking on the /mr endpoint will display a detail view regarding the endpoint specification in required and optional query parameters:

You will be able to see the expected schema / data model of the returned query as specified in the endpoint:

The Swagger web interface also offers the functionality for users to try out example queries, and the recommended curl query snippet:

Web application

You will be able to see the underlying API call from the web application to also assist you in creating your own queries to the EpiGraphDB database.

Below is an example from the "Mendelian randomization" view:

Example usage

You can use any of the commonly used tools to query the API service, for example:

Finally, for R users we offer an official package to provide easy access to EpiGraphDB:

MRCIEU/epigraphdb-r - GitHub