Loads (i.e., caches) an asset on our edge servers.
Key information:
There is a default limit of 50 concurrent load requests at any given time. Exceeding this limit will generate a 400 Bad Request.
All outstanding load requests count towards this concurrent load request limit. This includes load requests submitted via the MCC, the Load Content endpoint, or the Bulk Load Content endpoint.
With regards to bulk loads, each specified URL counts as a separate load request. For example, each element defined in the MediaPath array of the Bulk Load Content endpoint counts as a separate load request.
An asset should only be loaded a single time per unique combination of platform and protocol.
If a load request is limited to a specific region, then an asset should be loaded a single time per unique combination of platform, protocol, and region.
A short period of time may elapse before an asset is cached across our entire network. However, a successful request will immediately return an ID in the response. Find out the current status of your load request(s) by passing this ID to:
More information on loading content.
A request to load an asset is described below.
HTTP Method | Request URI |
---|---|
PUT |
https://api.transactcdn.com/v2/mcc/customers/AccountNumber/edge/load |
Define the following variable when submitting the above request.
VariableA variable represents a value that must be replaced. A variable consists of either a URL segment (e.g., "0001" in /0001/) or a query string value (e.g., "3" in mediaTypes=3). | Description |
---|---|
Required |
|
This endpointIdentifies a request's connection point to our REST API service. only takes advantage of common request headers.
Pass the following request body parameters:
Name | Data Type | Description |
---|---|---|
EdgeNodeRegionIds |
Array |
Defines the set of regions to which the load request will be applied. Set this parameter to the desired region ID(s). Use a comma to delimit multiple regions. Regional loading is designed to meet specialized cache management needs. When in doubt, load content to all regions. Omitting this parameter will apply the load request to the entire network (i.e., all regions). View example.
JSON: EdgeNodeRegionIds: [3,4], XML: <EdgeNodeRegionIds> <int xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">3</int> <int xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">4</int> </EdgeNodeRegionIds> Retrieve a list of regions and their corresponding system-defined IDs through the Get Load/Purge Regions endpoint. Although the response for the Get Load/Purge Regions endpoint includes the POPs (i.e., edge nodes) associated with each region and their system-defined IDs, the EdgeNodeRegionIds request parameter only accepts the system-defined IDs for load/purge regions. |
MediaPath Required |
String |
Identifies the CDN or edge CNAME URL corresponding to the asset that will be loaded to our edge servers. Include the appropriate protocol (e.g., http://) when specifying this URL. |
MediaType Required |
Integer |
Indicates the service for which an asset will be loaded. It should be replaced with the ID associated with the desired service.
|
The response to the above request includes an HTTP status code, response headers, and a response body.
A status code indicates whether the request was successfully performed.
The response for this endpoint only includes standard HTTP response headers.
The response body for a successful request contains the following response parameter:
Name | Data Type | Description |
---|---|---|
Id |
String |
Reports the unique number assigned to the load request. Pass this load ID to the Get Load Request endpoint to track the status of this load request. |
The response body for an unsuccessful request may contain an error parameter that provides additional information.
A sample JSON request is provided below.
PUT https://api.transactcdn.com/v2/mcc/customers/0001/edge/load HTTP/1.1
Authorization: TOK:12345678-1234-1234-1234-1234567890ab
Accept: application/json
Content-Type: application/json
Host:api.transactcdn.com
Content-Length: 92
{ "MediaPath" : "http:\/\/can.0001.transactcdn.com\/000001\/WebPage.htm", "MediaType" : 14 }
A sample JSON response is provided below.
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8
Date: Thu, 15 Apr 2021 12:00:00 GMT
Content-Length: 33
{ "Id" : "170fe3a9d4c54d012f680e3c" }
A sample XML request is provided below.
PUT https://api.transactcdn.com/v2/mcc/customers/0001/edge/load HTTP/1.1
Authorization: TOK:12345678-1234-1234-1234-1234567890ab
Accept: application/xml
Content-Type: application/xml
Host:api.transactcdn.com
Content-Length: 193
<MediaContentLoad xmlns="http://www.whitecdn.com/schemas/apiservices/"> <MediaPath>http://can.0001.transactcdn.com/000001/WebPage.htm</MediaPath> <MediaType>14</MediaType> </MediaContentLoad>
A sample XML response is provided below.
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Date: Thu, 15 Apr 2021 12:00:00 GMT
Content-Length: 155
<LoadId xmlns="http://www.whitecdn.com/schemas/apiservices/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <Id>170fe3a9d4c54d012f680e3c</Id> </LoadId>