staticdnsentries

GET

Retrieve all static DNS entries configured within Traffic Control

Auth. Required:Yes
Roles Required:None
Response Type:Array

Request Structure

Table 214 Request Query Parameters
Name Required Description
address no Return only static DNS entries that operate on this address/CNAME
cachegroup no Return only static DNS entries assigned to this Cache Group
cachegroupId no Return only static DNS entries assigned to the Cache Group identified by this integral, unique identifier
deliveryservice no Return only static DNS entries that apply within the domain of the Delivery Service with this ‘xml_id’
deliveryserviceId no Return only static DNS entries that apply within the domain of the Delivery Service identified by this integral, unique identifier
host no Return only static DNS entries that resolve this FQDN
id no Return only the static DNS entry with this integral, unique identifier
ttl no Return only static DNS entries with this TTL
type no Return only static DNS entries of this type
typeId no Return only static DNS entries of the type identified by this integral, unique identifier
#424 Request Example
GET /api/1.4/staticdnsentries?address=foo.bar HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...

Response Structure

address:

If typeId identifies a CNAME type record, this is the Canonical Name (CNAME) of the server, otherwise it is the IP address to which host shall be resolved

cachegroup:

An optional string containing the name of a Cache Group which will service this static DNS entry

Note

This field has no effect, and is not used by any part of Traffic Control. It exists for legacy compatibility reasons.

cachegroupId:

An optional, integral, unique identifier of a Cache Group which will service this static DNS entry

Note

This field has no effect, and is not used by any part of Traffic Control. It exists for legacy compatibility reasons.

deliveryservice:
 

The name of a Delivery Service under the domain of which this static DNS entry shall be active

deliveryserviceId:
 

The integral, unique identifier of a Delivery Service under the domain of which this static DNS entry shall be active

host:

If typeId identifies a CNAME type record, this is an alias for the CNAME of the server, otherwise it is the Fully Qualified Domain Name (FQDN) which shall resolve to address

id:

An integral, unique identifier for this static DNS entry

ttl:

The Time To Live (TTL) of this static DNS entry in seconds

type:

The name of the type of this static DNS entry

typeId:

The integral, unique identifier of the type of this static DNS entry

#425 Response Example
HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Set-Cookie, Cookie
Access-Control-Allow-Methods: POST,GET,OPTIONS,PUT,DELETE
Access-Control-Allow-Origin: *
Content-Type: application/json
Set-Cookie: mojolicious=...; Path=/; HttpOnly
Whole-Content-Sha512: Px1zTH3ihg+hfmdADGcap0Juuud39fGsx5Y3CzqaFNmRwFu1ZLMzOsy0EN2pb7vpOtpI6/zeIUYAC3dbsBwOmA==
X-Server-Name: traffic_ops_golang/
Date: Mon, 10 Dec 2018 20:04:33 GMT
Content-Length: 226

{ "response": [
        {
                "address": "foo.bar",
                "cachegroup": null,
                "cachegroupId": null,
                "deliveryservice": "demo1",
                "deliveryserviceId": 1,
                "host": "test",
                "id": 2,
                "lastUpdated": "2018-12-10 19:59:56+00",
                "ttl": 300,
                "type": "CNAME_RECORD",
                "typeId": 40
        }
]}

POST

New in version 1.3.

Creates a new, static DNS entry.

Auth. Required:Yes
Roles Required:“admin” or “operations”
Response Type:Object

Request Structure

address:

If typeId identifies a CNAME type record, this is the Canonical Name (CNAME) of the server, otherwise it is the IP address to which host shall be resolved

cachegroupId:

An optional, integral, unique identifier of a Cache Group which will service this static DNS entry

Note

This field has no effect, and is not used by any part of Traffic Control. It exists for legacy compatibility reasons.

deliveryserviceId:
 

The integral, unique identifier of a Delivery Service under the domain of which this static DNS entry shall be active

host:

If typeId identifies a CNAME type record, this is an alias for the CNAME of the server, otherwise it is the Fully Qualified Domain Name (FQDN) which shall resolve to address

ttl:

The Time To Live (TTL) of this static DNS entry in seconds

typeId:

The integral, unique identifier of the type of this static DNS entry

#426 Request Example
POST /api/1.4/staticdnsentries HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...
Content-Length: 92
Content-Type: application/json

{
        "address": "test.quest",
        "deliveryserviceId": 1,
        "host": "test",
        "ttl": 300,
        "typeId": 40
}

Response Structure

address:

If typeId identifies a CNAME type record, this is the Canonical Name (CNAME) of the server, otherwise it is the IP address to which host shall be resolved

cachegroup:

An optional string containing the name of a Cache Group which will service this static DNS entry

Note

This field has no effect, and is not used by any part of Traffic Control. It exists for legacy compatibility reasons.

cachegroupId:

An optional, integral, unique identifier of a Cache Group which will service this static DNS entry

Note

This field has no effect, and is not used by any part of Traffic Control. It exists for legacy compatibility reasons.

deliveryservice:
 

The name of a Delivery Service under the domain of which this static DNS entry shall be active

deliveryserviceId:
 

The integral, unique identifier of a Delivery Service under the domain of which this static DNS entry shall be active

host:

If typeId identifies a CNAME type record, this is an alias for the CNAME of the server, otherwise it is the Fully Qualified Domain Name (FQDN) which shall resolve to address

id:

An integral, unique identifier for this static DNS entry

ttl:

The Time To Live (TTL) of this static DNS entry in seconds

type:

The name of the type of this static DNS entry

typeId:

The integral, unique identifier of the type of this static DNS entry

#427 Response Example
HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Set-Cookie, Cookie
Access-Control-Allow-Methods: POST,GET,OPTIONS,PUT,DELETE
Access-Control-Allow-Origin: *
Content-Type: application/json
Set-Cookie: mojolicious=...; Path=/; HttpOnly
Whole-Content-Sha512: 8dcJyjw2NJZx0L9Oz16P7g/7j5A1jlpyiY6Y+rRVQ2wGcwYI3yiGPrz6ur0qKzgqEBBsh8aPF44WTHAR9jUJdg==
X-Server-Name: traffic_ops_golang/
Date: Mon, 10 Dec 2018 19:54:19 GMT
Content-Length: 282

{ "alerts": [
        {
                "text": "staticDNSEntry was created.",
                "level": "success"
        }
],
"response": {
        "address": "test.quest",
        "cachegroup": null,
        "cachegroupId": null,
        "deliveryservice": null,
        "deliveryserviceId": 1,
        "host": "test",
        "id": 2,
        "lastUpdated": "2018-12-10 19:54:19+00",
        "ttl": 300,
        "type": null,
        "typeId": 40
}}

PUT

New in version 1.3.

Updates a static DNS entry.

Authentication Required: Yes

Role(s) Required: admin or oper

Request Structure

Table 215 Request Query Parameters
Name Description
id The integral, unique identifier of the static DNS entry to modify
address:

If typeId identifies a CNAME type record, this is the Canonical Name (CNAME) of the server, otherwise it is the IP address to which host shall be resolved

cachegroupId:

An optional, integral, unique identifier of a Cache Group which will service this static DNS entry

Note

This field has no effect, and is not used by any part of Traffic Control. It exists for legacy compatibility reasons.

deliveryserviceId:
 

The integral, unique identifier of a Delivery Service under the domain of which this static DNS entry shall be active

host:

If typeId identifies a CNAME type record, this is an alias for the CNAME of the server, otherwise it is the Fully Qualified Domain Name (FQDN) which shall resolve to address

ttl:

The Time To Live (TTL) of this static DNS entry in seconds

typeId:

The integral, unique identifier of the type of this static DNS entry

#428 Request Example
PUT /api/1.4/staticdnsentries?id=2 HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...
Content-Length: 89
Content-Type: application/json

{
        "address": "foo.bar",
        "deliveryserviceId": 1,
        "host": "test",
        "ttl": 300,
        "typeId": 40
}

Response Structure

address:

If typeId identifies a CNAME type record, this is the Canonical Name (CNAME) of the server, otherwise it is the IP address to which host shall be resolved

cachegroup:

An optional string containing the name of a Cache Group which will service this static DNS entry

Note

This field has no effect, and is not used by any part of Traffic Control. It exists for legacy compatibility reasons.

cachegroupId:

An optional, integral, unique identifier of a Cache Group which will service this static DNS entry

Note

This field has no effect, and is not used by any part of Traffic Control. It exists for legacy compatibility reasons.

deliveryservice:
 

The name of a Delivery Service under the domain of which this static DNS entry shall be active

deliveryserviceId:
 

The integral, unique identifier of a Delivery Service under the domain of which this static DNS entry shall be active

host:

If typeId identifies a CNAME type record, this is an alias for the CNAME of the server, otherwise it is the Fully Qualified Domain Name (FQDN) which shall resolve to address

id:

An integral, unique identifier for this static DNS entry

ttl:

The Time To Live (TTL) of this static DNS entry in seconds

type:

The name of the type of this static DNS entry

typeId:

The integral, unique identifier of the type of this static DNS entry

#429 Response Example
HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Set-Cookie, Cookie
Access-Control-Allow-Methods: POST,GET,OPTIONS,PUT,DELETE
Access-Control-Allow-Origin: *
Content-Type: application/json
Set-Cookie: mojolicious=...; Path=/; HttpOnly
Whole-Content-Sha512: +FaYmpnlIIzVSBq0nosw29NZcV9xFhlVgWuUqXUyiDihVUSzX4jrdAloRDgzDvKsYQB8LSkPdGHwt1zjgSzUtA==
X-Server-Name: traffic_ops_golang/
Date: Mon, 10 Dec 2018 19:59:56 GMT
Content-Length: 279

{ "alerts": [
        {
                "text": "staticDNSEntry was updated.",
                "level": "success"
        }
],
"response": {
        "address": "foo.bar",
        "cachegroup": null,
        "cachegroupId": null,
        "deliveryservice": null,
        "deliveryserviceId": 1,
        "host": "test",
        "id": 2,
        "lastUpdated": "2018-12-10 19:59:56+00",
        "ttl": 300,
        "type": null,
        "typeId": 40
}}

DELETE

New in version 1.3.

Delete staticdnsentries.

Auth. Required:Yes
Roles Required:“admin” or “operations”
Response Type:undefined

Request Structure

Table 216 Request Query Parameters
Name Description
id The integral, unique identifier of the static DNS entry to delete
#430 Request Example
DELETE /api/1.4/staticdnsentries?id=2 HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...

Response Structure

#431 Response Example
HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Set-Cookie, Cookie
Access-Control-Allow-Methods: POST,GET,OPTIONS,PUT,DELETE
Access-Control-Allow-Origin: *
Content-Type: application/json
Set-Cookie: mojolicious=...; Path=/; HttpOnly
Whole-Content-Sha512: g6uqHPU44LuTtqU2ahtazrVCpcpNWVc9kWJQOYRuiVLDnsm39KOB/xt3XM6j0/X3WYiIawnNspkxRC85LJHwFA==
X-Server-Name: traffic_ops_golang/
Date: Mon, 10 Dec 2018 20:05:52 GMT
Content-Length: 69

{ "alerts": [
        {
                "text": "staticDNSEntry was deleted.",
                "level": "success"
        }
]}