The DNS API is a RESTful Endpoint that grants you full control over every aspect of your DNS Zones. This includes managing your DNS Records & daily query statistics, all in JSON format.
Table of Contents
List DNS Zones
Returns a list of all DNS Zones for your account.
GET | https://cachegenie.com/api/dns
Response Parameters
- CODE (Integer): Represents the status code of the API response.
- MESSAGE (String): A description detailing the result or status of the API request.
- DATA (Object): Contains the data returned by the API request.
- DNS_ZONES (Array): Contains a list of DNS zones for the account.
View DNS Zone
Returns a DNS Zone, as defined by the ZONE_ID path parameter.
GET | https://cachegenie.com/api/dns/{ZONE_ID}
Response Parameters
- CODE (Integer): Represents the status code of the API response.
- MESSAGE (String): A description detailing the result or status of the API request.
- DATA (Object): Contains the data returned by the API request.
- ID (String): Unique identifier for the DNS Zone.
- DOMAIN_NAME (String): The domain name associated with this DNS Zone.
- TIMESTAMP (String): Unix timestamp indicating when the DNS Zone was created.
Create DNS Zone
Create a new DNS Zone with the specified request parameters on your account.
POST | https://cachegenie.com/api/dns
Request Parameters
- DOMAIN_NAME (String, required): The domain name associated with this DNS Zone.
Response Parameters
- CODE (Integer): Represents the status code of the API response.
- MESSAGE (String): A description detailing the result or status of the API request.
- DATA (Object): Contains the data returned by the API request.
Delete DNS Zone
Delete a DNS Zone, as defined by the ZONE_ID path parameter.
DELETE | https://cachegenie.com/api/dns/{ZONE_ID}
Response Parameters
- CODE (Integer): Represents the status code of the API response.
- MESSAGE (String): A description detailing the result or status of the API request.
- DATA (Object): Empty response data.
DNS Zone Statistics
Get statistics for the requested DNS Zone, as defined by the ZONE_ID path parameter. You can specify FROM_TIMESTAMP for the start date, and TO_TIMESTAMP for the end date, in the request body. If no start date is set, stats will be returned starting 28 days from the date the request is made.
GET | https://cachegenie.com/api/dns/{ZONE_ID}/stats
Request Parameters
- FROM_TIMESTAMP (String, optional): The timestamp that you want the statistics to start from.
- TO_TIMESTAMP (String, optional): The timestamp that you want the statistics to end on.
Response Parameters
- CODE (Integer): Represents the status code of the API response.
- MESSAGE (String): A description detailing the result or status of the API request.
- DATA (Object): Contains the data returned by the API request.
- DNS_DAILY_STATS (Array): Contains a list of daily statistics for the DNS Zone.
- DAY_TIMESTAMP (String): Unix timestamp indicating the specific day for the statistics.
- DNS_QUERIES (String): Number of DNS Queries
List DNS Records
Returns a list of all DNS Records for the given DNS Zone, as defined by the ZONE_ID path parameter.
GET | https://cachegenie.com/api/dns/{ZONE_ID}/records
Response Parameters
- CODE (Integer): Represents the status code of the API response.
- MESSAGE (String): A description detailing the result or status of the API request.
- DATA (Object): Contains the data returned by the API request.
- DNS_RECORDS (Array): Contains a list of DNS Records for the given DNS Zone.
View DNS Record
Returns a DNS Record, as defined by the RECORD_ID path parameter, for the given DNS Zone, as defined by the ZONE_ID path parameter.
GET | https://cachegenie.com/api/dns/{ZONE_ID}/records/{RECORD_ID}
Response Parameters
- CODE (Integer): Represents the status code of the API response.
- MESSAGE (String): A description detailing the result or status of the API request.
- DATA (Object): Contains the data returned by the API request.
- ID (String): Unique identifier for the DNS Record.
- TYPE (Integer): Denotes the DNS Record type (See Valid Inputs).
- LABEL (String): A label (or group) to identify records (max 6 characters in length).
- TTL (String): Time To Live in seconds (See Valid Inputs).
- VALUE (String): The value of the DNS Record (e.g. an IPv4 Address for an A record).
- NAME (String): The name or subdomain for this DNS Record (leave empty for root).
- WEIGHT (Integer): The weight for balancing multiple records with the same priority (0 - 100).
- PRIORITY (Integer): The priority of the record (0 - 65535).
- FLAGS (Integer): Flag for the record (0 - 255).
- TAG (String): Tag for the record.
- PORT (Integer): The port number for the service (0 - 65535).
- TIMESTAMP (String): Unix timestamp indicating when this DNS Record was created.
Create DNS Record
Create a new DNS Record, with the specified request parameters, for the given DNS Zone, as defined by the ZONE_ID path parameter.
POST | https://cachegenie.com/api/dns/{ZONE_ID}/records
Request Parameters
- TYPE (Integer): Denotes the DNS Record type (See Valid Inputs).
- LABEL (String): A label (or group) to identify records (max 6 characters in length).
- TTL (String): Time To Live in seconds (See Valid Inputs).
- VALUE (String): The value of the DNS Record (e.g. an IPv4 Address for an A record).
- NAME (String): The name or subdomain for this DNS Record (leave empty for root).
- WEIGHT (Integer): The weight for balancing multiple records with the same priority (0 - 100).
- PRIORITY (Integer): The priority of the record (0 - 65535).
- FLAGS (Integer): Flag for the record (0 - 255).
- TAG (String): Tag for the record.
- PORT (Integer): The port number for the service (0 - 65535).
Response Parameters
- CODE (Integer): Represents the status code of the API response.
- MESSAGE (String): A description detailing the result or status of the API request.
- DATA (Object): Contains the data returned by the API request.
Update DNS Record
Update a DNS Record, as defined by the RECORD_ID path parameter, with the specified request parameters, for the given DNS Zone, as defined by the ZONE_ID path parameter.
POST | https://cachegenie.com/api/dns/{ZONE_ID}/records/{RECORD_ID}
Request Parameters
- LABEL (String): A label (or group) to identify records (max 6 characters in length).
- TTL (String): Time To Live in seconds (See Valid Inputs).
- VALUE (String): The value of the DNS Record (e.g. an IPv4 Address for an A record).
- WEIGHT (Integer): The weight for balancing multiple records with the same priority (0 - 100).
- PRIORITY (Integer): The priority of the record (0 - 65535).
- FLAGS (Integer): Flag for the record (0 - 255).
- TAG (String): Tag for the record.
- PORT (Integer): The port number for the service (0 - 65535).
Response Parameters
- CODE (Integer): Represents the status code of the API response.
- MESSAGE (String): A description detailing the result or status of the API request.
- DATA (Object): Contains the data returned by the API request.
Delete DNS Record
Delete a DNS Record, as defined by the RECORD_ID path parameter, for the given DNS Zone, as defined by the ZONE_ID path parameter.
DELETE | https://cachegenie.com/api/dns/{ZONE_ID}/records/{RECORD_ID}
Response Parameters
- CODE (Integer): Represents the status code of the API response.
- MESSAGE (String): A description detailing the result or status of the API request.
- DATA (Object): Empty response data.