federations/{{ID}}/deliveryservices

GET

Retrieves Delivery Services assigned to a Federation.

Auth. Required:

Yes

Roles Required:

None

Response Type:

Array

Request Structure

Table 176 Request Path Parameters

Name

Description

ID

The integral, unique identifier for the federation to be inspected

Table 177 Request Query Parameters

Name

Required

Description

dsID

no

Show only the Delivery Service identified by this integral, unique identifier

orderby

no

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

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 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.

#375 Request Example
GET /api/3.0/federations/1/deliveryservices HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.62.0
Accept: */*
Cookie: mojolicious=...

Response Structure

cdn:

The CDN to which this Delivery Service Belongs

id:

The integral, unique identifier for the Delivery Service

type:

The routing type used by this Delivery Service

xmlId:

The ‘xml_id’ which uniquely identifies this Delivery Service

#376 Response Example
HTTP/1.1 200 OK
access-control-allow-credentials: true
access-control-allow-headers: Origin, X-Requested-With, Content-Type, Accept
access-control-allow-methods: POST,GET,OPTIONS,PUT,DELETE
access-control-allow-origin: *
cache-control: no-cache, no-store, max-age=0, must-revalidate
content-type: application/json
date: Wed, 05 Dec 2018 00:44:13 GMT
X-Server-Name: traffic_ops_golang/
set-cookie: mojolicious=...; expires=Wed, 05 Dec 2018 04:44:13 GMT; path=/; HttpOnly
vary: Accept-Encoding
whole-content-sha512: 7Y9Q/qHeXfbjJduvucRCR85wf4VRfyYhlK59sNRkzIJuwnsMhFcEfYfNqrvELwfexOum/VEX2f/1oa+I/edGfw==
content-length: 74

{ "response": [
    {
        "xmlId": "demo1",
        "cdn": "CDN-in-a-Box",
        "type": "HTTP",
        "id": 1
    }
]}

POST

Assigns one or more Delivery Services to a federation.

Auth. Required:

Yes

Roles Required:

“admin”

Response Type:

Object

Request Structure

Table 178 Request Path Parameters

Name

Description

ID

The integral, unique identifier for the federation to be inspected

dsIds:

An array of integral, unique identifiers for Delivery Services which will be assigned to this federation

replace:

An optional boolean (default: false) which, if true, will cause any conflicting assignments already in place to be overridden by this request

Note

If replace is not given (and/or not true), then any conflicts with existing assignments will cause the entire operation to fail.

#377 Request Example
POST /api/3.0/federations/1/deliveryservices HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.62.0
Accept: */*
Cookie: mojolicious=...
Content-Length: 32
Content-Type: application/json

{
    "dsIds": [1],
    "replace": true
}

Response Structure

dsIds:

An array of integral, unique identifiers for Delivery Services which are now assigned to this federation

replace:

An optional boolean (default: false) which, if true, means any conflicting assignments already in place were overridden by this request

#378 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: rVd0nx8G3bRI8ub1zw6FTdmwQ7jer4zoqzOZf5tC1ckrR0HEIOH1Azdcmvv0FVE5I0omcHVnrYbzab7tUtmnog==
x-server-name: traffic_ops_golang/
content-length: 137
date: Wed, 05 Dec 2018 00:34:06 GMT

{ "alerts": [
    {
        "text": "1 delivery service(s) were assigned to the federation 1",
        "level": "success"
    }
],
"response": {
    "dsIds": [
        1
    ],
    "replace": true
}}