Retrieves a list of Federation
mappings (i.e. Federation
Resolvers) for the current user.
- Auth. Required
Yes
- Roles Required
"admin", "Federation", "operations", "Portal", or "Steering"
- Permissions Required
FEDERATION-RESOLVER:READ, DELIVERY-SERVICE:READ
- Response Type
Array
No parameters available.
- deliveryService
The
xml_id
that uniquely identifies theDelivery Service
that uses the federation mappings inmappings
- mappings
An array of objects that represent the mapping of a
Federation
'sCNAME (Canonical Name)
to one or more Resolvers- cname
The actual CNAME used by the
Federation
- resolve4
An array of IPv4 addresses (or subnets in
CIDR (Classless Inter-Domain Routing)
notation) capable of resolving theFederation
's CNAME- resolve6
An array of IPv6 addresses (or subnets in
CIDR (Classless Inter-Domain Routing)
notation) capable of resolving theFederation
's CNAME- ttl
The
TTL (Time To Live)
of the CNAME in hours
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: d6Llm5qNc2sfgVH9IimW7hA4wvtBUq6EzUmpJf805kB0k6v2WysNgFEWK4hBXNdAYkr8hYuKPrwDy3tCx0OZ8Q==
X-Server-Name: traffic_ops_golang/
Date: Mon, 03 Dec 2018 17:19:13 GMT
Content-Length: 136
{ "response": [
{
"mappings": [
{
"ttl": 300,
"cname": "blah.blah.",
"resolve4": [
"0.0.0.0/32"
],
"resolve6": [
"::/128"
]
}
],
"deliveryService": "demo1"
}
]}
Allows a user to create Federation
Resolvers for Delivery Services
, providing the Delivery Service
is within a CDN that has some associated Federation
.
Warning
Confusingly, this method of this endpoint does not create a new Federation
; to do that, the to-api-cdns-name-federations
endpoint must be used. Furthermore, the Federation
must properly be assigned to a Delivery Service
using the to-api-federations-id-deliveryservices
and assigned to the user creating Resolvers using to-api-federations-id-users
.
The to-api-federations-id-federation_resolvers
endpoint duplicates this functionality.
- Auth. Required
Yes
- Roles Required
"admin", "Federation", "operations", "Portal", or "Steering"
- Permissions Required
FEDERATION-RESOLVER:CREATE, FEDERATION-RESOLVER:READ, DELIVERY-SERVICE:READ
- Response Type
Object (string)
The request payload is an array of objects that describe Delivery Service Federation
Resolver mappings. Each object in the array must be in the following format.
- deliveryService
The
ds-xmlid
of theDelivery Service
which will use theFederation
Resolvers specified inmappings
- mappings
An object containing two arrays of IP addresses (or subnets in
CIDR (Classless Inter-Domain Routing)
notation) to use asFederation
Resolvers- resolve4
An array of IPv4 addresses (or subnets in
CIDR (Classless Inter-Domain Routing)
notation) that can resolve theDelivery Service
'sFederation
- resolve6
An array of IPv6 addresses (or subnets in
CIDR (Classless Inter-Domain Routing)
notation) that can resolve theDelivery Service
'sFederation
POST /api/5.0/federations HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...
Content-Length: 118
Content-Type: application/json
[{
"deliveryService":"demo1",
"mappings":{
"resolve4":["127.0.0.1", "0.0.0.0/32"],
"resolve6":["::1", "5efa::ff00/128"]
}
}]
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: B7TSUOYZPRPyi3mVy+CuxiXR5k/d0s07w4i6kYzpWS+YL79juEfkuSqfedaYG/kMA8O9XbjkWRjcBAdxOVrdTQ==
X-Server-Name: traffic_ops_golang/
Date: Wed, 23 Oct 2019 22:28:02 GMT
Content-Length: 152
{ "alerts": [
{
"text": "admin successfully created federation resolvers.",
"level": "success"
}
],
"response": "admin successfully created federation resolvers."
}
Deletes all Federation
Resolvers associated with the logged-in user's Federations
.
- Auth. Required
Yes
- Roles Required
"admin", "Federation", "operations", "Portal", or "Steering"
- Permissions Required
FEDERATION-RESOLVER:DELETE
- Response Type
Object (string)
No parameters available
DELETE /api/5.0/federations HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...
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: fd7P45mIiHuYqZZW6+8K+YjY1Pe504Aaw4J4Zp9AhrqLX72ERytTqWtAp1msutzNSRUdUSC72+odNPtpv3O8uw==
X-Server-Name: traffic_ops_golang/
Date: Wed, 23 Oct 2019 23:34:53 GMT
Content-Length: 184
{ "alerts": [
{
"text": "admin successfully deleted all federation resolvers: [ 8.8.8.8 ]",
"level": "success"
}
],
"response": "admin successfully deleted all federation resolvers: [ 8.8.8.8 ]"
}
Replaces all Federations
Resolvers associated with a user's Delivery Service
(s) with those defined inside the request payload.
- Auth. Required
Yes
- Roles Required
"admin", "Federation", "operations", "Portal", or "Steering"
- Permissions Required
FEDERATION-RESOLVER:DELETE, FEDERATION-RESOLVER:CREATE, DELIVERY-SERVICE:READ
- Response Type
Object (string)
The request payload is an array of objects that describe Delivery Service Federation
Resolver mappings. Each object in the array must be in the following format.
- deliveryService
The
ds-xmlid
of theDelivery Service
which will use theFederation
Resolvers specified inmappings
- mappings
An object containing two arrays of IP addresses (or subnets in
CIDR (Classless Inter-Domain Routing)
notation) to use asFederation
Resolvers- resolve4
An array of IPv4 addresses (or subnets in
CIDR (Classless Inter-Domain Routing)
notation) that can resolve theDelivery Service
'sFederation
- resolve6
An array of IPv6 addresses (or subnets in
CIDR (Classless Inter-Domain Routing)
notation) that can resolve theDelivery Service
'sFederation
PUT /api/5.0/federations HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...
Content-Length: 95
Content-Type: application/json
[{ "mappings": {
"resolve4": ["8.8.8.8"],
"resolve6": []
},
"deliveryService":"demo1"
}]
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: *
Set-Cookie: mojolicious=...; Path=/; Expires=Mon, 18 Nov 2019 17:40:54 GMT; Max-Age=3600; HttpOnly
Whole-Content-Sha512: dQ5AvQULhc254zQwgUpBl1/CHbLr/clKtkbs0Ju9f1BM4xIfbbO3puFNN9zaEaZ1iz0lBvHFp/PgfUqisD3QHA==
X-Server-Name: traffic_ops_golang/
Date: Wed, 23 Oct 2019 23:22:03 GMT
Content-Length: 258
Content-Type: application/json
{ "alerts": [
{
"text": "admin successfully deleted all federation resolvers: [ 8.8.8.8 ]",
"level": "success"
},
{
"text": "admin successfully created federation resolvers.",
"level": "success"
}
],
"response": "admin successfully created federation resolvers."
}