# DNS Records

# List

List of Cloudflare dns records.

# HTTP Request:

GET https://api.serveravatar.com/organizations/{organization}/servers/{server}/applications/{application}/dns-manager/dns-records

# Curl request Example:

curl --request GET \
  --url "https://api.serveravatar.com/organizations/{organization}/servers/{server}/applications/{application}/dns-manager/dns-records" \
  --header 'Content-Type: application/json' \
  --header 'Authorization: <YOUR API TOKEN>'

# Response:

# DNS Records

  • 200 (Ok)
{
  "records": [
    {
      "id": "b14465a5dc825ef99a7a9e373c253619",
      "zone_id": "a67cfe6974229536aba57da2e7b4611c",
      "type": "A",
      "name": "testr.satest.xyz",
      "content": "3.71.4.104",
      "ttl": 1,
      "proxied": true
    },
    {
      "id": "cce7953a0965896ee3bec4615319fa1a",
      "zone_id": "a67cfe6974229536aba57da2e7b4611c",
      "type": "CNAME",
      "name": "*.satest.xyz",
      "content": "satest.xyz",
      "ttl": 1,
      "proxied": false
    }
  ],
  "result_info": {
    "page": 1,
    "per_page": 10,
    "count": 4,
    "total_count": 4,
    "total_pages": 1
  }
}

# Organization Not Found

  • 404 (Not Found)
{
    "message": "Organization not found!"
}

# Application Not found

  • 404 (Not Found)
{
    "message": "Application not found!"
}

# Server Not Found

  • 404 (Not Found)
{
    "message": "Server not found!"
}

# Create

Create DNS Records.

# HTTP Request:

POST https://api.serveravatar.com/organizations/{organization}/servers/{server}/applications/{application}/dns-manager/dns-records?content=&type=&page=1

# Parameter:

Parameters Required Type Description
name Yes String Your record name.
type Yes String Select any one, A, CNAME, TXT, MX.
content Yes String Your record content.
proxied Yes Boolean Your record proxied, true/false.
ttl Yes String Your record ttl.
priority No Numeric Required if, type is MX. Priority between 0-65535.

# Curl Request Example:

curl --request POST \
  --url "https://api.serveravatar.com/organizations/{organization}/servers/{server}/applications/{application}/dns-manager/dns-records?content=&type=&page=1" \
  --header 'Content-Type: application/json' \
  --header 'Authorization: <YOUR API TOKEN>' \
  --data '{
    "content":"3.71.4.104",
    "name":"user.satest.xyz",
    "proxied":false,
    "ttl":1,
    "type":"A"
  }'

# Response:

# DNS Record Create

  • 200 (Ok)
{
  "response": true,
  "message": "DNS record created successfully."
}

# Organization Not Found

  • 404 (Not Found)
{
    "message": "Organization not found!"
}

# Application Not found

  • 404 (Not Found)
{
    "message": "Application not found!"
}

# Server Not Found

  • 404 (Not Found)
{
    "message": "Server not found!"
}

# Update

Update DNS Records.

# HTTP Request:

PATCH https://api.serveravatar.com/organizations/{organization}/servers/{server}/applications/{application}/dns-manager/dns-records/{record}

# Parameter:

Parameters Required Type Description
name Yes String Your record name.
type Yes String Select any one, A, CNAME, TXT, MX.
content Yes String Your record content.
proxied Yes Boolean Your record proxied, true/false.
ttl Yes String Your record ttl.
priority No Numeric Required if, type is MX. Priority between 0-65535.

# Curl Request Example:

curl --request PATCH \
  --url "https://api.serveravatar.com/organizations/{organization}/servers/{server}/applications/{application}/dns-manager/dns-records/cce7953a0965896ee3bec4615319fa1a" \
  --header 'Content-Type: application/json' \
  --header 'Authorization: <YOUR API TOKEN>' \
  --data '{
    "content":"3.71.4.104",
    "name":"test.satest.xyz",
    "proxied":false,
    "ttl":1,
    "type":"A"
  }'

# Response:

# DNS Record Update

  • 200 (Ok)
{
  "response": true,
  "message": "DNS record updated successfully."
}

# Organization Not Found

  • 404 (Not Found)
{
    "message": "Organization not found!"
}

# Application Not found

  • 404 (Not Found)
{
    "message": "Application not found!"
}

# Server Not Found

  • 404 (Not Found)
{
    "message": "Server not found!"
}

# Delete

Delete cloudflare details.

# HTTP Request:

DELETE https://api.serveravatar.com/organizations/{organization}/servers/{server}/applications/{application}/dns-manager/dns-records/{record}
curl --request DELETE \
  --url "https://api.serveravatar.com/organizations/{organization}/servers/{server}/applications/{application}/dns-manager/dns-records/cce7953a0965896ee3bec4615319fa1a" \
  --header 'Content-Type: application/json' \
  --header 'Authorization: <YOUR API TOKEN>' 

# Response:

# DNS Record Delete

  • 200 (Ok)
{
	"message":"DNS Manager credentials remove successfully."
}

# Record Not found

  • 404 (Not Found)
{
    "message": "Cloudflare record not found!"
}

# Application Not found

  • 404 (Not Found)
{
    "message": "Application not found!"
}

# Server Not Found

  • 404 (Not Found)
{
    "message": "Server not found!"
}

# Server Error

  • 500 (Internal Server Error)
{
    "message": "Something went really wrong!"
}
Last Updated: 3/1/2023, 1:57:58 PM