Best practices

Conditional GET requests

Conditional requests are a part of the HTTP specification. They define a condition, determining when the server should send a response. They can define the condition that the resource must have been modified since a given timestamp (if-modified-since) or that the resource should not match with a given checksum (if-none-match). If the client has the latest, actual data, the if-none-match or if-modified-since validation will fail, and a 304 response is sent, telling the client there is no new data is available.

Keeping API keys secret

Your API keys are personal, and you should try to keep them secret. You shouldn’t try hard, but just, you know, don’t post them in plain text on the internet. Others using your API key might lead to your API key hitting its quota. We cannot reset your API usage for this, and will not upgrade your key for this. If your key is being abused, assigning a new API key will not fix these issues either, unless you take measures to prevent abuse.

Limiting requests

Our departures/arrivals APIs are commonly used for digital signage, both in public spaces (digital signage in stores, malls, appartment blocks, …) and private spaces (magic mirror, hobby projects, …). Since every API call incurrs costs for the provider (Trafiklab, SL, …), we encourage people to use them in an efficient way. We want you to use data, we like it when you use our data, but we do not want to needlessly " waste" computing resources.