deliveryservices/{{ID}}

PUT

Allows users to edit an existing Delivery Service.

Auth. Required:

Yes

Roles Required:

“admin” or “operations”[1]

Permissions Required:

DELIVERY-SERVICE:UPDATE, DELIVERY-SERVICE:READ, CDN:READ, TYPE:READ

Response Type:

Array (should always have a length of exactly one on success)

Request Structure

active:

A boolean that defines Active.

anonymousBlockingEnabled:

A boolean that defines Anonymous Blocking

ccrDnsTtl:

The DNS TTL - named “ccrDnsTtl” for legacy reasons

cdnId:

The integral, unique identifier of the CDN to which the Delivery Service belongs

Note

If the Delivery Service has SSL Keys, then cdnId is not allowed to change as that would invalidate the SSL Key

checkPath:

A Check Path

consistentHashRegex:

A Consistent Hashing Regular Expression

consistentHashQueryParams:

An array of Consistent Hashing Query Parameters

deepCachingType:

The Deep Caching setting for this Delivery Service

displayName:

The Display Name

dnsBypassCname:

A DNS Bypass CNAME

dnsBypassIp:

A DNS Bypass IP

dnsBypassIp6:

A DNS Bypass IPv6

dnsBypassTtl:

The DNS Bypass TTL

dscp:

A DSCP to be used within the Delivery Service

ecsEnabled:

A boolean that defines the EDNS0 Client Subnet Enabled setting on this Delivery Service

edgeHeaderRewrite:

A set of Edge Header Rewrite Rules

firstHeaderRewrite:

A set of First Header Rewrite Rules

fqPacingRate:

The Fair-Queuing Pacing Rate Bps

geoLimit:

An integer that defines the Geo Limit

geoLimitCountries:

A string containing a comma-separated list, or an array of strings defining the Geo Limit Countries[2]

geoLimitRedirectUrl:

A Geo Limit Redirect URL[2]

geoProvider:

The Geolocation Provider

globalMaxMbps:

The Global Max Mbps

globalMaxTps:

The Global Max TPS

httpBypassFqdn:

A HTTP Bypass FQDN

infoUrl:

An Info URL

initialDispersion:

The Initial Dispersion

innerHeaderRewrite:

A set of Inner Header Rewrite Rules

ipv6RoutingEnabled:

A boolean that defines the IPv6 Routing Enabled setting on this Delivery Service

lastHeaderRewrite:

A set of Last Header Rewrite Rules

logsEnabled:

A boolean that defines the Logs Enabled setting on this Delivery Service

longDesc:

The Long Description of this Delivery Service

maxDnsAnswers:

The Max DNS Answers allowed for this Delivery Service

maxOriginConnections:

The Max Origin Connections

midHeaderRewrite:

A set of Mid Header Rewrite Rules

missLat:

The Geo Miss Default Latitude used by this Delivery Service

missLong:

The Geo Miss Default Longitude used by this Delivery Service

multiSiteOrigin:

A boolean that defines the use of Use Multi-Site Origin Feature by this Delivery Service

orgServerFqdn:

The Origin Server Base URL

originShield:

A Origin Shield string

profileId:

An optional ID of the Profile with which this Delivery Service will be associated

protocol:

An integral, unique identifier that corresponds to the Protocol used by this Delivery Service

qstringIgnore:

An integral, unique identifier that corresponds to the Query String Handling setting on this Delivery Service

rangeRequestHandling:

An integral, unique identifier that corresponds to the Range Request Handling setting on this Delivery Service

regexRemap:

A Regex Remap Expression

regional:

A boolean value defining the Regional setting on this Delivery Service

regionalGeoBlocking:

A boolean defining the Regional Geoblocking setting on this Delivery Service

remapText:

Raw Remap Text

requiredCapabilities:

An array of the capabilities that this Delivery Service requires.

New in version 4.1.

routingName:

The Routing Name of this Delivery Service

Note

If the Delivery Service has SSL Keys, then routingName is not allowed to change as that would invalidate the SSL Key

signed:

true if and only if signingAlgorithm is not null, false otherwise

signingAlgorithm:

Either a Signing Algorithm or null to indicate URL/URI signing is not implemented on this Delivery Service

rangeSliceBlockSize:

An integer that defines the byte block size for the ATS Slice Plugin. It can only and must be set if rangeRequestHandling is set to 3. It can only be between (inclusive) 262144 (256KB) - 33554432 (32MB).

sslKeyVersion:

This integer indicates the SSL Key Version

tenantId:

The integral, unique identifier of the Tenant who owns this Delivery Service

tlsVersions:

An array of explicitly supported TLS Versions

New in version 4.0.

topology:

The unique name of the Topology that this Delivery Service is assigned to

trRequestHeaders:

If defined, this defines the Traffic Router Log Request Headers used by Traffic Router for this Delivery Service

trResponseHeaders:

If defined, this defines the Traffic Router Additional Response Headers used by Traffic Router for this Delivery Service

typeId:

The integral, unique identifier of the Type of this Delivery Service

xmlId:

This Delivery Service’s xml_id

Note

While this field must be present, it is not allowed to change; this must be the same as the xml_id the Delivery Service already has. This should almost never be different from the Delivery Service’s displayName.

#753 Request Example
PUT /api/4.1/deliveryservices/6 HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: python-requests/2.24.0
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
Cookie: mojolicious=...
Content-Length: 1585
Content-Type: application/json

{
    "active": false,
    "anonymousBlockingEnabled": false,
    "ccrDnsTtl": null,
    "cdnId": 2,
    "checkPath": null,
    "consistentHashRegex": null,
    "consistentHashQueryParams": [],
    "deepCachingType": "NEVER",
    "displayName": "test",
    "dnsBypassCname": null,
    "dnsBypassIp": null,
    "dnsBypassIp6": null,
    "dnsBypassTtl": null,
    "dscp": 0,
    "ecsEnabled": true,
    "edgeHeaderRewrite": null,
    "firstHeaderRewrite": null,
    "fqPacingRate": null,
    "geoLimit": 0,
    "geoLimitCountries": null,
    "geoLimitRedirectUrl": null,
    "geoProvider": 0,
    "globalMaxMbps": null,
    "globalMaxTps": null,
    "httpBypassFqdn": null,
    "infoUrl": null,
    "initialDispersion": 1,
    "innerHeaderRewrite": null,
    "ipv6RoutingEnabled": false,
    "lastHeaderRewrite": null,
    "logsEnabled": true,
    "longDesc": "A Delivery Service created expressly for API documentation examples",
    "maxDnsAnswers": null,
    "missLat": 0,
    "missLong": 0,
    "maxOriginConnections": 0,
    "maxRequestHeaderBytes": 131072,
    "midHeaderRewrite": null,
    "multiSiteOrigin": false,
    "orgServerFqdn": "http://origin.infra.ciab.test",
    "originShield": null,
    "profileId": null,
    "protocol": 0,
    "qstringIgnore": 0,
    "rangeRequestHandling": 0,
    "regexRemap": null,
    "regional": false,
    "regionalGeoBlocking": false,
    "requiredCapabilities": [],
    "routingName": "test",
    "serviceCategory": null,
    "signed": false,
    "signingAlgorithm": null,
    "rangeSliceBlockSize": null,
    "sslKeyVersion": null,
    "tenant": "root",
    "tenantId": 1,
    "tlsVersions": null,
    "topology": null,
    "trRequestHeaders": null,
    "trResponseHeaders": null,
    "type": "HTTP",
    "typeId": 1,
    "xmlId": "test"
}

Response Structure

active:

A boolean that defines Active.

anonymousBlockingEnabled:

A boolean that defines Anonymous Blocking

ccrDnsTtl:

The DNS TTL - named “ccrDnsTtl” for legacy reasons

cdnId:

The integral, unique identifier of the CDN to which the Delivery Service belongs

cdnName:

Name of the CDN to which the Delivery Service belongs

checkPath:

A Check Path

consistentHashRegex:

A Consistent Hashing Regular Expression

consistentHashQueryParams:

An array of Consistent Hashing Query Parameters

deepCachingType:

The Deep Caching setting for this Delivery Service

displayName:

The Display Name

dnsBypassCname:

A DNS Bypass CNAME

dnsBypassIp:

A DNS Bypass IP

dnsBypassIp6:

A DNS Bypass IPv6

dnsBypassTtl:

The DNS Bypass TTL

dscp:

A DSCP to be used within the Delivery Service

ecsEnabled:

A boolean that defines the EDNS0 Client Subnet Enabled setting on this Delivery Service

edgeHeaderRewrite:

A set of Edge Header Rewrite Rules

exampleURLs:

An array of Example URLs

firstHeaderRewrite:

A set of First Header Rewrite Rules

fqPacingRate:

The Fair-Queuing Pacing Rate Bps

geoLimit:

An integer that defines the Geo Limit

geoLimitCountries:

An array of strings defining the Geo Limit Countries

geoLimitRedirectUrl:

A Geo Limit Redirect URL

geoProvider:

The Geolocation Provider

globalMaxMbps:

The Global Max Mbps

globalMaxTps:

The Global Max TPS

httpBypassFqdn:

A HTTP Bypass FQDN

id:

An integral, unique identifier for this Delivery Service

infoUrl:

An Info URL

initialDispersion:

The Initial Dispersion

innerHeaderRewrite:

A set of Inner Header Rewrite Rules

ipv6RoutingEnabled:

A boolean that defines the IPv6 Routing Enabled setting on this Delivery Service

lastHeaderRewrite:

A set of Last Header Rewrite Rules

lastUpdated:

The date and time at which this Delivery Service was last updated, in RFC 3339 format

Changed in version 4.0: Prior to API version 4.0, this property used Traffic Ops’s Custom Date/Time Format.

logsEnabled:

A boolean that defines the Logs Enabled setting on this Delivery Service

longDesc:

The Long Description of this Delivery Service

matchList:

The Delivery Service’s Match List

pattern:

A regular expression - the use of this pattern is dependent on the type field (backslashes are escaped)

setNumber:

An integer that provides explicit ordering of Match List items - this is used as a priority ranking by Traffic Router, and is not guaranteed to correspond to the ordering of items in the array.

type:

The type of match performed using pattern.

maxDnsAnswers:

The Max DNS Answers allowed for this Delivery Service

maxOriginConnections:

The Max Origin Connections

maxRequestHeaderBytes:

The Max Request Header Bytes

midHeaderRewrite:

A set of Mid Header Rewrite Rules

missLat:

The Geo Miss Default Latitude used by this Delivery Service

missLong:

The Geo Miss Default Longitude used by this Delivery Service

multiSiteOrigin:

A boolean that defines the use of Use Multi-Site Origin Feature by this Delivery Service

orgServerFqdn:

The Origin Server Base URL

originShield:

A Origin Shield string

profileDescription:

The Description of the Profile with which this Delivery Service is associated

profileId:

The ID of the Profile with which this Delivery Service is associated

profileName:

The Name of the Profile with which this Delivery Service is associated

protocol:

An integral, unique identifier that corresponds to the Protocol used by this Delivery Service

qstringIgnore:

An integral, unique identifier that corresponds to the Query String Handling setting on this Delivery Service

rangeRequestHandling:

An integral, unique identifier that corresponds to the Range Request Handling setting on this Delivery Service

regexRemap:

A Regex Remap Expression

regional:

A boolean value defining the Regional setting on this Delivery Service

regionalGeoBlocking:

A boolean defining the Regional Geoblocking setting on this Delivery Service

requiredCapabilities:

An array of the capabilities that this Delivery Service requires.

New in version 4.1.

remapText:

Raw Remap Text

serviceCategory:

The name of the Service Category with which the Delivery Service is associated

signed:

true if and only if signingAlgorithm is not null, false otherwise

signingAlgorithm:

Either a Signing Algorithm or null to indicate URL/URI signing is not implemented on this Delivery Service

rangeSliceBlockSize:

An integer that defines the byte block size for the ATS Slice Plugin. It can only and must be set if rangeRequestHandling is set to 3.

sslKeyVersion:

This integer indicates the SSL Key Version

tenantId:

The integral, unique identifier of the Tenant who owns this Delivery Service

tlsVersions:

An array of explicitly supported TLS Versions

New in version 4.0.

topology:

The unique name of the Topology that this Delivery Service is assigned to

trRequestHeaders:

If defined, this defines the Traffic Router Log Request Headers used by Traffic Router for this Delivery Service

trResponseHeaders:

If defined, this defines the Traffic Router Additional Response Headers used by Traffic Router for this Delivery Service

type:

The Type of this Delivery Service

typeId:

The integral, unique identifier of the Type of this Delivery Service

xmlId:

This Delivery Service’s xml_id

#754 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-Encoding: gzip
Content-Type: application/json
Permissions-Policy: interest-cohort=()
Set-Cookie: mojolicious=...; Path=/; Expires=Tue, 08 Jun 2021 00:34:04 GMT; Max-Age=3600; HttpOnly
Vary: Accept-Encoding
Whole-Content-Sha512: tTncbRoJR+pyykVbEc6nWyoFnhlJzsbge9hVZfw+WK28rzSGECZ/Q4zXTQtFjHWY5G+0Rk4w9GKrSFK3k+u5Ng==
X-Server-Name: traffic_ops_golang/
Date: Mon, 07 Jun 2021 23:34:04 GMT
Content-Length: 840

{ "alerts": [
    {
        "text": "Delivery Service update was successful",
        "level": "success"
    }
],
"response": [{
    "active": false,
    "anonymousBlockingEnabled": false,
    "ccrDnsTtl": null,
    "cdnId": 2,
    "cdnName": null,
    "checkPath": null,
    "consistentHashQueryParams": [],
    "consistentHashRegex": null,
    "deepCachingType": "NEVER",
    "displayName": "test",
    "dnsBypassCname": null,
    "dnsBypassIp": null,
    "dnsBypassIp6": null,
    "dnsBypassTtl": null,
    "dscp": 0,
    "ecsEnabled": true,
    "edgeHeaderRewrite": null,
    "exampleURLs": null,
    "firstHeaderRewrite": null,
    "fqPacingRate": null,
    "geoLimit": 0,
    "geoLimitCountries": null,
    "geoLimitRedirectURL": null,
    "geoProvider": 0,
    "globalMaxMbps": null,
    "globalMaxTps": null,
    "httpBypassFqdn": null,
    "id": 6,
    "infoUrl": null,
    "initialDispersion": 1,
    "innerHeaderRewrite": null,
    "ipv6RoutingEnabled": false,
    "lastHeaderRewrite": null,
    "lastUpdated": "2021-06-07T23:34:04.831215Z",
    "logsEnabled": true,
    "longDesc": "A Delivery Service created expressly for API documentation examples",
    "matchList": [
        {
            "type": "HOST_REGEXP",
            "setNumber": 0,
            "pattern": ".*\\.test\\..*"
        }
    ],
    "maxDnsAnswers": null,
    "maxOriginConnections": 0,
    "maxRequestHeaderBytes": 131072,
    "midHeaderRewrite": null,
    "missLat": 0,
    "missLong": 0,
    "multiSiteOrigin": false,
    "originShield": null,
    "orgServerFqdn": "http://origin.infra.ciab.test",
    "profileDescription": null,
    "profileId": null,
    "profileName": null,
    "protocol": 0,
    "qstringIgnore": 0,
    "rangeRequestHandling": 0,
    "rangeSliceBlockSize": null,
    "regexRemap": null,
    "regional": false,
    "regionalGeoBlocking": false,
    "remapText": null,
    "requiredCapabilities": [],
    "routingName": "test",
    "serviceCategory": null,
    "signed": false,
    "signingAlgorithm": null,
    "sslKeyVersion": null,
    "tenant": "root",
    "tenantId": 1,
    "tlsVersions": null,
    "topology": null,
    "trResponseHeaders": null,
    "trRequestHeaders": null,
    "type": "HTTP",
    "typeId": 1,
    "xmlId": "test"
}]}

DELETE

Deletes the target Delivery Service

Auth. Required:

Yes

Roles Required:

“admin” or “operations”[1]

Permissions Required:

DELIVERY-SERVICE:DELETE, DELIVERY-SERVICE:READ, CDN:READ, TYPE:READ

Response Type:

undefined

Request Structure

Table 313 Request Path Parameters

Name

Description

ID

The integral, unique identifier of the Delivery Service to be deleted

#755 Request Example
DELETE /api/4.1/deliveryservices/2 HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...

Response Structure

#756 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: w9NlQpJJEl56r6iYq/fk8o5WfAXeUS5XR9yDHvKUgPO8lYEo8YyftaSF0MPFseeOk60dk6kQo+MLYTDIAhhRxw==
X-Server-Name: traffic_ops_golang/
Date: Tue, 20 Nov 2018 14:56:37 GMT
Content-Length: 57

{ "alerts": [
    {
        "text": "ds was deleted.",
        "level": "success"
    }
]}