Assigns all of the “assignable” servers within a Cache Group to one or more Delivery Services.


“Assignable” here means all of the Cache Group’s servers that have a Type that matches one of the glob patterns EDGE* or ORG*. If even one server of any Type exists within the Cache Group that is not assigned to the same CDN as the Delivery Service to which an attempt is being made to assign them, the request will fail.

Auth. Required:


Roles Required:

“admin” or “operations”

Response Type:


Request Structure


The integral, unique identifiers of the Delivery Services to which the Cache Group’s servers are being assigned

#222 Request Example
POST /api/3.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]}

Response Structure


An array of integral, unique identifiers for Delivery Services to which the Cache Group’s servers have been assigned


An integer that is the Cache Group’s ID


An array of the (short) hostnames of all of the Cache Group’s “assignable” Servers

#223 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=/; 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": [
    "deliveryServices": [