Skip to main content

Module api

Module api 

Source
Expand description

Walking a local deployment of the ICD-API into a cache of entity JSON.

The deployment (docker run -e acceptLicense=true -e include=2026-01_en whoicd/icd-api) needs no authentication and answers the same JSON as https://id.who.int/icd, with the canonical http://id.who.int host in every URI, so the walker rewrites that host to its base URL. A linearization is enumerated from its root’s children, each with ?include=descendant; the Foundation from its two roots the same way. Every entity is then fetched once per language and written as <cache>/<linearization>/<language>/<id>.json, the residual / spelled ~; the root document goes to <cache>/<linearization>/<language>/_root.json.

Structs§

Client
A client for one deployment and release.
Downloaded
What a download did.

Enums§

ApiError
A failure while fetching or caching.

Functions§

entity_file
The cache file of an entity.
root_file
The cache file of a linearization’s root document.