List All Domain Records
To get a listing of all records configured for a domain, send a GET request to /v2/domains/$DOMAIN_NAME/records. The list of records returned can be filtered by using the name and type query parameters. For example, to only include A records for a domain, send a GET request to /v2/domains/$DOMAIN_NAME/records?type=A. name must be a fully qualified record name. For example, to only include records matching sub.example.com, send a GET request to /v2/domains/$DOMAIN_NAME/records?name=sub.example.com. Both name and type may be used together.
Path parameters
The name of the domain itself.
Query parameters
A fully qualified record name. For example, to only include records matching sub.example.com, send a GET request to /v2/domains/$DOMAIN_NAME/records?name=sub.example.com.
The type of the DNS record. For example: A, CNAME, TXT, ...
Number of items returned per page
Which 'page' of paginated results to return.
Response
The response will be a JSON object with a key called domain_records. The value of this will be an array of domain record objects, each of which contains the standard domain record attributes. For attributes that are not used by a specific record type, a value of null will be returned. For instance, all records other than SRV will have null for the weight and port attributes.
Example response
{
"domain_records": [
{
"id": 28448429,
"type": "NS",
"name": "@",
"data": "ns1.digitalocean.com",
"ttl": 1800
}
],
"links": {
"pages": {
"last": "https://api.digitalocean.com/v2/images?page=2",
"next": "https://api.digitalocean.com/v2/images?page=2"
}
},
"meta": {
"total": 1
}
}