Skip to main content

records

Creates, updates, deletes, gets or lists a records resource.

Overview

Namerecords
TypeResource
Idgodaddy.domains.records

Fields

The following fields are returned by SELECT queries:

Request was successful

NameDatatypeDescription
namestring (domain)
datastring
portintegerService port (SRV only)
priorityinteger (integer-positive)Record priority (MX and SRV only)
protocolstringService protocol (SRV only)
servicestringService type (SRV only)
ttlinteger (integer-positive)
typestring
weightinteger (integer-positive)Record weight (SRV only)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
record_getselectdomain, typeX-Shopper-Id, offset, limitRetrieve DNS Records for the specified Domain, optionally with the specified Type and/or Name
record_addexecdomainX-Shopper-IdAdd the specified DNS Records to the specified Domain
record_replaceexecdomainX-Shopper-IdReplace all DNS Records for the specified Domain
record_replace_typeexecdomain, typeX-Shopper-IdReplace all DNS Records for the specified Domain with the specified Type
record_replace_type_nameexecdomain, type, nameX-Shopper-IdReplace all DNS Records for the specified Domain with the specified Type and Name

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.

NameDatatypeDescription
domainstringDomain whose DNS Records are to be replaced
namestringDNS Record Name for which DNS Records are to be replaced
typestringDNS Record Type for which DNS Records are to be replaced
X-Shopper-IdstringShopper 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. For instance, if you're a Reseller, but purchased a Domain via http://www.godaddy.com
limitintegerMaximum number of items to return
offsetintegerNumber of results to skip for pagination

SELECT examples

Retrieve DNS Records for the specified Domain, optionally with the specified Type and/or Name

SELECT
name,
data,
port,
priority,
protocol,
service,
ttl,
type,
weight
FROM godaddy.domains.records
WHERE domain = '{{ domain }}' -- required
AND type = '{{ type }}' -- required
AND X-Shopper-Id = '{{ X-Shopper-Id }}'
AND offset = '{{ offset }}'
AND limit = '{{ limit }}'
;

Lifecycle Methods

Add the specified DNS Records to the specified Domain

EXEC godaddy.domains.records.record_add 
@domain='{{ domain }}' --required,
@X-Shopper-Id='{{ X-Shopper-Id }}'
;