staticdnsentries
GET
Retrieve all static DNS entries configured within Traffic Control
- Auth. Required:
Yes
- Roles Required:
None
- Permissions Required:
STATIC-DN:READ, CACHE-GROUP:READ, DELIVERY-SERVICE:READ
- Response Type:
Array
Request Structure
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 the Cache Group that has this Name |
cachegroupId |
no |
Return only static DNS entries assigned to the Cache Group that has this ID |
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 |
sortOrder |
no |
Changes the order of sorting. Either ascending (default or “asc”) or descending (“desc”) |
limit |
no |
Choose the maximum number of results to return |
offset |
no |
The number of results to skip before beginning to return results. Must use in conjunction with limit |
page |
no |
Return the nth page of results, where “n” is the value of this parameter, pages are |
GET /api/4.0/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 aCNAME
type record, this is the Canonical Name (CNAME) of the server with a trailing period, otherwise it is the IP address to whichhost
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, integer that is the ID 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 aCNAME
type record, this is an alias for the CNAME of the server, otherwise it is the Fully Qualified Domain Name (FQDN) which shall resolve toaddress
- id:
An integral, unique identifier for this static DNS entry
- lastUpdated:
The date and time at which this static DNS entry was last updated
- ttl:
The 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
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=/; Expires=Mon, 18 Nov 2019 17:40:54 GMT; Max-Age=3600; 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": 41
}
]}
POST
Creates a new, static DNS entry.
- Auth. Required:
Yes
- Roles Required:
“admin” or “operations”
- Permissions Required:
STATIC-DN:CREATE, STATIC-DN:READ, CACHE-GROUP:READ, DELIVERY-SERVICE:READ
- Response Type:
Object
Request Structure
- address:
If
typeId
identifies aCNAME
type record, this is the Canonical Name (CNAME) of the server with a trailing period, otherwise it is the IP address to whichhost
shall be resolved- cachegroupId:
An optional, integer that is the ID 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 aCNAME
type record, this is an alias for the CNAME of the server, otherwise it is the FQDN which shall resolve toaddress
- ttl:
The TTL of this static DNS entry in seconds
- typeId:
The integral, unique identifier of the Type of this static DNS entry
POST /api/4.0/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": 41
}
Response Structure
- address:
If
typeId
identifies aCNAME
type record, this is the Canonical Name (CNAME) of the server with a trailing period, otherwise it is the IP address to whichhost
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, integer that is the ID 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 aCNAME
type record, this is an alias for the CNAME of the server, otherwise it is the Fully Qualified Domain Name (FQDN) which shall resolve toaddress
- id:
An integral, unique identifier for this static DNS entry
- lastUpdated:
The date and time at which this static DNS entry was last updated
- ttl:
The 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
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=/; Expires=Mon, 18 Nov 2019 17:40:54 GMT; Max-Age=3600; 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": "CNAME_RECORD",
"typeId": 41
}}
PUT
Updates a static DNS entry.
- Auth. Required:
Yes
- Role(s) Required:
“admin” or “operator”
- Permissions Required:
STATIC-DN:UPDATE, STATIC-DN:READ, CACHE-GROUP:READ, DELIVERY-SERVICE:READ
- Response Type:
Object
Request Structure
Name |
Description |
---|---|
id |
The integral, unique identifier of the static DNS entry to modify |
- address:
If
typeId
identifies aCNAME
type record, this is the Canonical Name (CNAME) of the server with a trailing period, otherwise it is the IP address to whichhost
shall be resolved- cachegroupId:
An optional, integer that is the ID 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 aCNAME
type record, this is an alias for the CNAME of the server, otherwise it is the Fully Qualified Domain Name (FQDN) which shall resolve toaddress
- ttl:
The TTL of this static DNS entry in seconds
- typeId:
The integral, unique identifier of the Type of this static DNS entry
PUT /api/4.0/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": 41
}
Response Structure
- address:
If
typeId
identifies aCNAME
type record, this is the Canonical Name (CNAME) of the server with a trailing period, otherwise it is the IP address to whichhost
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, integer that is the ID 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 aCNAME
type record, this is an alias for the CNAME of the server, otherwise it is the FQDN which shall resolve toaddress
- id:
An integral, unique identifier for this static DNS entry
- lastUpdated:
The date and time at which this static DNS entry was last updated
- ttl:
The 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
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=/; Expires=Mon, 18 Nov 2019 17:40:54 GMT; Max-Age=3600; 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": "CNAME_RECORD",
"typeId": 41
}}
DELETE
Delete staticdnsentries.
- Auth. Required:
Yes
- Roles Required:
“admin” or “operations”
- Permissions Required:
STATIC-DN:DELETE, STATIC-DN:READ, DELIVERY-SERVICE:READ, CACHE-GROUP:READ
- Response Type:
undefined
Request Structure
Name |
Description |
---|---|
id |
The integral, unique identifier of the static DNS entry to delete |
DELETE /api/4.0/staticdnsentries?id=2 HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...
Response Structure
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=/; Expires=Mon, 18 Nov 2019 17:40:54 GMT; Max-Age=3600; 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"
}
]}