Technical aspects
There are a few things to consider when developing an application that uses the Public Value API.
API key
Transmit the API key as value of the x-api-key
header.
Don't hard-code districts
Since the list of districts may change in the future, it should always be loaded from the /districts
endpoint and not stored statically in your application.
Special character
Special characters in URL parameters must be URL-encoded. For example to query the services of "Düsseldorf" encode as: /services?district=D%C3%BCsseldorf
.
More information:
CORS
The API supports CORS, with any origin allowed. Thus, the API can also be used in browser-based applications without any problems.
More information:
Caching
The server caches the responses for some time.
The cache duration corresponds to the value of max-age
or s-maxage
in the response header Cache-Control
.
When developing an application, it makes sense to cache the API response for a comparable duration.
The Cache-Control
header values of the different endpoints can be found in the downloadable API specification at endpoints.
More information: