records
GoDaddy Domains v1 API. Accepts a Personal Access Token (Bearer) or a classic sso-key credential.
Overview
| Name | records |
| Type | Resource |
| Id | godaddy.dns.records |
Fields
The following fields are returned by SELECT queries:
- list
Request was successful
| Name | Datatype | Description |
|---|---|---|
name | string (domain) | |
data | string | |
port | integer | Service port (SRV only) |
priority | integer (integer-positive) | Record priority (MX and SRV only) |
protocol | string | Service protocol (SRV only) |
service | string | Service type (SRV only) |
ttl | integer (integer-positive) | |
type | string | (A, AAAA, CAA, CNAME, MX, NS, SOA, SRV, TXT) |
weight | integer (integer-positive) | Record weight (SRV only) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | domain, type, name | x_shopper_id, offset, limit | Returns DNS records for the domain. Optionally filter by record type and name. Returns an array of DNSRecord objects. |
delete | delete | domain, type, name | x_shopper_id | Deletes all DNS records matching the specified type and name. All other records are preserved. Returns 204 No Content. |
add | exec | domain, records | x_shopper_id | Appends DNS records to the domain's zone without removing existing records. Existing records with the same type and name are preserved. Returns 204 No Content. |
replace_all | exec | domain, records | x_shopper_id | Replaces the entire DNS record set for the domain. All existing records are removed and replaced with the submitted set. Returns 204 No Content. |
replace_by_type_name | exec | domain, type, name, records | x_shopper_id | Replaces all DNS records of the specified type and name. All other records are preserved. Returns 204 No Content. |
replace_by_type | exec | domain, type, records | x_shopper_id | Replaces all DNS records of the specified type across all names. Records of other types are preserved. Returns 204 No Content. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
domain | string | Domain whose DNS Records are to be replaced |
name | string | DNS Record Name for which DNS Records are to be replaced |
type | string | DNS Record Type for which DNS Records are to be replaced |
x_shopper_id | string | Shopper ID which owns the domain. NOTE: This is only required if you are a Reseller managing a domain purchased outside the scope of your reseller account. |
limit | integer | Maximum number of items to return |
offset | integer | Number of results to skip for pagination |
x_shopper_id | string | Shopper ID which owns the domain. NOTE: This is only required if you are a Reseller managing a domain purchased outside the scope of your reseller account. (wire: X-Shopper-Id) |
SELECT examples
- list
Returns DNS records for the domain. Optionally filter by record type and name. Returns an array of DNSRecord objects.
SELECT
name,
data,
port,
priority,
protocol,
service,
ttl,
type,
weight
FROM godaddy.dns.records
WHERE domain = '{{ domain }}' -- required
AND type = '{{ type }}' -- required
AND name = '{{ name }}' -- required
AND x_shopper_id = '{{ x_shopper_id }}'
AND offset = '{{ offset }}'
AND limit = '{{ limit }}'
;
DELETE examples
- delete
Deletes all DNS records matching the specified type and name. All other records are preserved. Returns 204 No Content.
DELETE FROM godaddy.dns.records
WHERE domain = '{{ domain }}' --required
AND type = '{{ type }}' --required
AND name = '{{ name }}' --required
AND x_shopper_id = '{{ x_shopper_id }}'
;
Lifecycle Methods
EXEC variables use wire (API) names.
- add
- replace_all
- replace_by_type_name
- replace_by_type
Appends DNS records to the domain's zone without removing existing records. Existing records with the same type and name are preserved. Returns 204 No Content.
EXEC godaddy.dns.records.add
@domain='{{ domain }}' --required,
@x_shopper_id='{{ x_shopper_id }}',
@records='{{ records }}'
;
Replaces the entire DNS record set for the domain. All existing records are removed and replaced with the submitted set. Returns 204 No Content.
EXEC godaddy.dns.records.replace_all
@domain='{{ domain }}' --required,
@x_shopper_id='{{ x_shopper_id }}',
@records='{{ records }}'
;
Replaces all DNS records of the specified type and name. All other records are preserved. Returns 204 No Content.
EXEC godaddy.dns.records.replace_by_type_name
@domain='{{ domain }}' --required,
@type='{{ type }}' --required,
@name='{{ name }}' --required,
@x_shopper_id='{{ x_shopper_id }}',
@records='{{ records }}'
;
Replaces all DNS records of the specified type across all names. Records of other types are preserved. Returns 204 No Content.
EXEC godaddy.dns.records.replace_by_type
@domain='{{ domain }}' --required,
@type='{{ type }}' --required,
@x_shopper_id='{{ x_shopper_id }}',
@records='{{ records }}'
;