Skip to content

Latest commit

 

History

History
82 lines (67 loc) · 2.92 KB

deliveryservices_xmlid_servers.rst

File metadata and controls

82 lines (67 loc) · 2.92 KB

deliveryservices/{{xml_id}}/servers

POST

Assigns cache servers to a Delivery Service.

Auth. Required

Yes

Roles Required

"admin" or "operations"1

Response Type

Object

Request Structure

Request Path Parameters
Name Description
xml_id The 'xml_id' of the Delivery Service whose server assignments are being edited
serverNames

An array of hostname of cache servers to assign to this Delivery Service

POST /api/3.0/deliveryservices/test/servers HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...
Content-Length: 24
Content-Type: application/json

{ "serverNames": [ "edge" ] }

Response Structure

xml_id

The ds-xmlid of the Delivery Service to which the servers in serverNames have been assigned

serverNames

An array of hostnames of cache servers assigned to Delivery Service identified by xml_id

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: zTpLrWiLM4xRsm8mlBQFB5KzT478AjloSyXHgtyWhebCv1YIwWltmkjr0HFgc3GMGZODt+fyzkOYy5Zl/yBtJw==
X-Server-Name: traffic_ops_golang/
Date: Tue, 20 Nov 2018 15:21:50 GMT
Content-Length: 52

{ "response": {
    "serverNames": [
        "edge"
    ],
    "xmlId": "test"
}}

  1. Users can only assign servers to Delivery Services that are visible to their Tenant.