Version: current

Consume an API


To use an API that is provided via NLX, you need to route traffic through an outway onto the network. We will use the certificate which we've setup in part 2, to make sure traffic is encrypted between your and other nodes.

Setting up the outway

Let's setup the outway service. First, fetch the Docker image from the Docker Hub.

docker pull nlxio/outway:latest

Before you start your outway you will need to make sure the outway can read the private key you created in the previous step. If you are running on Linux or Mac OS you might need to give org.key group read permisson by running:

chmod g+r org.key

If you are running on Windows, Docker Desktop will ask you read premissions for the directory where you stored the certificate and private key (~/nlx-setup), please select yes.

The following command will run the outway using the Docker image we just fetched.

docker run --rm \
--name my-nlx-outway \
--volume ~/nlx-setup/root.crt:/certs/root.crt:ro \
--volume ~/nlx-setup/org.crt:/certs/org.crt:ro \
--volume ~/nlx-setup/org.key:/certs/org.key:ro \
--env \
--env TLS_NLX_ROOT_CERT=/certs/root.crt \
--env TLS_ORG_CERT=/certs/org.crt \
--env TLS_ORG_KEY=/certs/org.key \
--publish 80:8080 \

You will get back the container id of the container you created from this image. By running this command, we've launched our very own NLX outway. It is running on http://localhost.


To verify the container is running, execute:

docker ps

You should see your container id in the list of containers. The image name of the container should be nlxio/outway:latest.

If the service is not present, it might have stopped for unknown reasons. You can see all your containers including stopped ones using

docker ps -a

To inspect the logs of a (stopped) container, use the following command

docker logs -f <container-id>

Querying API's

Now let's try to fetch some data from an API in the NLX network! To do so, we have to use the following structure:

curl http://localhost/{organization-name}/{service-name}/{api-specific-path}

For example, to query the BRP demo API use:

curl http://localhost/BRP/basisregistratie/natuurlijke_personen/da02ca58-4412-11e9-b210-d663bd873d93

You can also run the outway as a HTTP proxy. This allows applications to call services on NLX by using For more information read the reference information


The response of the curl command should look similar to the following output.

"aanduiding_naamsgebruik": "V",
"aanschrijving": {
"adelijke_titel": "",
"geslachtsnaam": "Poll",
"voorletters": "L.",
"voornamen": "Linneke",
"voorvoegsel_geslachtsnaam": ""
"burgerservicenummer": "58249163",
"emailadres": "",
"geboorte": {
"datum": "25/11/1984",
"land": "Nederland",
"stad": "Utrecht"
"identificatie": "da02ca58-4412-11e9-b210-d663bd873d93",
"kinderen": [],
"naam": {
"adelijke_titel": "",
"geslachtsnaam": "Poll",
"voorletters": "L.",
"voornamen": "Linneke",
"voorvoegsel_geslachtsnaam": ""
"ouders": [],
"overlijden": {
"datum": "",
"land": "",
"stad": ""
"partner": {},
"postadres": {
"huisnummer": 11,
"postcode": "3521AZ",
"straatnaam": "Stadsplateau",
"woonplaats": "Utrecht"
"telefoonnummer": "(06)432-51-968",
"url": "/natuurlijke_personen/da02ca58-4412-11e9-b210-d663bd873d93",
"verblijfadres": {
"huisnummer": 11,
"postcode": "3521AZ",
"straatnaam": "Stadsplateau",
"woonplaats": "Utrecht"

Congratulations, you now made your first query on the NLX network!

API's provided on the NLX network are published in the NLX directory. You can use this directory to see which other API's are available. Take a look at the directory.

In sum

In this part, we have:

  • setup a local NLX outway, which we can use to get data from the network.
  • made a real request to the VNG Realisatie Demo API.

Now let's see if we can provide our own API's to the network.