HAALCENTRAAL BRP API
BRP API / Trying and Testing the API Locally

Trying and Testing the API Locally

For the BRP API Personen a mock is available as a containerized application. You can easily host it on a local machine or in your organization's test environment. The advantage of this solution is that you can add your own test cases to the JSON file. By default the BRP API Personen mock uses the test dataset of personal records for GBA-V pilot environments to simulate the production situation as closely as possible.

You can use the docker compose file to run the BRP API Personen mock on a local machine with Docker Desktop.

You can also choose to use the Kubernetes configuration files to run the BRP API Personen mock on a local machine.

The following sections describe what you need to do to install and call the BRP API Personen mock on a local machine.

Prerequisites

Enable Kubernetes in Docker Desktop Settings

Optionally you can also install the following tools on the local machine:

Using Docker as the container engine

docker compose -f docker-compose-mock.yml up -d

The BRP API Personen mock can now be reached at the URL: http://localhost:5010/haalcentraal/api/brp/personen

curl --location --request POST 'http://localhost:5010/haalcentraal/api/brp/personen' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "RaadpleegMetBurgerservicenummer",
    "burgerservicenummer": ["999993653"],
    "fields": ["burgerservicenummer"]
}'
docker compose -f docker-compose-mock.yml down

Using Kubernetes as the container engine

kubectl apply -f .k8s/personenmock-deployment.yaml \
              -f .k8s/personenmock-service.yaml

The BRP API Personen mock can now be reached at the URL: http://localhost:5010/haalcentraal/api/brp/personen

curl --location --request POST 'http://localhost:5010/haalcentraal/api/brp/personen' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "RaadpleegMetBurgerservicenummer",
    "burgerservicenummer": ["999993653"],
    "fields": ["burgerservicenummer"]
}'
kubectl delete -f .k8s/personenmock-deployment.yaml \
               -f .k8s/personenmock-service.yaml