Understanding How The API Works »
Creating a Service location (SRV) record in the API requires specific syntax depending on whether you are using REST or SOAP. Use this table to find the syntax for your command.
See RFC 2782 for more information about SRV records.
REST Syntax
Click to view all REST Resources |
/REST/SRVRecord/ POST — Creates an SRV record on the zone/node indicated.
HTTP Action — POST
URI — https://api.dynect.net/REST/SRVRecord/<zone>/<fqdn>/ |
Arguments — Click for More Info
- hash
rdata — Required. RData defining the record to add.
- string
port — Required. Indicates the port where the service is running.
- string
priority — Required. Numeric value for priority usage. Lower value takes precedence over higher value where two records of the same type exist on the zone/node.
- string
target — Required. The domain name of a host where the service is running on the specified port .
- string
weight — Required. Secondary prioritizing of records to serve. Records of equal priority should be served based on their weight. Higher values are served more often.
- string
ttl — TTL for the record. Set to “0” to use zone default
|
Response — Click for More Info
- string
fqdn — Name of the node where the record will be added.
- hash
rdata — RData defining the record to add.
- string
port — Indicates the port where the service is running.
- string
priority — Numeric value for priority usage. Lower value takes precedence over higher value where two records of the same type exist on the zone/node.
- string
target — The domain name of a host where the service is running on the specified port .
- string
weight — Secondary prioritizing of records to serve. Records of equal priority should be served based on their weight. Higher values are served more often.
- string
record_type — RRType of the record.
- string
ttl — TTL for the record. Set to “0” to use zone default
- string
zone — Name of the zone.
|
SOAP Syntax
Click to view all SOAP Commands |
CreateSRVRecord — Creates an SRV record on the zone/node indicated. |
Arguments — Click for More Info
- string
fqdn — Required. Name of the node where the record will be added.
- hash
rdata — Required. RData defining the record to add.
- string
port — Required. Indicates the port where the service is running.
- string
priority — Required. Numeric value for priority usage. Lower value takes precedence over higher value where two records of the same type exist on the zone/node.
- string
target — Required. The domain name of a host where the service is running on the specified port .
- string
weight — Required. Secondary prioritizing of records to serve. Records of equal priority should be served based on their weight. Higher values are served more often.
- string
token — Required. Session Identifier.
- string
ttl — TTL for the record. Set to “0” to use zone default.
- string
zone — Required. Name of the zone where the record will reside.
|
Response — Click for More Info
- hash
data
- string
fqdn — Name of the node where the record will be added.
- hash
rdata — RData defining the record to add.
- string
port — Indicates the port where the service is running.
- string
priority — Numeric value for priority usage. Lower value takes precedence over higher value where two records of the same type exist on the zone/node.
- string
target — The domain name of a host where the service is running on the specified port .
- string
weight — Secondary prioritizing of records to serve. Records of equal priority should be served based on their weight. Higher values are served more often.
- string
record_id — Numeric identifier for the record.
- string
record_type — RRType of the record.
- string
ttl — TTL for the record. Set to “0” to use zone default
- string
zone — Name of the zone.
|
Example Request — Click for More Info
{
'fqdn' => 'www.example.com',
'rdata' => {
'priority' => '10',
'weight' => '10',
'port' => '80',
'target' => 'www.example.com',
},
'token' => 'asdlkfjasl23j4879afa',
'ttl' => '3600',
'zone' => 'example.com',
}
|
<< DNS API Knowledge Base