Skip to content

Latest commit

 

History

History
223 lines (191 loc) · 11 KB

deliveryservices_id.rst

File metadata and controls

223 lines (191 loc) · 11 KB

deliveryservices/{{ID}}

PUT

Allows users to edit an existing Delivery Service.

Auth. Required

Yes

Roles Required

"admin" or "operations"1

Response Type

NOT PRESENT - Despite returning a 200 OK response (rather than e.g. a 204 NO CONTENT response), this endpoint does not return a representation of the modified resource in its payload, and instead returns nothing - not even a success message.

Request Structure

active

A boolean that defines ds-active.

anonymousBlockingEnabled

A boolean that defines ds-anonymous-blocking

cacheurl

A ds-cacheurl

ATCv3.0 This field has been deprecated in Traffic Control 3.x and is subject to removal in Traffic Control 4.x or later

ccrDnsTtl

The ds-dns-ttl - named "ccrDnsTtl" for legacy reasons

cdnId

The integral, unique identifier of the ds-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 ds-check-path

consistentHashRegex

A ds-consistent-hashing-regex

consistentHashQueryParams

An array of ds-consistent-hashing-qparams

deepCachingType

The ds-deep-caching setting for this Delivery Service

displayName

The ds-display-name

dnsBypassCname

A ds-dns-bypass-cname

dnsBypassIp

A ds-dns-bypass-ip

dnsBypassIp6

A ds-dns-bypass-ipv6

dnsBypassTtl

The ds-dns-bypass-ttl

dscp

A ds-dscp to be used within the Delivery Service

ecsEnabled

A boolean that defines the ds-ecs setting on this Delivery Service

edgeHeaderRewrite

A set of ds-edge-header-rw-rules

firstHeaderRewrite

A set of ds-first-header-rw-rules

fqPacingRate

The ds-fqpr

geoLimit

An integer that defines the ds-geo-limit

geoLimitCountries

A string containing a comma-separated list defining the ds-geo-limit-countries

geoLimitRedirectUrl

A ds-geo-limit-redirect-url

geoProvider

The ds-geo-provider

globalMaxMbps

The ds-global-max-mbps

globalMaxTps

The ds-global-max-tps

httpBypassFqdn

A ds-http-bypass-fqdn

infoUrl

An ds-info-url

initialDispersion

The ds-initial-dispersion

innerHeaderRewrite

A set of ds-inner-header-rw-rules

ipv6RoutingEnabled

A boolean that defines the ds-ipv6-routing setting on this Delivery Service

lastHeaderRewrite

A set of ds-last-header-rw-rules

logsEnabled

A boolean that defines the ds-logs-enabled setting on this Delivery Service

longDesc

The ds-longdesc of this Delivery Service

longDesc1

An optional field containing the 2nd long description of this Delivery Service

longDesc2

An optional field containing the 3rd long description of this Delivery Service

maxDnsAnswers

The ds-max-dns-answers allowed for this Delivery Service

maxOriginConnections

The ds-max-origin-connections

midHeaderRewrite

A set of ds-mid-header-rw-rules

missLat

The ds-geo-miss-default-latitude used by this Delivery Service

missLong

The ds-geo-miss-default-longitude used by this Delivery Service

multiSiteOrigin

A boolean that defines the use of ds-multi-site-origin by this Delivery Service

orgServerFqdn

The ds-origin-url

originShield

A ds-origin-shield string

profileId

An optional profile-id of the ds-profile with which this Delivery Service will be associated

protocol

An integral, unique identifier that corresponds to the ds-protocol used by this Delivery Service

qstringIgnore

An integral, unique identifier that corresponds to the ds-qstring-handling setting on this Delivery Service

rangeRequestHandling

An integral, unique identifier that corresponds to the ds-range-request-handling setting on this Delivery Service

regexRemap

A ds-regex-remap

regionalGeoBlocking

A boolean defining the ds-regionalgeo setting on this Delivery Service

remapText

ds-raw-remap

routingName

The ds-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 ds-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 ds-ssl-key-version

tenantId

The integral, unique identifier of the ds-tenant who owns this Delivery Service

topology

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

trRequestHeaders

If defined, this defines the ds-tr-req-headers used by Traffic Router for this Delivery Service

trResponseHeaders

If defined, this defines the ds-tr-resp-headers used by Traffic Router for this Delivery Service

typeId

The integral, unique identifier of the ds-types of this Delivery Service

xmlId

This Delivery Service's ds-xmlid

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.

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

{
    "active": true,
    "anonymousBlockingEnabled": false,
    "cdnId": 2,
    "cdnName": "CDN-in-a-Box",
    "deepCachingType": "NEVER",
    "displayName": "demo",
    "dscp": 0,
    "ecsEnabled": true,
    "geoLimit": 0,
    "geoProvider": 0,
    "initialDispersion": 1,
    "ipv6RoutingEnabled": false,
    "lastUpdated": "2018-11-14 18:21:17+00",
    "logsEnabled": true,
    "longDesc": "A Delivery Service created expressly for API documentation examples",
    "missLat": -1,
    "missLong": -1,
    "multiSiteOrigin": false,
    "orgServerFqdn": "http://origin.infra.ciab.test",
    "protocol": 0,
    "qstringIgnore": 0,
    "rangeRequestHandling": 0,
    "regionalGeoBlocking": false,
    "routingName": "video",
    "signed": false,
    "tenant": "root",
    "tenantId": 1,
    "typeId": 1,
    "xmlId": "demo1"
}

Response Structure

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: *
Set-Cookie: mojolicious=...; Path=/; Expires=Mon, 18 Nov 2019 17:40:54 GMT; Max-Age=3600; HttpOnly
Whole-Content-Sha512: z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg==
X-Server-Name: traffic_ops_golang/
Date: Tue, 20 Nov 2018 14:12:25 GMT
Content-Length: 0
Content-Type: text/plain; charset=utf-8

DELETE

Deletes the target Delivery Service

Auth. Required

Yes

Roles Required

"admin" or "operations"2

Response Type

undefined

Request Structure

Request Path Parameters
Name Description
ID The integral, unique identifier of the Delivery Service to be deleted
DELETE /api/3.0/deliveryservices/2 HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...

Response Structure

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"
    }
]}

  1. Only those Delivery Services assigned to Tenants that are the requesting user's Tenant or children thereof will appear in the output of a GET request, and the same constraints are placed on the allowed values of the tenantId field of a PUT request to update a new Delivery Service. Furthermore, the only Delivery Services a user may delete are those assigned to a Tenant that is either the same Tenant as the user's Tenant, or a descendant thereof.

  2. Only those Delivery Services assigned to Tenants that are the requesting user's Tenant or children thereof will appear in the output of a GET request, and the same constraints are placed on the allowed values of the tenantId field of a PUT request to update a new Delivery Service. Furthermore, the only Delivery Services a user may delete are those assigned to a Tenant that is either the same Tenant as the user's Tenant, or a descendant thereof.