With the API key, the National Land Survey of Finland can monitor the utilisation rate of open interface services and contact the service users where necessary.
The API key is needed to use the following interfaces (in Finnish):
- Karttakuvapalvelu (Vektoritiilet)
- Karttakuvapalvelu (WMTS), avoin rajapintayhteys
- Maastotietokannan kyselypalvelu (OGC API Features)
- Nimistö (OGC API Features)
- Rakennukset (OGC API Features)
Creation and management of API keys
You can create a personal API key in the My Account service of the National Land Survey of Finland as follows:
- Register in the My Account service.
- Log in to the service with the user ID you have registered.
After logging in, you can
- create a new API key
- delete an existing API key
- edit your information or delete your user ID
If you disable the API key, you will no longer have access to interfaces that use your API key to work. You cannot cancel the deletion of the API key, but you can create a new API key in the My Account service at any time. You must enable the new API key in the interfaces where you used the old API key.
Did you forget your My Account service password? Order a new password.
Problems with My Account service? Contact technical support.
The following statements concerning the processing of personal data are followed in the My Account service:
- Personal data of the customer register of the National Land Survey of Finland
- Personal data in the information systems of the National Land Survey of Finland and of the users of facilities
Using the API key
Two alternatives are available:
HTTP Basic Authentication
- possible uses: use of the interface from geospatial information software, the self-programmed customer application or the browser (through the address box)
- the URL of the interface query is transmitted to the service in the way the URL has been defined in the service documentation
- For example, when using the interface service through the browser (through the browser address box) or with QGIS software, the customer software asks the user for a password and user ID – the user ID is then replaced with the API key, and the password can be left blank (See Vihjeitä Maanmittauslaitoksen Maastotietokannan OGC API Features -palvelun käyttäjille.pdf on page 1.)
- when using the interface service from a self-programmed customer application
- an Authorisation header of the form Basic HTTP Authentication (https://tools.ietf.org/html/rfc7617) must be attached to each HTTPS request made to the interface service
- the API key’s string must be set as the value of the user-id field in the Authorisation header, and the password field must be left empty
- the advantage when using this alternative is that the URL links between the interface service resources work as such as long as each HTTPS request includes the Authorisation header described above.
- possible uses: use of the interface through a self-programmed customer application
- The API key can also be transmitted to the interface service as a URL parameter
- If a specific resource in the interface service returns a URL link to another resource, the link does not contain an API key, but the user must also add the API key as a URL parameter to the URL link of the resource referred to
- Form of the URL parameter: