Skip to main content

This guide will explain what an API is and how you can use the service to query the knowledge graph database linked with the Health Information Portal website.

What kind of information can be harvested?

The Health Information Portal API provides comprehensive, open access to an extensive array of catalogues and data source information showcased on the Health Information Portal Website. It furnishes a plethora of detailed metadata in a machine-readable format, adhering to the DCAT-AP metadata standard, which includes essential metadata elements such as dataset titles, comprehensive descriptions, languages, geographic locations, landing pages, publishers, and beyond.

This meticulously structured approach guarantees effortless integration and streamlined processing by automated frameworks, thus enhancing the depth of understanding and the contextual relevance of each dataset. Such structured metadata facilitates not only a deeper comprehension of the datasets' core attributes but also amplifies their accessibility and usability, ensuring that researchers, healthcare professionals, and policy makers can leverage this information effectively to advance public health initiatives and outcomes.

What is an API?

An API, short for Application Programming Interface, acts as a digital intermediary that allows different computer programs to communicate and share data. It defines the rules and commands for software applications to request and exchange information. APIs enable apps to interact with services, creating seamless and integrated experiences. In essence, APIs make our digital world more interconnected, allowing devices and software to work together and share data, enhancing their functionality.

How does it work?

The Health Information Portal Website is regularly harvested by a Fair Data Point instance to store all its content into a knowledge graph database (TripleStore) using RDF technology and international DCAT-AP metadata standard. This aligns the Health Information Portal with semantic technologies, making its content Findable, Accessible, Interoperable, and Reusable (FAIR) by machines.

The Fair Data Point API is an HATEOAS (Hypertext as the Engine of Application State) RESTful API. HATEOAS is a fundamental principle in RESTful API design that encourages the use of hypermedia to drive the application's state. In a HATEOAS-enabled REST API, clients interact with resources and navigate the API by following links provided by the server.

How to retrieve information using the API?

The command below describes how to query the Fair Data Point server through its API to retrieve the content of a metadata record related to the Health Information Portal website.

Although retrieving metadata is open for GET requests without authorization, metadata records can't be updated or created without authorization.

The Swagger interface of the Fair Data Point server for the Health Information Portal is available: https://fair.healthinformationportal.eu/swagger-ui/index.html#/

 

Base URL: https://fair.healthinformationportal.eu/
Example of UUID: https://fair.healthinformationportal.eu/dataset/a8832b77-2075-400a-93b2-35d974261f80
HTTP method: GET

The supported serialization of the RDF document:

  • Turtle: text/turtle
  • N3: text/n3
  • RDF/XML: application/rdf+xml
  • JSON-LD: application/ld+json

In the following example, we retrieve a Dataset resource by issuing a GET request to the /dataset prefix followed by its identifier (a UUID).

Curl command

curl -H "Accept: text/turtle" https://fair.healthinformationportal.eu/dataset/a8832b77-2075-400a-93b2-35d974261f80

Python command:

import requests
uri = https://fair.healthinformationportal.eu/dataset/a8832b77-2075-400a-93b2-35d974261f80
headers = {'Accept': 'text/turtle'}
res = requests.get(url=uri, headers=headers) print(res.text)

These commands will harvest the RDF metadata record corresponding to the UUID and output it following a turtle serialization.

Useful links

Contact: healthinformationportal@sciensano.be