Hi-Knowledge API Site

Processes and serves data for all Hi-Knowledge sites (apart from KB which acts as a source).

Mediawiki Instances

Any MediaWiki site can be queried by posting to the route /mw/[[instance identifier = KB]]/fetch

The instance identifier part of the route is optional & will default to “KB” if omitted. Environment variables are used to set the instance url parameters:

MW_KB_PROTOCOL = "https"
MW_KB_HOST = "mediawiki.example.com"
MW_KB_FRONTEND_PATH = "wiki"
MW_KB_RESTAPI_PATH = "w/rest.php/v1"
MW_WIKIPEDIA_PROTOCOL = "https"
MW_WIKIPEDIA_HOST = "en.wikipedia.org"
MW_WIKIPEDIA_FRONTEND_PATH = "wiki"
MW_WIKIPEDIA_RESTAPI_PATH = "w/rest.php/v1"

In this case, /mw/kb/fetch or /mw/fetch would fetch from the MediaWiki REST API at the mediawiki.example.com instance where as /mw/wikipedia/fetch would fetch through the English language Wikipedia Mediawiki Instance.