voxel.voxcast.ondemand.content.populate

Force the CDN to acquire and cache one or more pieces of content. Generates an asynchronous transaction that can be checked with voxel.voxcast.ondemand.content.transaction_status. Before the populate request is accepted, HEAD requests are first sent to the origin for each path to verify the content exists and is accessible.

Parameters

device_id (required)
Numeric Voxel device id, available from voxel.devices.list
paths (required)
A newline-separated list of paths to the content, e.g., "/path/to/content1\n/path/to/content2\n...", with at most 500 paths

Example Response

<transaction>
	<type>populate</type>
	<id>b70664f0-d7f4-4dad-9d7a-a6e194b10768</id>
	<expiration>1223022229</expiration>
	<status>inprogress</status>
</transaction>

Notes

This method will cause several requests to the origin server, including a HEAD request for each object, followed by GET requests from several VoxCAST nodes. Obviously, if large files are being prepopulated, it may take some time for the transaction to complete. In addition, be aware that cache prepopulation requests are still subject to cache size limitations: if you try to populate the cache with 10 40 GB files, some of them will probably be purged from the cache according to VoxCAST's cache replacement policy; the same applies for content that was already in the cache prior to the prepopulation request.

Method Specific Error Codes

100: Unknown device
The device_id passed in can't be matched to a valid device.
101: Unknown location on device
The path specified was not found on the device.
203: Origin request failed (HTTP response code)
On trying to contact the origin, the HTTP error specified in parenthesis was received.
202: VoxCAST request failed (reason)
An error occurred in attempting the VoxCAST request. A reason may be specified in parenthesis.