Getting started
Response codes When you interact with the mijn.host API, you will receive various HTTP response codes indicating the status of your request. Understanding these codes helps you diagnose issues and handle responses appropriately in your application. Below is a comprehensive list of the response codes used by the mijn.host API and their meanings. Success Responses# Status Code Description 200 OK
The request was successful, and the server responded with the requested data.
Error Responses# Status Code Description 400 Bad Request
The request could not be understood by the server due to malformed syntax. Check the request format and parameters. 401 Unauthorized
Authentication failed or was not provided. Ensure your API-Key
header is included and correct. 403 Forbidden
The server understood the request, but you do not have permission to access the requested resource. 404 Not Found
The requested resource could not be found. Verify the endpoint and resource identifier. 405 Method Not Allowed
The requested method is not supported for the specified resource. Check if the HTTP method is appropriate for the endpoint. 429 Too Many Requests
When you exceed the rate limit, you'll get this error. 500 Internal Server Error
Server error, feel free to report this as soon as you get this.
Example Responses# Successful Response Example (200 OK
)# {
"status" : 200 ,
"status_description" : "Request successful" ,
"data" : {
"templates" : [
{
"id" : 1000 ,
"alias" : "my-dns-template" ,
"default" : 1 ,
}
]
}
}
Error Response Example (400 Bad Request
)# {
"status" : "error" ,
"status_description" : "You have no access to this resource"
}
Error Response Example (401 Unauthorized
)# {
"status" : "error" ,
"status_description" : "No valid API key set"
}
Handling Responses# To ensure your application handles responses correctly: Check Status Codes : Always check the HTTP status code to determine if the request was successful or if an error occurred.
Parse Response Body : For successful requests, parse the data
field in the response to access the returned information.
Handle Errors Gracefully : For error responses, use the message
field to understand the issue and provide appropriate feedback or retry logic.
Modified at 2024-06-26 14:12:57