Skip to the content.
Countries API
People API
Japanese dictionary API
Tokyo's zip-codes API

Example - Countries API

This is the most basic example of how to use RODB.

It takes a single CSV file as an input, and provides an HTTP service with one endpoint which returns a list of countries.

You can download and run this example locally (using Docker) with the following script.

wget "https://github.com/rodb-io/rodb/releases/download/0.0.0/countries.zip" -O countries.zip && unzip countries.zip && rm countries.zip && cd countries && docker-compose up

The source code for this example is also available here.

The API provides a single endpoint with basic filtering:

Here is a sample response body of this endpoint:

[
	{
		"continentCode": "EU",
		"continentName": "Europe",
		"countryCode": "AL",
		"countryName": "Albania, Republic of"
	},
	{
		"continentCode": "EU",
		"continentName": "Europe",
		"countryCode": "AD",
		"countryName": "Andorra, Principality of"
	},
	...
]

Since this example does not set-up any indexes, all of the parameters must be an exact match. It also means that RODB iterates all the records to find the requested ones, which is not recommended with a large data-set.