DNS Management API
Type: | Addon for SoluteDNS |
Version: | 0.0.1 |
Installing DNS Management API is simple. Follow these steps to configure the back-end:
- Upload the SoluteDNS API folder to your WHMCS installation directory: /modules/addons/
- Login to your WHMCS installation and go to: Setup > Addon Modules
- Locate SoluteDNS API and click ‘Activate’. After setup has completed click on ‘Configure’.
- Select the user groups you want to have access to SoluteDNS API and click ‘Save Changes’.
- Go to: Addons > SoluteDNS API, and the new installation setup will start.
The addon will automatically detect the SoluteDNS installation, after successful activation you can immediately start configuring and using the API.
API Client
The API client requires configuration before you can publish it to your clients. To do so open the file:
api_server.php
In this file you will find:
const API_SERVER = 'clients.mydomain.com/whmcs/modules/addons/solutedns_api/api/v1'; const USE_SSL = FALSE; // TRUE or FALSE const REJECT_SELF_SIGNED = TRUE; // TRUE or FALSE
Make sure you edit the api_server url to the location of your DNS Management API installation including the ‘/api/v1’ path.
You could also set a subdomain for example: ‘api.solutedns.com’ instead by adding an .htaccess file to the root map of the subdomain redirecting to the module installation directory.
Client area
The client area is reachable throw the following link:
index.php?m=solutedns_api
This link can be added anywhere you like in the client area by editing the template files.
Clients can review and reset there API key from here. Also a blocked IP warning is shown if an IP locked to the API key has been blocked. The version numbering, documentation and download URL can be set from the admin area settings page.
Error Codes
When an error occurs an error code is returned to the client. Bellow a more detailed explanation of each error code.
40302Client IP has been blocked
Error Code | Error Description |
---|---|
40301 | Client not authorized to use the API. |
40303 | API-key has been blocked. |
40321 | Requested record type unknown. |
40322 | Client request function does not exists. |
40331 | SOA record type not allowed. |
40332 | Record type not allowed. |
40411 | Remote ID not available in index. |
40412 | Local ID not available in index. |
40413 | Domain type could not be determined. |
40414 | Domain holder could not be determined. |
40415 | Requested domain not found in index. |
40416 | No domains in client account with DNS Management enabled. |
40421 | Requested domain not owned by client. |
50101 | Local database connection not available. |
50102 | Nameserver database connection not available. |
50301 | Maintenance mode of SoluteDNS or API Addon activated. |
50303 | Issue with your addon license. |
50111 | Could not process client request. |