Get List of CDN Locations
To get an array of CDN locations set up within your cloud, use the following request:
GET /settings/cdn_locations.xml
GET /settings/cdn_locations.json
XML Request Example
curl -i -X GET -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user:userpass --url http://onapp.test/settings/cdn_locations.xml
JSON Request Example
curl -i -X GET -H 'Accept: application/json' -H 'Content-type: application/json' -u user:userpass --url http://onapp.test/settings/cdn_locations.json
XML Output Example
<cdn_locations type="array"> <cdn_location> <city>Mexicali</city> <country>Mexico</country> <created_at type="datetime">2014-09-22T16:30:36+03:00</created_at> <id type="integer">1</id> <location_group_id type="integer">1</location_group_id> <updated_at type="datetime">2014-09-23T16:46:35+03:00</updated_at> <cdn_reference type="integer">331</cdn_reference> </cdn_location> </cdn_locations>
Where:
city - the CDN location city
country - the CDN location country
created_at - the date in the [YYYY][MM][DD]T[hh][mm][ss]Z format
id - the CDN location ID
updated_at - the date when the location group was updated in the [YYYY][MM][DD]T[hh][mm][ss]Z format
cdn_reference - the location ID in OnApp Dashboard
location_group_id - the ID of the location group to which this CDN location is attached