Update Cache Group
- Auth. Required
Yes
- Roles Required
"admin" or "operations"
- Response Type
Object
Parameter | Description |
---|---|
ID | The cache-group-id of a Cache Group |
- fallbacks
An optional field which, when present, should contain an array of strings that are the
Names <cache-group-name>
of otherCache Groups
which will be thecache-group-fallbacks
1- fallbackToClosest
A boolean that sets the
cache-group-fallback-to-closest
behavior of theCache Group
2
Note
The default value of
fallbackToClosest
istrue
, and if it isnull
Traffic Control components will still interpret it as though it weretrue
.
- latitude
An optional field which, if present, should be a floating-point number that will define the
cache-group-latitude
for theCache Group
3- localizationMethods
Array of
cache-group-localization-methods
(as strings)
Tip
This field has no defined meaning if the
cache-group-type
identified bytypeId
is not "EDGE_LOC".
- longitude
An optional field which, if present, should be a floating-point number that will define the
cache-group-longitude
for theCache Group
4- name
The
cache-group-name
of theCache Group
- parentCachegroupId
An optional field which, if present, should be an integer that is the
cache-group-id
of acache-group-parent
for thisCache Group
.- secondaryParentCachegroupId
An optional field which, if present, should be an integral, unique identifier for this
Cache Group
's secondary parent- shortName
An abbreviation of the
name
- typeId
An integral, unique identifier for the
Cache Group's Type <cache-group-type>
Note
The actual, integral, unique identifiers for these
Types
must first be obtained, generally viato-api-v3-types
.
PUT /api/3.0/cachegroups/8 HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...
Content-Length: 118
Content-Type: application/json
{
"latitude": 0.0,
"longitude": 0.0,
"name": "test",
"fallbacks": [],
"fallbackToClosest": true,
"shortName": "test",
"typeId": 23,
"localizationMethods": ["GEO"]
}
- fallbacks
An array of strings that are
Cache Group names <cache-group-name>
that are registered ascache-group-fallbacks
for thisCache Group
5- fallbackToClosest
A boolean value that defines the
cache-group-fallback-to-closest
behavior of thisCache Group
6- id
An integer that is the
cache-group-id
of theCache Group
- lastUpdated
The time and date at which this entry was last updated in
non-rfc-datetime
- latitude
A floating-point
cache-group-latitude
for theCache Group
- localizationMethods
An array of
cache-group-localization-methods
as strings- longitude
A floating-point
cache-group-longitude
for theCache Group
- name
A string containing the
cache-group-name
of theCache Group
- parentCachegroupId
An integer that is the
cache-group-id
of thisCache Group
'scache-group-parent
- ornull
if it doesn't have acache-group-parent
- parentCachegroupName
A string containing the
cache-group-name
of thisCache Group
'scache-group-parent
- ornull
if it doesn't have acache-group-parent
- secondaryParentCachegroupId
An integer that is the
cache-group-id
of thisCache Group
'scache-group-secondary-parent
- ornull
if it doesn't have acache-group-secondary-parent
- secondaryParentCachegroupName
A string containing the
cache-group-name
of thisCache Group
'scache-group-secondary-parent
Cache Group
- ornull
if it doesn't have acache-group-secondary-parent
- shortName
A string containing the
cache-group-short-name
of theCache Group
- typeId
An integral, unique identifier for the '
Type
' of theCache Group
- typeName
A string that names the
cache-group-type
of thisCache Group
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: t1W65/2kj25QyHt0Ib0xpBaAR2sXu2kOsRZ49WjKZp/AK5S1YWhX7VNWCuUGiN1VNM4QRNqODC/7ewhYDFUncA==
X-Server-Name: traffic_ops_golang/
Date: Wed, 14 Nov 2018 19:14:28 GMT
Content-Length: 385
{ "alerts": [
{
"text": "cachegroup was updated.",
"level": "success"
}
],
"response": {
"id": 8,
"name": "test",
"shortName": "test",
"latitude": 0,
"longitude": 0,
"parentCachegroupName": null,
"parentCachegroupId": null,
"secondaryParentCachegroupName": null,
"secondaryParentCachegroupId": null,
"fallbacks": [],
"fallbackToClosest": true,
"localizationMethods": [
"GEO"
],
"typeName": "EDGE_LOC",
"typeId": 23,
"lastUpdated": "2018-11-14 19:14:28+00"
}}
Delete a Cache Group
. A Cache Group
which has assigned servers or is the cache-group-parent
of one or more other Cache Groups
cannot be deleted.
- Auth. Required
Yes
- Roles Required
"admin" or "operations"
- Response Type
undefined
Parameter | Description |
---|---|
ID | The cache-group-id of a Cache Group to be deleted |
DELETE /api/3.0/cachegroups/42 HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...
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: 5jZBgO7h1eNF70J/cmlbi3Hf9KJPx+WLMblH/pSKF3FWb/10GUHIN35ZOB+lN5LZYCkmk3izGbTFkiruG8I41Q==
X-Server-Name: traffic_ops_golang/
Date: Wed, 14 Nov 2018 20:31:04 GMT
Content-Length: 57
{ "alerts": [
{
"text": "cachegroup was deleted.",
"level": "success"
}
]}
Traffic Router will first check for a
fallbacks
array and, when that is empty/unset/all theCache Groups
in it are also unavailable, will subsequently check forfallbackToClosest
. If that istrue
, then it falls back to the geographically closestCache Group
capable of serving the same content or, when it isfalse
/no suchCache Group
exists/saidCache Group
is also unavailable, will respond to clients with a failure response indicating the problem.↩Traffic Router will first check for a
fallbacks
array and, when that is empty/unset/all theCache Groups
in it are also unavailable, will subsequently check forfallbackToClosest
. If that istrue
, then it falls back to the geographically closestCache Group
capable of serving the same content or, when it isfalse
/no suchCache Group
exists/saidCache Group
is also unavailable, will respond to clients with a failure response indicating the problem.↩While these fields are technically optional, note that if they are not specified many things may break. For this reason, Traffic Portal requires them when creating or editing
Cache Groups
.↩While these fields are technically optional, note that if they are not specified many things may break. For this reason, Traffic Portal requires them when creating or editing
Cache Groups
.↩Traffic Router will first check for a
fallbacks
array and, when that is empty/unset/all theCache Groups
in it are also unavailable, will subsequently check forfallbackToClosest
. If that istrue
, then it falls back to the geographically closestCache Group
capable of serving the same content or, when it isfalse
/no suchCache Group
exists/saidCache Group
is also unavailable, will respond to clients with a failure response indicating the problem.↩Traffic Router will first check for a
fallbacks
array and, when that is empty/unset/all theCache Groups
in it are also unavailable, will subsequently check forfallbackToClosest
. If that istrue
, then it falls back to the geographically closestCache Group
capable of serving the same content or, when it isfalse
/no suchCache Group
exists/saidCache Group
is also unavailable, will respond to clients with a failure response indicating the problem.↩