2.0 KiB
| id | title | sidebar_label |
|---|---|---|
| reseller-api | DeinServerHost Reseller API - Information & Authentication | Information & Authorization |
Introduction
How do I gain access to the API?
Access to the API is restricted. The API is only accessible from whitelisted IP addresses. Therefore, it is necessary to whitelist the IP that will access the API.
Only after whitelisting, unrestricted access to the Reseller API is possible.
If you want to use the Reseller API, please contact us via support ticket.
Authorization
To verify an API request, a username, password, and hash are required. These credentials were provided upon API activation and must be included in every request.
Example:
curl --location --request POST 'https://deinserverhost.de/store/includes/api.php' \
--header 'Content-Type: multipart/form-data' \
--form 'username="<USERNAME>"' \
--form 'password="<PASSWORD>"' \
--form 'resellerhash="<HASH>"' \
--form 'action="dshreseller"' \
--form 'uaction="Dedicated_startServer"' \
--form 'pid="12345"' \
--form 'responsetype="json"' \
This request will start the server with ID: 12345. It is important to always provide Username, Password, and Reseller Hash.
The action parameter determines the API section to be accessed. In this case, it will always be dshreseller. The uaction specifies which function should be executed. Since the server with ID 12345 is a Dedicated Server, we call the Dedicated_startServer function.
With responsetype, we define the response format, which should always be json. The API response is always in JSON format.
A sample response looks like this:
{
"result": "success",
"message": "server is powering on",
"status": "" // This object can be an array, an object, a string, or a number
}
Some functions return the function result, a message, and a detailed response. This allows further processing based on the result alone while providing detailed error information if needed.