cdns/{{name}}/federations

GET

Retrieves a list of federations in use by a specific CDN.

Auth. Required:

Yes

Roles Required:

None

Permissions Required:

CDN:READ, FEDERATION:READ, DELIVERY-SERVICE:READ

Response Type:

Array

Request Structure

Table 466 Request Path Parameters

Name

Description

name

The name of the CDN for which Federations will be listed

Table 467 Request Query Parameters

Name

Description

id

Return only the Federation that has this ID

cname

Return only those Federations that have this CNAME

dsID

Return only those Federations assigned to a Delivery Service that has this ID

xmlID

Return only those Federations assigned to a Delivery Service that has this xml_id

orderby

Choose the ordering of the results - must be the name of one of the fields of the objects in the response array

sortOrder

Changes the order of sorting. Either ascending (default or “asc”) or descending (“desc”)

limit

Choose the maximum number of results to return

offset

The number of results to skip before beginning to return results. Must use in conjunction with limit

page

Return the nth page of results, where “n” is the value of this parameter, pages are limit long and the first page is 1. If offset was defined, this query parameter has no effect. limit must be defined to make use of page.

#1164 Request Example
GET /api/5.0/cdns/CDN-in-a-Box/federations HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.62.0
Accept: */*
Cookie: mojolicious=...

Response Structure

cname:

The CNAME used by the Federation

deliveryService:

An object with keys that provide identifying information for the Delivery Service using this Federation

id:

The integral, unique identifier for the Delivery Service

xmlID:

The Delivery Service’s uniquely identifying xml_id

Changed in version 5.0: Prior to version 5, this field was known by the name xmlId - improperly formatted camelCase.

description:

A human-readable description of the Federation. This can be null as well as an empty string.

lastUpdated:

The date and time at which this Federation was last modified, in RFC 3339 format

Changed in version 5.0: In earlier versions of the API, this field was given in Traffic Ops’s Custom Date/Time Format.

ttl:

TTL for the cname, in hours

#1165 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: SJA7G+7G5KcOfCtnE3Dq5DCobWtGRUKSppiDkfLZoG5+paq4E1aZGqUb6vGVsd+TpPg75MLlhyqfdfCHnhLX/g==
x-server-name: traffic_ops_golang/
content-length: 170
date: Wed, 05 Dec 2018 00:35:40 GMT

{ "response": [
    {
        "id": 1,
        "cname": "test.quest.",
        "ttl": 68,
        "description": "A test federation",
        "lastUpdated": "2018-12-05T00:05:16Z",
        "deliveryService": {
            "id": 1,
            "xmlID": "demo1"
        }
    }
]}

POST

Creates a new Federation.

Caution

Despite the URL of this endpoint, this does **not** create a Federation within any particular CDN. A Federation is associated with a CDN purely because any Delivery Service to which it is assigned is scoped to a CDN. Therefore, upon creation a Federation is not associated with any CDN in particular.

Warning

There is no restriction on using the special “ALL” CDN for Federations - but this is highly discouraged, because many things treat that CDN specially and may not work properly if it is used as though it were a normal CDN.

Auth. Required:

Yes

Roles Required:

“admin”

Permissions Required:

FEDERATION:CREATE, FEDERATION:READ, CDN:READ

Response Type:

Object

Request Structure

Table 468 Request Path Parameters

Name

Description

name

The name of the CDN for which a new Federation will be created

cname:

The CNAME used by the Federation

Tip

The CNAME must end with a “.

description:

An optional description of the federation

ttl:

Time to Live (TTL) for the name record used for cname - minimum of 60

Changed in version 5.0: In earlier API versions, there is no enforced minimum (although Traffic Portal would never allow a value under 60).

#1166 Request Example
POST /api/5.0/cdns/CDN-in-a-Box/federations HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.62.0
Accept: */*
Cookie: mojolicious=...
Content-Length: 72
Content-Type: application/json

{
    "cname": "test.quest.",
    "ttl": 68,
    "description": "A test federation"
}

Response Structure

id:

The integral, unique identifier of the Federation

cname:

The CNAME used by the Federation

description:

The description of the Federation

lastUpdated:

The date and time at which this federation was last modified, in RFC 3339 format

Changed in version 5.0: In earlier versions of the API, this field was given in Traffic Ops’s Custom Date/Time Format.

ttl:

TTL for the cname, in hours

#1167 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: rRsWAIhXzVlj8Hy+8aFjp4Jo1QGTK49m0N1AP5QDyyAZ1TfNIdgtcgiuehu7FiN1IPWRFiv6D9CygFYKGcVDOw==
x-server-name: traffic_ops_golang/
content-length: 192
date: Wed, 05 Dec 2018 00:05:16 GMT

{ "alerts": [
    {
        "text": "Federation was created",
        "level": "success"
    }
],
"response": {
    "id": 1,
    "cname": "test.quest.",
    "ttl": 68,
    "description": "A test federation",
    "lastUpdated": "2018-12-05T00:05:16Z"
}}