Skip to content
Danmarks Miljøportal edited this page May 12, 2021 · 5 revisions

Danmarks Miljøportal uses HTTP response status codes to indicate the success or failure of your API requests. If your request fails, the server returns an error using the appropriate status code.

In general, there are three status code ranges you can expect:

  • 2xx success status codes confirm that your request worked as expected
  • 4xx error status codes indicate an error because of the information provided (e.g., a required parameter was omitted)
  • 5xx error status codes are rare and indicate an error with Danmarks Miljøportals servers
Status code Description
200 - OK Everything worked as expected.
400 - Bad Request The request was unacceptable, often due to missing a required parameter.
401 - Unauthorized Something is wrong with your token, often it has expired.
403 - Forbidden You do not have access to the requested resource.
404 - Not Found The requested resource doesn't exist.
429 - Too Many Requests Too many requests hit the API too quickly. We recommend an exponential backoff of your requests.
500, 502, 503, 504 - Server Errors This means that something is wrong on our end, and if it doesn't resolve within a couple of days, please reach out to us.

Some 4xx errors that could be handled programmatically include an error code — a short string with a brief explanation — as a value for code.

Clone this wiki locally