Get List of CDN Resources
To see all CDN resources in the cloud, use the following request:
GET /cdn_resources.xml
GET /cdn_resources.json
XML Request Example
curl -i -X GET -u user:userpass http://onapp.test/cdn_resources.xml
JSON Request Example
curl -i -X GET -u user:userpass http://onapp.test/cdn_resources.json
To view the list of HTTP resources, use the following request:
XML Request Example
curl -i -X GET -u user:userpass http://onapp.test/cdn_resources.xml?type=http
JSON Request Example
curl -i -X GET -u user:userpass http://onapp.test/cdn_resources.json?type=http
To view the list of VoD resources, use the following request:
XML Request Example
curl -i -X GET -u user:userpass http://onapp.test/cdn_resources.xml?type=vod
JSON Request Example
curl -i -X GET -u user:userpass http://onapp.test/cdn_resources.json?type=vod
To view the list of live streaming resources, use the following request:
XML Request Example
curl -i -X GET -u user:userpass http://onapp.test/cdn_resources.xml?type=live_streaming
JSON Request Example
curl -i -X GET -u user:userpass http://onapp.test/cdn_resources.json?type=live_streaming
XML Output Example
<cdn_resources type="array"> <cdn_resource> <cdn_hostname>cdn.1example.com</cdn_hostname> <cdn_ssl_certificate_id nil="true"/> <cname>990113320.r.worldcdn-beta.net</cname> <created_at type="datetime">2012-05-10T14:19:02+00:00</created_at> <id type="integer">2</id> <resource_type>HTTP_PULL</resource_type> <updated_at type="datetime">2012-05-10T14:19:02+00:00</updated_at> <user_id type="integer">1</user_id> <last_24h_cost type="float">0.0</last_24h_cost> <cname>990113320.r.worldcdn-beta.net</cname> <origins type="array"> <origin> <key/> <value>1example.com</value> </origin> </origins> </cdn_resource> ... <cdn_resource></cdn_resource> ... </cdn_resources>
Where:
cdn_hostname - the hostname which will serve static content
cdn_ssl_certificate_id - the ID of the custom SNI SSL certificate added to the resource
cname - CNAME record
created_at – the date when the CDN resource was created in the [YYYY][MM][DD]T[hh][mm][ss]Z format
id – the resource ID in the database
resource_type – CDN resource type
updated_at – the date when the CDN resource was updated in the [YYYY][MM][DD]T[hh][mm][ss]Z format
user_id – the ID of the user, who owns the resource
last_24h_cost - the amount due for the last 24 hours
cdn_reference - ID of the SSL certificate on the remote Aflexi server
origins – an array of CDN origins with the following parameters:
origin – the path from which the CDN requests the content
key – access key, if any
value – the path to the content