{ "id": "record", "$schema": "http://json-schema.org/draft-03/hyper-schema", "title": "record", "description": "Record", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "Record Identifier", "pattern": "^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$", "readonly": true }, "domain_id": { "type": "string", "description": "Domain Identifier", "pattern": "^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$", "readonly": true }, "name": { "type": "string", "description": "DNS Record Name", "format": "host-name", "maxLength": 255, "required": true }, "type": { "type": "string", "description": "DNS Record Type", "enum": ["A", "AAAA", "CNAME", "MX", "SRV", "TXT", "SPF", "NS", "PTR", "SSHFP", "SOA"], "required": true }, "data": { "type": "string", "description": "DNS Record Value", "maxLength": 255, "required": true }, "priority": { "type": ["integer", "null"], "description": "DNS Record Priority", "minimum": 1, "maximum": 65535 }, "ttl": { "type": ["integer", "null"], "description": "Time to live", "minimum": 0, "maximum": 2147483647 }, "description": { "type": ["string", "null"], "description": "Description for the record", "maxLength": 160 }, "created_at": { "type": "string", "description": "Date and time of record creation", "format": "date-time", "readonly": true }, "updated_at": { "type": ["string", "null"], "description": "Date and time of last record update", "format": "date-time", "readonly": true } }, "oneOf": [{ "description": "An A Record", "properties": { "type": { "type": "string", "enum": ["A"] }, "data": { "format": "ip-address", "required": true }, "priority": { "type": "null" } } }, { "description": "An AAAA Record", "properties": { "type": { "type": "string", "enum": ["AAAA"] }, "data": { "format": "ipv6", "required": true }, "priority": { "type": "null" } } }, { "description": "A CNAME Record", "properties": { "type": { "type": "string", "enum": ["CNAME"] }, "data": { "format": "host-name", "required": true }, "priority": { "type": "null" } } }, { "description": "A MX Record", "properties": { "type": { "type": "string", "enum": ["MX"] }, "data": { "format": "host-name", "required": true }, "priority": { "type": "integer", "required": true } } }, { "description": "A SRV Record", "properties": { "type": { "type": "string", "enum": ["SRV"] }, "name": { "type": "string", "pattern": "^(?:_[A-Za-z0-9_\\-]{1,62}\\.){2}" }, "data": { "type": "string", "pattern": "^(?:(?:6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])\\s){2}(?!.{255,})((?!\\-)[A-Za-z0-9_\\-]{1,63}(?