Skip to content

Latest commit

 

History

History
173 lines (145 loc) · 7.68 KB

federations_id_deliveryservices.rst

File metadata and controls

173 lines (145 loc) · 7.68 KB

federations/{{ID}}/deliveryservices

GET

Retrieves :term:`Delivery Services` assigned to a :term:`Federation`.

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

Request Structure

Request Path Parameters
Name Description
ID The integral, unique identifier for the federation to be inspected
Request Query Parameters
Name Required Description
dsID no Show only the :term:`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.
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 :term:`Delivery Service` Belongs
id:The integral, unique identifier for the :term:`Delivery Service`
type:The routing type used by this :term:`Delivery Service`
xmlId:The 'xml_id' which uniquely identifies this :term:`Delivery Service`
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 :term:`Delivery Services` to a federation.

Auth. Required:Yes
Roles Required:"admin"
Response Type:Object

Request Structure

Request Path Parameters
Name Description
ID The integral, unique identifier for the federation to be inspected
dsIds:

An array of integral, unique identifiers for :term:`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.

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 :term:`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
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
}}