Cache Group¶
/api/1.2/cachegroups¶
GET /api/1.2/cachegroups
Authentication Required: Yes
Role(s) Required: None
Request Query Parameters
Name Required Description typeno Filter cache groups by Type ID. Response Properties
Parameter Type Description idstring Local unique identifier for the Cache Group lastUpdatedstring The Time / Date this entry was last updated latitudestring Latitude for the Cache Group longitudestring Longitude for the Cache Group namestring The name of the Cache Group entry parentCachegroupIdstring Parent cachegroup ID. parentCachegroupNamestring Parent cachegroup name. secondaryParentCachegroupIdstring Secondary parent cachegroup ID. secondaryParentCachegroupNamestring Secondary parent cachegroup name. shortNamestring Abbreviation of the Cache Group Name typeIdstring Unique identifier for the ‘Type’ of Cache Group entry typeNamestring The name of the type of Cache Group entry fallbackToClosestbool Behaviour during non-availability/ failure of configured fallbacks Response Example
{ "response": [ { "id": "21", "lastUpdated": "2012-09-25 20:27:28", "latitude": "0", "longitude": "0", "name": "dc-chicago", "parentCachegroupId": null, "parentCachegroupName": null, "secondaryParentCachegroupId": null, "secondaryParentCachegroupName": null, "shortName": "dcchi", "typeName": "MID_LOC", "typeId": "4", "fallbackToClosest":true }, { "id": "22", "lastUpdated": "2012-09-25 20:27:28", "latitude": "0", "longitude": "0", "name": "dc-chicago-1", "parentCachegroupId": null, "parentCachegroupName": null, "secondaryParentCachegroupId": null, "secondaryParentCachegroupName": null, "shortName": "dcchi", "typeName": "MID_LOC", "typeId": "4", "fallbackToClosest":false } ], }
GET /api/1.2/cachegroups/trimmed
Authentication Required: Yes
Role(s) Required: None
Response Properties
Parameter Type Description namestring Response Example
{ "response": [ { "name": "dc-chicago" }, { "name": "dc-cmc" } ], }
GET /api/1.2/cachegroups/:id
Authentication Required: Yes
Role(s) Required: None
Response Properties
Parameter Type Description idstring Local unique identifier for the Cache Group lastUpdatedstring The Time / Date this entry was last updated latitudestring Latitude for the Cache Group longitudestring Longitude for the Cache Group namestring The name of the Cache Group entry parentCachegroupIdstring Parent cachegroup ID. parentCachegroupNamestring Parent cachegroup name. secondaryParentCachegroupIdstring Secondary parent cachegroup ID. secondaryParentCachegroupNamestring Secondary parent cachegroup name. shortNamestring Abbreviation of the Cache Group Name typeIdstring Unique identifier for the ‘Type’ of Cache Group entry typeNamestring The name of the type of Cache Group entry fallbackToClosestbool Behaviour during non-availability/ failure of configured fallbacks Response Example
{ "response": [ { "id": "21", "lastUpdated": "2012-09-25 20:27:28", "latitude": "0", "longitude": "0", "name": "dc-chicago", "parentCachegroupId": null, "parentCachegroupName": null, "secondaryParentCachegroupId": null, "secondaryParentCachegroupName": null, "shortName": "dcchi", "typeName": "MID_LOC", "typeId": "4", "fallbackToClosest":true } ], }
GET /api/1.2/cachegroups/:id/parameters
Authentication Required: Yes
Role(s) Required: None
Response Properties
Parameter Type Description idint Local unique identifier for the parameter namestring Name of the parameter valuestring Value of the parameter configFilestring Config file associated with the parameter securebool Is the parameter value only visible to admin users lastUpdatedstring The Time / Date this entry was last updated Response Example
{ "response": [ { "id": "1100", "name": "cgw.originUrl", "value": "http://to-short.g.foo.net/data/", "configFile": "foo.config", "secure": false, "lastUpdated": "2015-08-27 15:11:49" }, { ... } ] }
GET /api/1.2/cachegroups/:id/unassigned_parameters
Retrieves all parameters NOT assigned to the cache group.
Authentication Required: Yes
Role(s) Required: None
Request Route Parameters
Name Required Description idyes Cache group id Response Properties
Parameter Type Description last_updatedstring The Time / Date this server entry was last updated secureboolean When true, the parameter is accessible only by admin users. Defaults to false. valuestring The parameter value, only visible to admin if secure is true namestring The parameter name config_filestring The parameter config_file Response Example
{ "response": [ { "last_updated": "2012-09-17 21:41:22", "secure": false, "value": "0,1,2,3,4,5,6", "name": "Drive_Letters", "config_file": "storage.config" }, { "last_updated": "2012-09-17 21:41:22", "secure": true, "value": "STRING __HOSTNAME__", "name": "CONFIG proxy.config.proxy_name", "config_file": "records.config" } ], }
GET /api/1.2/cachegroup/:parameter_id/parameter
Authentication Required: Yes
Role(s) Required: None
Request Route Parameters
Name Required Description parameter_idyes Response Properties
Parameter Type Description cachegroupsarray >namestring >idstring Response Example
{ "response": { "cachegroups": [ { "name": "dc-chicago", "id": "21" }, { "name": "dc-cmc", "id": "22" } ] }, }
GET /api/1.2/cachegroupparameters
Authentication Required: Yes
Role(s) Required: None
Response Properties
Parameter Type Description cachegroupParametersarray A collection of cache group parameters. >parameterstring >lastUpdatedstring >cachegroupstring Response Example
{ "response": { "cachegroupParameters": [ { "parameter": "379", "lastUpdated": "2013-08-05 18:49:37", "cachegroup": "us-ca-sanjose" }, { "parameter": "380", "lastUpdated": "2013-08-05 18:49:37", "cachegroup": "us-ca-sanjose" }, { "parameter": "379", "lastUpdated": "2013-08-05 18:49:37", "cachegroup": "us-ma-woburn" } ] }, }
GET /api/1.2/cachegroups/:parameter_id/parameter/available
Authentication Required: Yes
Role(s) Required: None
Request Route Parameters
Name Required Description parameter_idyes Response Properties
Parameter Type Description nameidResponse Example
{ "response": [ { "name": "dc-chicago", "id": "21" }, { "name": "dc-cmc", "id": "22" } ], }
POST /api/1.2/cachegroups
Create cache group.
Authentication Required: Yes
Role(s) Required: admin or oper
Request Parameters
Name Required Description nameyes The name of the Cache Group entry shortNameyes Abbreviation of the Cache Group Name latitudeno Latitude for the Cache Group longitudeno Longitude for the Cache Group parentCachegroupno Name of Parent Cache Group entry. secondaryParentCachegroupno Name of Secondary Parent Cache Group entry. typeIdyes The type of Cache Group entry, “EDGE_LOC”, “MID_LOC” or “ORG_LOC” fallbackToClosestno Behaviour on configured fallbacks failure, true / false Request Example
{ "name": "cache_group_edge", "shortName": "cg_edge", "latitude": 12, "longitude": 45, "parentCachegroup": "cache_group_mid", "typeId": 6, "fallbackToClosest":true }Response Properties
Parameter Type Description idstring The id of cache group namestring The name of the Cache Group entry shortNamestring Abbreviation of the Cache Group Name latitudestring Latitude for the Cache Group longitudestring Longitude for the Cache Group parentCachegroupstring Name of Parent Cache Group entry. parentCachegroupIdstring id of Parent Cache Group entry. secondaryParentCachegroupstring Name of Secondary Parent Cache Group entry. secondaryParentCachegroupIdstring id of Secondary Parent Cache Group entry. typeNamestring The type of Cache Group entry, “EDGE_LOC”, “MID_LOC” or “ORG_LOC” fallbackToClosestbool Behaviour during non-availability/failure of configured fallbacks lastUpdatedstring The Time / Date this entry was last updated alertsarray A collection of alert messages. >levelstring Success, info, warning or error. >textstring Alert message. Response Example
{ "alerts": [ { "level": "success", "text": "Cachegroup successfully created: cache_group_edge" } ], "response": { 'longitude' : '45', 'lastUpdated' : '2016-01-25 13:55:30', 'shortName' : 'cg_edge', 'name' : 'cache_group_edge', 'parentCachegroup' : 'cache_group_mid', 'secondaryParentCachegroup' : null, 'latitude' : '12', 'typeName' : 'EDGE_LOC', 'id' : '104', 'parentCachegroupId' : '103', 'secondaryParentCachegroupId' : null, 'fallbackToClosest':true } }
PUT /api/1.2/cachegroups/{:id}
Update cache group.
Authentication Required: Yes
Role(s) Required: admin or oper
Request Route Parameters
Name Required Description id yes The id of the cache group to edit. Request Parameters
Name Required Description nameyes The name of the Cache Group entry shortNameyes Abbreviation of the Cache Group Name latitudeno Latitude for the Cache Group longitudeno Longitude for the Cache Group parentCachegroupno Name of Parent Cache Group entry. secondaryParentCachegroupno Name of Secondary Parent Cache Group entry. typeNameyes The type of Cache Group entry, “EDGE_LOC”, “MID_LOC” or “ORG_LOC” fallbackToClosestno Behaviour on configured fallbacks failure, true / false Request Example
{ "name": "cache_group_edge", "shortName": "cg_edge", "latitude": 12, "longitude": 45, "parentCachegroup": "cache_group_mid", "typeName": "EDGE_LOC", "fallbackToClosest":true }Response Properties
Parameter Type Description idstring The id of cache group namestring The name of the Cache Group entry shortNamestring Abbreviation of the Cache Group Name latitudestring Latitude for the Cache Group longitudestring Longitude for the Cache Group parentCachegroupstring Name of Parent Cache Group entry. parentCachegroupIdstring id of Parent Cache Group entry. secondaryParentCachegroupstring Name of Secondary Parent Cache Group entry. secondaryParentCachegroupIdstring id of Secondary Parent Cache Group entry. typeNamestring The type of Cache Group entry, “EDGE_LOC”, “MID_LOC” or “ORG_LOC” fallbackToClosestbool Behaviour during non-availability/failure of configured fallbacks lastUpdatedstring The Time / Date this entry was last updated alertsarray A collection of alert messages. >levelstring Success, info, warning or error. >textstring Alert message. Response Example
{ "alerts": [ { "level": "success", "text": "Cachegroup was updated: cache_group_edge" } ], "response": { 'longitude' : '45', 'lastUpdated' : '2016-01-25 13:55:30', 'shortName' : 'cg_edge', 'name' : 'cache_group_edge', 'parentCachegroup' : 'cache_group_mid', 'secondaryParentCachegroup' : null, 'latitude' : '12', 'typeName' : 'EDGE_LOC', 'id' : '104', 'parentCachegroupId' : '103', 'secondaryParentCachegroupId' : null, 'fallbackToClosest':true } }
DELETE /api/1.2/cachegroups/{:id}
Delete cache group. The request to delete a cache group, which has servers or child cache group, will be rejected.
Authentication Required: Yes
Role(s) Required: admin or oper
Request Route Parameters
Name Required Description id yes The id of the cache group to delete. Response Properties
Parameter Type Description alertsarray A collection of alert messages. >levelstring Success, info, warning or error. >textstring Alert message. Response Example
{ "alerts": [ { "level": "success", "text": "Cachegroup was deleted: cache_group_edge" } ], }
POST /api/1.2/cachegroups/{:id}/queue_update
Queue or dequeue updates for all servers assigned to a cache group limited to a specific CDN.
Authentication Required: Yes
Role(s) Required: admin or oper
Request Route Parameters
Name Required Description id yes the cachegroup id. Request Properties
Name Type Description action string queue or dequeue cdn string cdn name or cdn ID is required cdnId string cdn ID or cdn name is required Response Properties
Name Type Description action string The action processed, queue or dequeue. cachegroupId integer cachegroup id cachegroupName string cachegroup name cdn string cdn name serverNames array servers name array in the cachegroup in cdn Response Example
{ "response": { "cachegroupName": "us-il-chicago", "action": "queue", "serverNames": [ "atsec-chi-00", "atsec-chi-01", "atsec-chi-02", "atsec-chi-03", ], "cachegroupId": "93", "cdn": "cdn_number_1", } }
POST /api/1.2/cachegroups/{:id}/deliveryservices
Assign deliveryservices for servers in cachegroup
Authentication Required: Yes
Role(s) Required: admin or oper
Request Route Parameters
Name Required Description id yes The cachegroup id. Request Properties
Parameter Type Description deliveryServices array The Ids of the delivery services to assign to each server in the cachegroup. Request Example
{ "deliveryServices": [ 234, 235 ] }Response Properties
Parameter Type Description response hash The details of the assignment, if success. >id int The cachegroup id. >serverNames array The server name array in the cachegroup. >deliveryServices array The deliveryservice id array. alerts array A collection of alert messages. >level string Success, info, warning or error. >text string Alert message. Response Example
{ "response": { "id": 3, "serverNames": [ "atlanta-edge-01", "atlanta-edge-07" ], "deliveryServices": [ 234, 235 ] } "alerts": [ { "level": "success", "text": "Delivery services successfully assigned to all the servers of cache group 3." } ], }