Assigns all of the "assignable" servers within a :term:`Cache Group` to one or more :term:`Delivery Services`.
Note
"Assignable" here means all of the :ref:`Cache Group's servers <cache-group-servers>` that have a :term:`Type` that matches one of the glob patterns EDGE*
or ORG*
. If even one server of any :term:`Type` exists within the :term:`Cache Group` that is not assigned to the same CDN as the :term:`Delivery Service` to which an attempt is being made to assign them, the request will fail.
Auth. Required: | Yes |
---|---|
Roles Required: | "admin" or "operations" |
Permissions Required: | CACHE-GROUP:UPDATE, DELIVERY-SERVICE:UPDATE, CACHE-GROUP:READ, DELIVERY-SERVICE:READ |
Response Type: | Object |
deliveryServices: | The integral, unique identifiers of the :term:`Delivery Services` to which the :ref:`Cache Group's servers <cache-group-servers>` are being assigned |
---|
POST /api/5.0/cachegroups/8/deliveryservices HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...
Content-Length: 25
Content-Type: application/json
{"deliveryServices": [2]}
deliveryServices: | An array of integral, unique identifiers for :term:`Delivery Services` to which the :ref:`Cache Group's servers <cache-group-servers>` have been assigned |
---|---|
id: | An integer that is the :ref:`Cache Group's ID <cache-group-id>` |
serverNames: | An array of the (short) hostnames of all of the :term:`Cache Group`'s "assignable" :ref:`cache-group-servers` |
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: j/yH0gvJoaGjiLZU/0MA8o5He20O4aJ5wh1eF9ex6F6IBO1liM9Wk9RkWCw7sdiUHoy13/mf7gDntisZwzP7yw==
X-Server-Name: traffic_ops_golang/
Date: Wed, 14 Nov 2018 19:54:17 GMT
Content-Length: 183
{ "alerts": [
{
"text": "Delivery services successfully assigned to all the servers of cache group 8.",
"level": "success"
}
],
"response": {
"id": 8,
"serverNames": [
"foo"
],
"deliveryServices": [
2
]
}}