Openminds Sock API

Add DNS Template Record

Adds a record to a DNS template.

URL

/dns_templates/:dns_template_id/add_record

Method

PUT

Data parameters

Required

  • user_token=[string]
  • client_token=[string]
  • type=[string]: "A", "AAAA", "CNAME", "MX", "PTR", "SRV", or "TXT"
  • content=[string]

HINT: For SRV records, the content format should be "[weight] [port] [target]"

Optional

  • name=[string] NOTE: Required for PTR and SRV records
  • ttl=[string]
  • priority=[string] NOTE: Required for MX and SRV records, not applicable for other types

Sample usage

curl -X PUT https://sock.openminds.be/api/v1/dns_templates/75/add_record -d user_token=1234 -d client_token=-5678 \
  -d type=SRV \
  -d content="1 1111 target" \
  -d name=test \
  -d priority=0

Sample response

{
    "dns_template_records": [
        {
            "content": "1.1.1.1",
            "id": 1428,
            "name": null,
            "priority": null,
            "ttl": 3600,
            "type": "A"
        },
        {
            "content": "1 1111 target",
            "id": 1429,
            "name": "test",
            "priority": 0,
            "ttl": 3600,
            "type": "SRV"
        }
    ],
    "id": 75,
    "name": "client",
    "publicly_available": false,
    "subdomains": 1
}