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:

Object

Changed in version 5.0: In earlier API versions, this would return an array containing the single Delivery Service modified. It is now simply the object itself. This is tracked by Issue #6904.

Request Structure

active:

The Delivery Service’s Active state

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:

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

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

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.

#1227 Request Example
PUT /api/5.0/deliveryservices/3 HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: python-requests/2.25.1
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
Cookie: access_token=...; mojolicious=...
Content-Length: 1548
Content-Type: application/json

{
    "active": "ACTIVE",
    "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,
    "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:

The Delivery Service’s Active state

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

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

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

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

#1228 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=Thu, 29 Sep 2022 22:55:09 GMT; Max-Age=3600; HttpOnly, access_token=...; Path=/; Expires=Thu, 29 Sep 2022 22:55:09 GMT; Max-Age=3600; HttpOnly
Vary: Accept-Encoding
X-Server-Name: traffic_ops_golang/
Date: Thu, 29 Sep 2022 21:55:09 GMT
Content-Length: 838

{ "alerts": [
    {
        "text": "Delivery Service update was successful",
        "level": "success"
    }
],
"response": {
    "active": "ACTIVE",
    "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": 3,
    "infoUrl": null,
    "initialDispersion": 1,
    "innerHeaderRewrite": null,
    "ipv6RoutingEnabled": false,
    "lastHeaderRewrite": null,
    "lastUpdated": "2022-09-29T21:55:09.170596Z",
    "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,
    "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 494 Request Path Parameters

Name

Description

ID

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

#1229 Request Example
DELETE /api/5.0/deliveryservices/3 HTTP/1.1
User-Agent: python-requests/2.25.1
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
Cookie: access_token=...; mojolicious=...
Content-Length: 0

Response Structure

#1230 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=Thu, 29 Sep 2022 22:59:08 GMT; Max-Age=3600; HttpOnly, access_token=...; Path=/; Expires=Thu, 29 Sep 2022 22:59:08 GMT; Max-Age=3600; HttpOnly
Vary: Accept-Encoding
X-Server-Name: traffic_ops_golang/
Date: Thu, 29 Sep 2022 21:59:08 GMT
Content-Length: 161

{ "alerts": [
    {
        "text": "ds was deleted.",
        "level": "success"
    },
    {
        "text": "Perform a CDN snapshot then queue updates on all servers in the cdn for the changes to take effect.",
        "level": "info"
    }
]}