NetDNA is a content delivery network ("CDN") provider.
-
Sign up for a free NetDNA developer account.
-
Create a new application.
-
Integrate with our RESTful API using your language wrapper:
- Node (NPM) https://github.com/netdna/node-netdna
- .NET https://github.com/netdna/netdnarws-net
- Ruby https://github.com/netdna/netdnarws-ruby
- Python https://github.com/netdna/netdnarws
- PHP https://github.com/netdna/netdnarws-php
- Perl https://github.com/netdna/netdnarws-perl
Follow the documentation for our API below!
- Have a question? Check out our Knowledge Base to see if your question has already been answered.
- Still need help? Visit our Contact Page to get in touch.
- Found a Bug? Visit our GitHub Issues page to report it.
- Feel free to tweet and follow us @NetDNADeveloper and/or @NetDNAStatus.
- 2013-07-22 Added JSON responses to SSL
- 2013-07-09 Added Authentication section
- 2013-06-03 Fixed formatting and display issues
- 2013-06-02 Added Ruby Code examples
- 2013-05-31 Added Python Code examples
- 2013-05-29 Added Node Code examples
- 2013-05-28 Added response examples
- 2013-05-25 Added PHP Code examples
- 2013-03-29 Added "Bad Request" for Purges without file(s) parameter in body
- 2013-03-14 Added .ie to the TLD Validation
- 2013-03-12 Added single file Purge to use cURL multi
- 2013-03-12 Fixed SSL Update Bug
- 2013-03-08 cURL Multi Purge Files
- 2013-03-07 Fix 3-legged OAuth Restriction
- 2013-01-16 Fixed SSL Bug
- 2012-12-05 Added 2xx_hit calculation to all
statuscodebyfilename
Reports - 2012-02-27 Released Alpha Version of RWS API.
The first thing to do in order to use the NetDNA REST Web Service is to register your application. Upon registration, your application will be issued a consumer key and secret which is similar to public and private keys used in ssh protocol. You will need to use this in conjunction with an OAuth library in the programming language of your choice.
OAuth defines three roles: client, server, and resource owner (nicknamed the OAuth Love Triangle by Leah Culver).
The NetDNA RWS supports both 2-legged and 3-legged authentication.
3-legged OAuth is best used to allow a 3rd party apps/services (e.g. Leftronic) access to a users profile - the user just needs to grant access to the app.
2-legged OAuth is more limited in that it only allows a consumer access to resources that belong to it (this is also useful for building a 3rd party app or a control panel where the consumer is a reseller or an account with sub-accounts - this means the reseller/main account also has access to sub-account resources). This does not require any user intervention in the process.
3-legged OAuth describes the scenario for which OAuth was originally developed: a resource owner wants to give a client access to a server without sharing his credentials (i.e. username/password). On a conceptual level it works in the following way:
- Client has signed up to the server and got his client credentials (also known as "consumer key and secret") ahead of time
- User wants to give the client access to his protected resources on the server
- Client retrieves the temporary credentials (also known as "request token") from the server
- Client redirects the resource owner to the server
- Resource owner grants the client access to his protected resources on the server
- Server redirects the user back to the client
- Client uses the temporary credentials to retrieve the token credentials (also known as "access token") from the server
- Client uses the token credentials to access the protected resources on the server
2-legged OAuth describes a typical client-server scenario, without any user involvement.
On a conceptual level 2-legged OAuth simply consists of the first and last steps of 3-legged OAuth:
- Client has signed up to the server and got his client credentials (also known as "consumer key and secret"
- Client uses his client credentials (and empty token credentials) to access the protected resources on the server
Login and go to https://developer.netdna.com/api/apps/create
All OAuth 1.0a requests use the same basic algorithm for creating a signature base string and a signature.
The first step to authenticating a user is to obtain a request token from NetDNA.
The end point for requesting a token is https://rws.netdna.com/oauth/request_token.
The authorize step is where you send the user to the NetDNA RWS authorization page that will allow them to grant your application privileges to use their account with the API. You will need the oauth_token from the previous step to complete this.
The endpoint for the authorization url is https://rws.netdna.com/oauth/authorize
Parameter | Description |
---|---|
{companyalias} | The alias you used when creating your account |
{zone_type} | The type of zone you are making a request on - one of push,pull, vod, or live |
{report_type} | The format you want the reports summarized by - one of hourly,daily, or monthly. This value can be left blank to receive thetotals ungrouped. |
Gets account information
Parameter | Description |
--- | --- | ---
id
| Account ID |
name
| The name of your account |
address_id
| Address ID |
alias
| Company Alias |
ssl_credits
| SSL Credits |
flex_credits
| Flex Location Credits |
date_created
| Date Created |
date_updated
| Date Updated |
api.get("/account.json")
api.get("/account.json")
$api->get('/account.json');
api.get('/account.json', callback) function callback(err, response) { if (err) return console.log(err) console.log(response) }
{ "code": 200, "data": { "account": { "alias": "aliasname", "date_created": "2013-05-15 17:32:30", "date_updated": "2013-05-15 19:43:36", "edgerules_credits": "0", "flex_credits": "-1", "id": "#####", "name": "NetDNA sampleCode", "secure_token_pull_credits": "0", "server_id": "18", "ssl_credits": "1", "status": "2", "storage_quota": "107374182400", "storage_server_id": "11", "zone_credits": "-1" } } }
Updates account information
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
name
| - | required
length: 1-30 chars | The name of your account |
Parameter | Description |
--- | --- | ---
id
| Account ID |
name
| The name of your account |
address_id
| Address ID |
alias
| Company Alias |
ssl_credits
| SSL Credits |
flex_credits
| Flex Location Credits |
date_created
| Date Created |
date_updated
| Date Updated |
params={"name"=> "UserName"} api.put('/account.json',params)
params={"name": "Monty"} api.put('/account.json',params=params)
$params = array("name"=>"newName"); $api->put('/account.json',$params);
api.put('/account.json', { name: 'newName' }, callback) function callback(err, response) { if (err) return console.log(err) console.log(response) }
{ "code": 200, "data": { "account": { "alias": "aliasname", "date_created": "2013-05-15 17:32:30", "date_updated": "2013-05-23 17:58:27", "edgerules_credits": "0", "flex_credits": "-1", "id": "#####", "name": "newName", "secure_token_pull_credits": "0", "server_id": "18", "ssl_credits": "-1", "status": "2", "storage_quota": "107374182400", "storage_server_id": "11", "zone_credits": "-1" } } }
Gets account address information
Parameter | Description |
--- | --- | ---
id
| Address ID |
street1
| Street Address Line 1 |
street2
| Street Address Line 2 |
city
| City |
state
| State |
zip
| ZIP |
country
| Country Code |
date_created
| Date Created |
date_updated
| Date Updated |
api.get('/account.json/address')
api.get('/account.json/address')
$api->get('/account.json/address')
api.get('/account.json/address', callback) function callback(err, response) { if (err) return console.log(err) console.log(response) }
{ "code": 200, "data": { "address": { "city": "los angeles", "country": "US", "date_created": "0000-00-00 00:00:00", "date_updated": "2013-05-15 19:54:40", "id": "#####", "state": "CA", "street1": "123 Main Street", "street2": "apt 42", "zip": "90068" } } }
Updates account address information
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
street1
| - | length: 1-200 chars | Street Address Line 1 |
street2
| - | length: 1-200 chars | Street Address Line 2 |
city
| - | length: 1-50 chars | City |
state
| - | length: 1-50 chars | State |
zip
| - | length: 3-5 chars; only digits accepted | ZIP |
country
| - | length: 2 chars | Country Code |
Parameter | Description |
--- | --- | ---
id
| Address ID |
street1
| Street Address Line 1 |
street2
| Street Address Line 2 |
city
| City |
state
| State |
zip
| ZIP |
country
| Country Code |
date_created
| Date Created |
date_updated
| Date Updated |
params = {"street1"=> "1234 Main Street", "street2"=> "apt 42", "state"=> "CA"} api.put('/account.json/address',params)
params = {"street1": "1234 Main Street", "street2": "apt 42", "state": "CA"} api.put('/account.json/address',params=params)
$params = array("street1"=>"123 Main Street", "street2"=>"apt 42", "state"=>"CA"); $api->put('/account.json/address',$params);
api.put('/account.json/address', { street1: '123 Main Street', street2: 'apt 42', state: 'CA' }, callback) function callback(err, response) { if (err) return console.log(err) console.log(response) }
{ "code": 200, "data": { "address": { "city": "los angeles", "country": "US", "date_created": "0000-00-00 00:00:00", "date_updated": "2013-05-23 18:01:29", "id": "#####", "state": "CA", "street1": "1234 Main Street", "street2": "apt 42", "zip": "90068" } } }
Returns a list of all users on the specified account
Parameter | Description |
--- | --- | ---
id
| User ID |
email
| Email Address |
firstname
| First Name |
lastname
| Last Name |
phone
| Phone Number |
timezone
| User's Timezone |
date_last_login
| The date and time the user last logged into the system |
ip_last_login
| The IP for the user at the last login |
date_created
| Date Created |
date_updated
| Date Updated |
roles
| An array of roles for the given user |
api.get('/users.json')
api.get('/users.json')
$api->get('/users.json');
api.get('/users.json', callback) function callback(err, response) { if (err) return console.log(err) console.log(response) }
{ "code": 200, "data": { "current_page_size": 4, "page": 1, "page_size": "50", "pages": 1, "total": 4, "users": [ { "brand_id": "1", "date_created": "2013-05-15 17:32:30", "date_last_login": "2013-05-23 17:54:18", "date_updated": "2013-05-15 17:33:09", "default_company_id": "#####", "email": "[email protected]", "firstname": "Given", "id": "33706", "ip_last_login": "12.13.90.183", "isadmin": "0", "isdisabled": "0", "lastname": "Family", "phone": "3235551400", "roles": [ "User", "Account Owner" ], "timezone": "Europe/London" }, { "brand_id": "1", "date_created": "2013-05-15 20:16:34", "date_last_login": null, "date_updated": "0000-00-00 00:00:00", "default_company_id": "19538", "email": "[email protected]", "firstname": "Captain", "id": "33714", "ip_last_login": null, "isadmin": "0", "isdisabled": "0", "lastname": "Hammer", "phone": null, "roles": [ "User" ], "timezone": "Europe/London" }, { "brand_id": "1", "date_created": "2013-05-15 20:20:03", "date_last_login": null, "date_updated": "2013-05-15 20:31:05", "default_company_id": "19538", "email": "[email protected]", "firstname": "Billy", "id": "33716", "ip_last_login": null, "isadmin": "0", "isdisabled": "0", "lastname": "Horrible", "phone": null, "roles": [ "User" ], "timezone": "Europe/London" } ] } }
Creates a new user on the specified account
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
email
| - | required
length: 6-200 chars; valid email address | Email Address |
password
| - | required
length: 5-30 chars | Password |
firstname
| - | required
length: 1-32 chars | First Name |
lastname
| - | required
length: 1-32 chars | Last Name |
phone
| - | length: 7, 10, 11, or 14 chars; only digits considered | Phone Number |
timezone
| - | valid::timezone | Valid timezone (see List ofSupported Timezones) |
Parameter | Description |
--- | --- | ---
id
| User ID |
email
| Email Address |
firstname
| First Name |
lastname
| Last Name |
phone
| Phone Number |
timezone
| User's Timezone |
date_last_login
| The date and time the user last logged into the system |
ip_last_login
| The IP for the user at the last login |
date_created
| Date Created |
date_updated
| Date Updated |
roles
| An array of roles for the given user |
params={"email"=>"[email protected]","password"=>"password","firstname"=>"Given","lastname"=>"Family"} api.post('/users.json',params )
params={'email':'[email protected]','password':'password','firstname':'Given','lastname':'Family'} api.post('/users.json',data=params )
$params = array("email"=>"[email protected]","password"=>"password","firstname"=>"Given","lastname"=>"Family"); $api->post('/users.json',$params );
api.post('/users.json', { email: '[email protected]', password: 'password', firstname: 'Given', lastname: 'Family' }, callback) function callback(err, response) { if (err) return console.log(err) console.log(response) }
{ "code": 201, "data": { "user": { "brand_id": null, "date_created": "2013-05-23 18:22:11", "date_last_login": null, "date_updated": null, "default_company_id": "19538", "email": "[email protected]", "firstname": "Given", "id": 33941, "ip_last_login": null, "isadmin": 0, "isdisabled": 0, "lastname": "Family", "phone": null, "roles": [ "User" ], "timezone": "America/Los_Angeles" } } }
Gets a user specified by the {user_id} parameter
Parameter | Description |
--- | --- | ---
id
| User ID |
email
| Email Address |
firstname
| First Name |
lastname
| Last Name |
phone
| Phone Number |
timezone
| User's Timezone |
id = '33706' api.get('/users.json/'+id)
id = '33706' api.get('/users.json/'+id)
$id = '33941'; $api->get('/users.json/'.$id);
var id = '33941' api.get('/users.json/' + id, callback) function callback(err, response) { if (err) return console.log(err) console.log(response) }
{ "code": 200, "data": { "user": { "brand_id": "1", "date_created": "2013-05-23 18:22:11", "date_last_login": null, "date_updated": "0000-00-00 00:00:00", "default_company_id": "19538", "email": "[email protected]", "firstname": "Given", "id": "33941", "ip_last_login": null, "isadmin": "0", "isdisabled": "0", "lastname": "Family", "phone": null, "roles": [ "User" ], "timezone": "Europe/London" } } }
Updates a user specified by the {user_id} parameter
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
email
| - | length: 6-200 chars; valid email address | Email Address |
firstname
| - | length: 1-32 chars | First Name |
lastname
| - | length: 1-32 chars | Last Name |
phone
| - | length: 7, 10, 11, or 14 chars; only digits considered | Phone Number |
timezone
| - | valid::timezone | Valid timezone (see List ofSupported Timezones) |
Parameter | Description |
--- | --- | ---
id
| User ID |
email
| Email Address |
firstname
| First Name |
lastname
| Last Name |
phone
| Phone Number |
timezone
| User's Timezone |
id = '33706' params={'firstname'=> 'name'} api.put('/users.json/'+id,params)
api.put('/users.json/'+id,params={'firstname': 'name'})
$id = '33941'; $params = array("firstname"=>"Billy"); $api->put('/users.json/'.$id,$params);
var id = '33941' api.put('/users.json/' + id, { firstname: 'Billy' }, callback) function callback(err, response) { if (err) return console.log(err) console.log(response) }
{ "code": 200, "data": { "user": { "brand_id": "1", "date_created": "2013-05-23 18:22:11", "date_last_login": null, "date_updated": "2013-05-23 19:10:09", "default_company_id": "19538", "email": "[email protected]", "firstname": "Billy", "id": "33941", "ip_last_login": null, "isadmin": "0", "isdisabled": "0", "lastname": "Family", "phone": null, "roles": [ "User" ], "timezone": "Europe/London" } } }
Deletes a user specified by the {user_id} parameter
id = '33706' api.delete('/users.json/'+id)
id = '33706' api.delete('/users.json/'+id)
$id = '33715'; $api->delete('/users.json/'.$id);
var id = '33715' api.del('/users.json/' + id, callback) function callback(err, response) { if (err) return console.log(err) console.log(response) }
{ "code":200 }
Returns a list of all zones on the specified account
api.get('/zones.json')
api.get('/zones.json')
$api->get('/zones.json');
api.get('/zones.json', function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "current_page_size": 2, "page": 1, "page_size": "50", "pages": 1, "total": 2, "zones": [ { "cdn_url": "cdn.somedomain.com", "creation_date": "2013-05-15 20:45:44", "id": "#####", "inactive": "0", "label": "personal", "locked": "0", "name": "zoneName", "suspend": "0", "tmp_url": "zone.alias.netdna-cdn.com", "type": "2" }, { "cdn_url": "newlivezone.somedomain.netdna-cdn.com", "creation_date": "2013-05-16 16:23:49", "id": "#####", "inactive": "0", "label": null, "locked": "0", "name": "newlivezone", "suspend": "0", "tmp_url": "newlivezone.alias.netdna-cdn.com", "type": "5" } ] } }
Gets a summarized count of all zone types on the specified account
Parameter | Description |
--- | --- | ---
pull
| The number of pull zones for your account |
push
| The number of push zones for your account |
vod
| The number of vod zones for your account |
live
| The number of live zones for your account |
api.get('/zones.json/summary')
api.get('/zones.json/summary')
$api->get('/zones.json/summary');
api.get('/zones.json/summary', function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "summary": { "live": 1, "pull": 1, "push": 1, "vod": 1 } } }
Counts all zones on the specified account
Parameter | Description |
--- | --- | ---
count
| The total number of content zones for your account |
api.get('/zones.json/count')
api.get('/zones.json/count')
$api->get('/zones.json/count');
api.get('/zones.json/count', function(err, response) { console.log('err', err, 'response', response) })
{ "code":200,"data": { "count":"4" } }
Returns a list of all pull zones on the specified account
Parameter | Description |
--- | --- | ---
id
| Pull Zone ID |
name
| Pull Zone name |
url
| Origin URL |
port
| Port |
ip
| IP address of the Origin URL |
compress
| On the fly compression of your files served from our edges.GZip compression for the following file types: text/plain,text/html, text/javascript, text/css, text/xml,application/javascript, application/x-javascript, application/xml,text/x-component, application/json, application/xhtml+xml,application/rss+xml, application/atom+xml, app/vnd.ms-fontobject,image/svg+xml, application/x-font-ttf, font/opentype |
backend_compress
| Allow us to cache compressed versions of your files from theorigin. GZip compression for the following file types: text/plain,text/html, text/javascript, text/css, text/xml,application/javascript, application/x-javascript, application/xml,text/x-component, application/json, application/xhtml+xml,application/rss+xml, application/atom+xml, app/vnd.ms-fontobject,image/svg+xml, application/x-font-ttf, font/opentype |
queries
| Treat Query Strings as a separate cacheable item |
set_host_header
| The URL sent as the Host in all HTTP Response Headers |
cache_valid
| Ignore the origin Cache-Control Header and set every request tohave a Max-Age of 1d, 7d, 1M or 12M |
ignore_setcookie_header
| Ignore any cookies set by the origin in order to make thecontent consistently cacheable |
ignore_cache_control
| Ignore any max age values set by the origin and use the CDN setvalue instead |
use_stale
| Serve expired content while fetching new content. This willalso cause the CDN to serve expired content in cases where theorigin is down or the file is not found |
proxy_cache_lock
| When multiple requests for an uncached file are received, theywill wait until the first response is received rather than sendingeach request back to the origin |
label
| Something that describes your zone |
valid_referers
| List of domains for http referrer protection (separated byspace). Only the domains in the list will be treated as validreferrers |
expires
| Set any request with a no "Cache-Control header" from theorigin to stay on the server. Possible values are 1d, 7d, 1M,12M |
disallow_robots
| Enable robots.txt |
disallow_robots_txt
| Use custom robots.txt |
canonical_link_headers
| Pass the canonical URL in the Link HTTP Header |
content_disposition
| Force files to download |
pseudo_streaming
| Enable the zone for pseudo streaming content |
sslshared
| Enable Shared SSL. This feature allows you use your zone inHTTPS mode. You don't need your own SSL certificate, our servernetdna-ssl.com will be used. |
suspend
| Flag denoting if the zone has been suspended |
locked
| Flag denoting if the zone has been locked |
inactive
| Flag denoting if the zone has been deleted |
creation_date
| Date Created |
api.get('/zones/pull.json')
api.get('/zones/pull.json')
$api->get('/zones/pull.json');
api.get('/zones/pull.json', function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "current_page_size": 3, "page": 1, "page_size": "50", "pages": 1, "pullzones": [ { "backend_compress": "0", "cache_valid": "1d", "canonical_link_headers": "0", "cdn_url": "cdn.somedomain.com", "compress": "1", "content_disposition": "0", "creation_date": "2013-05-15 20:45:44", "disallow_robots": "0", "disallow_robots_txt": null, "dns_check": "1", "expires": null, "hide_setcookie_header": "0", "id": "96061", "ignore_cache_control": "0", "ignore_setcookie_header": "0", "inactive": "0", "ip": "205.134.255.49", "label": "personal", "locked": "0", "name": "somedomain", "port": "80", "proxy_cache_lock": "0", "pseudo_streaming": "0", "queries": "1", "server_id": "18", "set_host_header": null, "sslshared": "0", "suspend": "0", "tmp_url": "somedomain.alias.netdna-cdn.com", "type": "2", "upstream_enabled": "0", "url": "http://somedomain.net", "use_stale": "0", "valid_referers": null }, <...>, { "backend_compress": "0", "cache_valid": "1d", "canonical_link_headers": "0", "cdn_url": "newpullzone3.alias.netdna-cdn.com", "compress": "0", "content_disposition": "0", "creation_date": "2013-05-24 16:18:19", "disallow_robots": "0", "disallow_robots_txt": null, "dns_check": "1", "expires": null, "hide_setcookie_header": "0", "id": "97312", "ignore_cache_control": "0", "ignore_setcookie_header": "0", "inactive": "0", "ip": "205.134.255.49", "label": null, "locked": "0", "name": "newpullzone3", "port": "80", "proxy_cache_lock": "0", "pseudo_streaming": "0", "queries": "1", "server_id": "18", "set_host_header": null, "sslshared": "0", "suspend": "0", "tmp_url": "newpullzone3.alias.netdna-cdn.com", "type": "2", "upstream_enabled": "0", "url": "http://somedomain.net", "use_stale": "0", "valid_referers": null } ], "total": 3 } }
Creates a new pull zone
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
name
| - | required
length: 3-32 chars; only letters, digits, and dash (-)accepted | Pull Zone Name |
url
| - | required
length: 4-100 chars; only valid URLs accepted | Origin URL |
port
| 80 | length: 1-5 chars; only digits accepted | Port |
ip
| - | length: 1-10 chars, only digits accepted | Valid IP address of the Origin URL. If omitted, the servicewill try to lookup the IP automatically. |
compress
| 0 | only 0 or 1 accepted | On the fly compression of your files served from our edges.Enable GZip compression for the following file types: text/plain,text/html, text/javascript, text/css, text/xml,application/javascript, application/x-javascript, application/xml,text/x-component, application/json, application/xhtml+xml,application/rss+xml, application/atom+xml, app/vnd.ms-fontobject,image/svg+xml, application/x-font-ttf, font/opentype |
backend_compress
| 0 | only 0 or 1 accepted | Allow us to cache compressed versions of your files from theorigin. Enable GZip compression for the following file types:text/plain, text/html, text/javascript, text/css, text/xml,application/javascript, application/x-javascript, application/xml,text/x-component, application/json, application/xhtml+xml,application/rss+xml, application/atom+xml, app/vnd.ms-fontobject,image/svg+xml, application/x-font-ttf, font/opentype |
queries
| 0 | only 0 or 1 accepted | Treat Query Strings as a separate cacheable item |
set_host_header
| - | length: 4-100 chars; only valid URLs accepted | The URL to send as the Host in all HTTP Response Headers |
cache_valid
| 1d | length: 1-30 chars; must be a number followed by one of s, m,h, d, M, or Y | Ignore the origin Cache-Control Header and set every request tohave a Max-Age of 1d, 7d, 1M or 12M |
ignore_setcookie_header
| 0 | only 0 or 1 accepted | Ignore any cookies set by the origin in order to make thecontent consistently cacheable |
ignore_cache_control
| 0 | only 0 or 1 accepted | Ignore any max age values set by the origin and use the CDN setvalue instead |
use_stale
| 0 | only 0 or 1 accepted | Serve expired content while fetching new content. This willalso cause the CDN to serve expired content in cases where theorigin is down or the file is not found |
proxy_cache_lock
| 0 | only 0 or 1 accepted | When multiple requests for an uncached file are received, theywill wait until the first response is received rather than sendingeach request back to the origin |
label
| - | length: 1-255 chars | Something that describes your zone |
valid_referers
| - | length: 1-100 chars | List of domains for http referrer protection (separated byspace). Only the domains in the list will be treated as validreferrers |
expires
| 1d | length: 1-32 chars | Set any request with a no "Cache-Control header" from theorigin to stay on the server. Possible values are 1d, 7d, 1M,12M |
disallow_robots
| 0 | only 0 or 1 accepted | Enable robots.txt |
disallow_robots_txt
| - | length 1-255 chars | Use custom robots.txt |
canonical_link_headers
| 1 | only 0 or 1 accepted | Pass the canonical URL in the Link HTTP Header |
content_disposition
| 0 | only 0 or 1 accepted | Force files to download |
pseudo_streaming
| 0 | only 0 or 1 accepted | Enable the zone for pseudo streaming content |
secret
| - | length: 1 - 32 chars | Use a secret to protect your files from unwanted visitors |
sslshared
| 0 | only 0 or 1 accepted | Enable Shared SSL. This feature allows you use your zone inHTTPS mode. You don't need your own SSL certificate, our servernetdna-ssl.com will be used. |
Parameter | Description |
--- | --- | ---
id
| Pull Zone ID |
name
| Pull Zone name |
url
| Origin URL |
port
| Port |
ip
| IP address of the Origin URL |
compress
| On the fly compression of your files served from our edges.GZip compression for the following file types: text/plain,text/html, text/javascript, text/css, text/xml,application/javascript, application/x-javascript, application/xml,text/x-component, application/json, application/xhtml+xml,application/rss+xml, application/atom+xml, app/vnd.ms-fontobject,image/svg+xml, application/x-font-ttf, font/opentype |
backend_compress
| Allow us to cache compressed versions of your files from theorigin. GZip compression for the following file types: text/plain,text/html, text/javascript, text/css, text/xml,application/javascript, application/x-javascript, application/xml,text/x-component, application/json, application/xhtml+xml,application/rss+xml, application/atom+xml, app/vnd.ms-fontobject,image/svg+xml, application/x-font-ttf, font/opentype |
queries
| Treat Query Strings as a separate cacheable item |
set_host_header
| The URL sent as the Host in all HTTP Response Headers |
cache_valid
| Ignore the origin Cache-Control Header and set every request tohave a Max-Age of 1d, 7d, 1M or 12M |
ignore_setcookie_header
| Ignore any cookies set by the origin in order to make thecontent consistently cacheable |
ignore_cache_control
| Ignore any max age values set by the origin and use the CDN setvalue instead |
use_stale
| Serve expired content while fetching new content. This willalso cause the CDN to serve expired content in cases where theorigin is down or the file is not found |
proxy_cache_lock
| When multiple requests for an uncached file are received, theywill wait until the first response is received rather than sendingeach request back to the origin |
label
| Something that describes your zone |
valid_referers
| List of domains for http referrer protection (separated byspace). Only the domains in the list will be treated as validreferrers |
expires
| Set any request with a no "Cache-Control header" from theorigin to stay on the server. Possible values are 1d, 7d, 1M,12M |
disallow_robots
| Enable robots.txt |
disallow_robots_txt
| Use custom robots.txt |
canonical_link_headers
| Pass the canonical URL in the Link HTTP Header |
content_disposition
| Force files to download |
pseudo_streaming
| Enable the zone for pseudo streaming content |
sslshared
| Enable Shared SSL. This feature allows you use your zone inHTTPS mode. You don't need your own SSL certificate, our servernetdna-ssl.com will be used. |
suspend
| Flag denoting if the zone has been suspended |
locked
| Flag denoting if the zone has been locked |
inactive
| Flag denoting if the zone has been deleted |
creation_date
| Date Created |
params = {"name"=>"newPullZone6","url"=>"http://somedomain.com"} api.post('/zones/pull.json',params)
params = {"name":"newPullZone5","url":"http://somedomain.net"} api.post('/zones/pull.json',data=params)
$params = array("name"=>"newPullZone2","url"=>"http://somedomain.net"); $api->post('/zones/pull.json',$params);
api.post('/zones/pull.json', { name: 'newPullZone2', url: 'http://somedomain.net' }, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 201, "data": { "pullzone": { "backend_compress": 0, "cache_valid": "1d", "canonical_link_headers": 1, "cdn_url": "newpullzone3.alias.netdna-cdn.com", "compress": 0, "content_disposition": 0, "creation_date": "2013-05-24 16:18:19", "disallow_robots": 0, "disallow_robots_txt": null, "dns_check": 0, "expires": null, "hide_setcookie_header": 0, "id": 97312, "ignore_cache_control": 0, "ignore_setcookie_header": 0, "inactive": 0, "ip": "205.134.255.49", "label": null, "locked": 0, "name": "newpullzone3", "port": 80, "proxy_cache_lock": 0, "pseudo_streaming": 0, "queries": "1", "server_id": "18", "set_host_header": 1, "sslshared": null, "suspend": 0, "tmp_url": "newpullzone3.alias.netdna-cdn.com", "type": 2, "upstream_enabled": 0, "url": "http://somedomain.net", "use_stale": 0, "valid_referers": null } } }
Counts all pull zones on the specified account
Parameter | Description |
--- | --- | ---
count
| The number of pull zones on the specified account |
api.get('/zones/pull.json/count')
api.get('/zones/pull.json/count')
$api->get('/zones/pull.json/count');
api.get('/zones/pull.json/count', function(err, response) { console.log('err', err, 'response', response) })
{ "code":200,"data": { "count": "3" } }
Gets a pull zone specified by the {zone_id} parameter
Parameter | Description |
--- | --- | ---
id
| The Pull Zone ID |
name
| Pull Zone name |
url
| Origin URL |
port
| Port |
ip
| Valid IP address of the Origin URL. If omitted, the servicewill try to lookup the IP automatically. |
compress
| On the fly compression of your files served from our edges.GZip compression for the following file types: text/plain,text/html, text/javascript, text/css, text/xml,application/javascript, application/x-javascript, application/xml,text/x-component, application/json, application/xhtml+xml,application/rss+xml, application/atom+xml, app/vnd.ms-fontobject,image/svg+xml, application/x-font-ttf, font/opentype |
backend_compress
| Allow us to cache compressed versions of your files from theorigin. GZip compression for the following file types: text/plain,text/html, text/javascript, text/css, text/xml,application/javascript, application/x-javascript, application/xml,text/x-component, application/json, application/xhtml+xml,application/rss+xml, application/atom+xml, app/vnd.ms-fontobject,image/svg+xml, application/x-font-ttf, font/opentype |
queries
| Treat Query Strings as a separate cacheable item |
set_host_header
| The URL sent as the Host in all HTTP Response Headers |
cache_valid
| Ignore the origin Cache-Control Header and set every request tohave a Max-Age of 1d, 7d, 1M or 12M |
ignore_setcookie_header
| Ignore any cookies set by the origin in order to make thecontent consistently cacheable |
ignore_cache_control
| Ignore any max age values set by the origin and use the CDN setvalue instead |
use_stale
| Serve expired content while fetching new content. This willalso cause the CDN to serve expired content in cases where theorigin is down or the file is not found |
proxy_cache_lock
| When multiple requests for an uncached file are received, theywill wait until the first response is received rather than sendingeach request back to the origin |
label
| Something that describes your zone |
valid_referers
| List of domains for http referrer protection (separated byspace). Only the domains in the list will be treated as validreferrers |
expires
| Set any request with a no "Cache-Control header" from theorigin to stay on the server. Possible values are 1d, 7d, 1M,12M |
disallow_robots
| Enable robots.txt |
disallow_robots_txt
| Use custom robots.txt |
canonical_link_headers
| Pass the canonical URL in the Link HTTP Header |
content_disposition
| Force files to download |
pseudo_streaming
| Enable the zone for pseudo streaming content |
sslshared
| Enable Shared SSL. This feature allows you use your zone inHTTPS mode. You don't need your own SSL certificate, our servernetdna-ssl.com will be used. |
suspend
| Flag denoting if the zone has been suspended |
locked
| Flag denoting if the zone has been locked |
inactive
| Flag denoting if the zone has been deleted |
creation_date
| Date Created |
id = '97167' api.get('/zones/pull.json/'+id)
id = '97167' api.get('/zones/pull.json/'+id)
$id = '96076'; $api->get('/zones/pull.json/'.$id);
var id = '96076' api.get('/zones/pull.json' + id, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "pullzone": { "backend_compress": "0", "cache_valid": "1d", "canonical_link_headers": "0", "cdn_url": "cdn.somenewdomain.com", "compress": "0", "content_disposition": "0", "creation_date": "2013-05-23 19:38:30", "disallow_robots": "0", "disallow_robots_txt": null, "dns_check": "1", "expires": null, "hide_setcookie_header": "0", "id": "97167", "ignore_cache_control": "0", "ignore_setcookie_header": "0", "inactive": "0", "ip": "205.134.255.49", "label": "Some other description", "locked": "0", "name": "newpullzone2", "port": "80", "proxy_cache_lock": "0", "pseudo_streaming": "0", "queries": "1", "server_id": "18", "set_host_header": null, "sslshared": "0", "suspend": "0", "tmp_url": "newpullzone2.alias.netdna-cdn.com", "type": "2", "upstream_enabled": "0", "url": "http://somedomain.net", "use_stale": "0", "valid_referers": null } } }
Updates a pull zone specified by the {zone_id} parameter
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
url
| - | length: 4-100 chars; only valid URLs accepted | Origin URL |
port
| 80 | length: 1-5 chars; only digits accepted | Port |
compress
| 0 | only 0 or 1 accepted | On the fly compression of your files served from our edges.Enable GZip compression for the following file types: text/plain,text/html, text/javascript, text/css, text/xml,application/javascript, application/x-javascript, application/xml,text/x-component, application/json, application/xhtml+xml,application/rss+xml, application/atom+xml, app/vnd.ms-fontobject,image/svg+xml, application/x-font-ttf, font/opentype |
backend_compress
| 0 | only 0 or 1 accepted | Allow us to cache compressed versions of your files from theorigin. Enable GZip compression for the following file types:text/plain, text/html, text/javascript, text/css, text/xml,application/javascript, application/x-javascript, application/xml,text/x-component, application/json, application/xhtml+xml,application/rss+xml, application/atom+xml, app/vnd.ms-fontobject,image/svg+xml, application/x-font-ttf, font/opentype |
queries
| 0 | only 0 or 1 accepted | Treat Query Strings as a separate cacheable item |
set_host_header
| - | length: 4-100 chars; only valid URLs accepted | The URL to send as the Host in all HTTP Response Headers |
cache_valid
| - | length: 1-30 chars; must be a number followed by one of s, m,h, d, M, or Y | Ignore the origin Cache-Control Header and set every request tohave a Max-Age of 1d, 7d, 1M or 12M |
ignore_setcookie_header
| 0 | only 0 or 1 accepted | Ignore any cookies set by the origin in order to make thecontent consistently cacheable |
ignore_cache_control
| 0 | only 0 or 1 accepted | Ignore any max age values set by the origin and use the CDN setvalue instead |
use_stale
| 0 | only 0 or 1 accepted | Serve expired content while fetching new content. This willalso cause the CDN to serve expired content in cases where theorigin is down or the file is not found |
proxy_cache_lock
| 0 | only 0 or 1 accepted | When multiple requests for an uncached file are received, theywill wait until the first response is received rather than sendingeach request back to the origin |
label
| - | length: 1-255 chars | Something that describes your zone |
valid_referers
| - | length: 1-100 chars | List of domains for http referrer protection (separated byspace). Only the domains in the list will be treated as validreferrers |
expires
| 1d | length: 1-32 chars | Set any request with a no "Cache-Control header" from theorigin to stay on the server. Possible values are 1d, 7d, 1M,12M |
disallow_robots
| 0 | only 0 or 1 accepted | Enable robots.txt |
disallow_robots_txt
| - | length: 1-255 chars | Use custom robots.txt |
canonical_link_headers
| 1 | only 0 or 1 accepted | Pass the canonical URL in the Link HTTP Header |
content_disposition
| 0 | only 0 or 1 accepted | Force files to download |
pseudo_streaming
| 0 | only 0 or 1 accepted | Enable the zone for pseudo streaming content |
secret
| - | length: 1 - 32 chars | Use a secret to protect your files from unwanted visitors |
sslshared
| 0 | only 0 or 1 accepted | Enable Shared SSL. This feature allows you use your zone inHTTPS mode. You don't need your own SSL certificate, our servernetdna-ssl.com will be used. |
Parameter | Description |
--- | --- | ---
id
| Pull Zone ID |
name
| Pull Zone name |
url
| Origin URL |
port
| Port |
ip
| Valid IP address of the Origin URL. If omitted, the servicewill try to lookup the IP automatically. |
compress
| On the fly compression of your files served from our edges.GZip compression for the following file types: text/plain,text/html, text/javascript, text/css, text/xml,application/javascript, application/x-javascript, application/xml,text/x-component, application/json, application/xhtml+xml,application/rss+xml, application/atom+xml, app/vnd.ms-fontobject,image/svg+xml, application/x-font-ttf, font/opentype |
backend_compress
| Allow us to cache compressed versions of your files from theorigin. GZip compression for the following file types: text/plain,text/html, text/javascript, text/css, text/xml,application/javascript, application/x-javascript, application/xml,text/x-component, application/json, application/xhtml+xml,application/rss+xml, application/atom+xml, app/vnd.ms-fontobject,image/svg+xml, application/x-font-ttf, font/opentype |
queries
| Treat Query Strings as a separate cacheable item |
set_host_header
| The URL sent as the Host in all HTTP Response Headers |
cache_valid
| Ignore the origin Cache-Control Header and set every request tohave a Max-Age of 1d, 7d, 1M or 12M |
ignore_setcookie_header
| Ignore any cookies set by the origin in order to make thecontent consistently cacheable |
ignore_cache_control
| Ignore any max age values set by the origin and use the CDN setvalue instead |
use_stale
| Serve expired content while fetching new content. This willalso cause the CDN to serve expired content in cases where theorigin is down or the file is not found |
proxy_cache_lock
| When multiple requests for an uncached file are received, theywill wait until the first response is received rather than sendingeach request back to the origin |
label
| Something that describes your zone |
valid_referers
| List of domains for http referrer protection (separated byspace). Only the domains in the list will be treated as validreferrers |
expires
| Set any request with a no "Cache-Control header" from theorigin to stay on the server. Possible values are 1d, 7d, 1M,12M |
disallow_robots
| Enable robots.txt |
disallow_robots_txt
| Use custom robots.txt |
canonical_link_headers
| Pass the canonical URL in the Link HTTP Header |
content_disposition
| Force files to download |
pseudo_streaming
| Enable the zone for pseudo streaming content |
sslshared
| Enable Shared SSL. This feature allows you use your zone inHTTPS mode. You don't need your own SSL certificate, our servernetdna-ssl.com will be used. |
suspend
| Flag denoting if the zone has been suspended |
locked
| Flag denoting if the zone has been locked |
inactive
| Flag denoting if the zone has been deleted |
creation_date
| Date Created |
id = '97167' params = {"label"=>"Some other description"} api.put('/zones/pull.json/'+id,params)
id = '97167' params = {"label":"Some other description"} api.put('/zones/pull.json/'+id,params=params)
$id = '96167'; $params = array("label"=>"Some other description"); $api->put('/zones/pull.json/'.$id, $params);
var id = '96167' api.put('/zones/pull.json' + id, { label: 'Some other description' }, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "pullzone": { "backend_compress": "0", "cache_valid": "1d", "canonical_link_headers": "0", "cdn_url": "cdn.somenewdomain.com", "compress": "0", "content_disposition": "0", "creation_date": "2013-05-23 19:38:30", "disallow_robots": "0", "disallow_robots_txt": null, "dns_check": "1", "expires": null, "hide_setcookie_header": "0", "id": "97167", "ignore_cache_control": "0", "ignore_setcookie_header": "0", "inactive": "0", "ip": "205.134.255.49", "label": "Some other description", "locked": "0", "name": "newpullzone2", "port": "80", "proxy_cache_lock": "0", "pseudo_streaming": "0", "queries": "1", "server_id": "18", "set_host_header": null, "sslshared": "0", "suspend": "0", "tmp_url": "newpullzone2.alias.netdna-cdn.com", "type": "2", "upstream_enabled": "0", "url": "http://somedomain.net", "use_stale": "0", "valid_referers": null } } }
Deletes a pull zone specified by the {zone_id} parameter
id = '97167' api.delete('/zones/pull.json/'+id)
id = '97167' api.delete('/zones/pull.json/'+id)
$id = '97167'; $api->delete('/zones/pull.json/'.$id);
var id = '97167' api.del('/zones/pull.json' + id, function(err, response) { console.log('err', err, 'response', response) })
{ "code":200 }
Enables a pull zone specified by the {zone_id} parameter
id = '97167' api.put('/zones/pull/'+id+'/enable.json')
id = '97167' api.put('/zones/pull/'+id+'/enable.json')
$id = '97167'; $api->put('/zones/pull/'.$id.'/enable.json');
var id = '97167' api.put('/zones/pull/' + id + '/enable.json', function(err, response) { console.log('err', err, 'response', response) })
{ "code":200 }
Disables a pull zone specified by the {zone_id} parameter
id = '97167' api.put('/zones/pull/'+id+'/disable.json')
id = '97167' api.put('/zones/pull/'+id+'/disable.json')
$id = '97167'; $api->put('/zones/pull'.$id.'disable.json);
var id = '97167' api.put('/zones/pull' + id + 'disable.json', function(err, response) { console.log('err', err, 'response', response) })
{ "code":200 }
Purges pull zone cache
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
files
| - | An array containing relative paths of the files to purge (i.e./favicon.ico) |
#Purge Zone id = '97167' api.purge(id)#Purge File id = '97167' api.purge(id,'/file1.txt')
#Purge Files id = '97167' api.purge(id, ['/file1.txt','/file2.txt'])
#Purge Zone id = '97167' api.purge(id)#Purge File id = '97167' api.purge(id,'/file1.txt')
#Purge Files id = '97167' api.purge(id, ['/file1.txt','/file2.txt'])
//Purge Zone $id = '97792'; $api->delete('/zones/pull.json/'.$id.'/cache');//Purge File $id = '97792'; $params = array('file'=>'/index.html'); $api->delete('/zones/pull.json/'.$id.'/cache',$params);
//Purge Files $id = '97792'; $params = array('file'=>'/index.html','file2'=>'/robots.txt'); $api->delete('/zones/pull.json/'.$id.'/cache',$params);
var id = '96167' api.del('/zones/pull.json/' + id + '/cache', callback) function callback(err, response) { if (err) return console.log(err) console.log(response) }
{ "code": 200 }
Returns a list of all custom domains on the zone specified by {zone_id}
Parameter | Description |
--- | --- | ---
id
| The id of the custom domain |
bucket_id
| The id of the zone the custom domain belongs to |
custom_domain
| A valid custom domain |
id = '97167' api.get('/zones/pull/'+id+'/customdomains.json')
id = '97167' api.get('/zones/pull/'+id+'/customdomains.json')
$id = '96061'; $api->get('/zones/pull/'.$id.'/customdomains.json');
var id = '96061' api.get('/zones/pull/' + id + '/customdomains.json', function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "customdomains": [ { "bucket_id": "97167", "custom_domain": "cdn.somenewdomain.com", "id": "79182", "type": null } ], "total": 1 } }
Adds a new custom domain to {zone_id}
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
custom_domain
| - | required
length: 1-255 chars, valid::custom_domain, !valid::full_domain | A valid custom domain |
type
| - | Applies only to Vod Zones and must be either 'vod-rtmp','vod-pseudo', 'vod-direct', or 'vod-ftp' | The type of custom domain being created |
Parameter | Description |
--- | --- | ---
id
| The id of the custom domain |
bucket_id
| The id of the zone the custom domain belongs to |
custom_domain
| The valid custom domain |
id = '97167' params = {"custom_domain"=>"cdn.somedomain14.com"} api.post('/zones/pull/'+id+'/customdomains.json', params)
id = '97167' params = {"custom_domain":"cdn.somedomain13.com"} api.post('/zones/pull/'+id+'/customdomains.json', params)
$id = '97167'; $params = array("custom_domain"=>"cdn.somedomain3.com"); $api->post('/zones/pull/'.$id.'/customdomains.json', $params);
var id = '96167' api.post('/zones/pull/' + id + '/customdomains.json', { custom_domain: 'cdn.somedomain3.com' }, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 201, "data": { "customdomain": { "bucket_id": "97167", "custom_domain": "cdn.somedomain3.com", "id": 79282, "type": null } } }
Gets a custom domain specified by the {zone_id} and {customdomain_id} parameters
Parameter | Description |
--- | --- | ---
id
| The id of the custom domain |
bucket_id
| The id of the zone the custom domain belongs to |
custom_domain
| The valid custom domain |
zoneId = '97167' domainId = '79182' api.get('/zones/pull/'+zoneId+'/customdomains.json/'+domainId)
zoneId = '97167' domainId = '79182' api.get('/zones/pull/'+zoneId+'/customdomains.json/'+domainId)
$zoneId = '97167'; $domainId = '79182'; $api->get('/zones/pull/'.$zoneId.'/customdomains.json/'.$domainId);
var id = '97167' var domainId = '79182' api.get('/zones/pull/' + id + '/customdomains.json/' + domainId, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "customdomain": { "bucket_id": "97167", "custom_domain": "cdn.somenewdomain.com", "id": "79182", "type": null } } }
Updates a custom domain specified by the id parameter
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
custom_domain
| - | required
length: 1-255 chars, valid::custom_domain, !valid::full_domain | A new valid custom domain |
Parameter | Description |
--- | --- | ---
id
| The id of the custom domain |
bucket_id
| The id of the zone the custom domain belongs to |
custom_domain
| The new valid custom domain |
zoneId = '97167' domainId = '79182' params = {"custom_domain"=>"cdn.somenewdomain41.com"} api.put('/zones/pull/'+zoneId+'/customdomains.json/'+domainId,params)
zoneId = '97167' domainId = '79182' params = {"custom_domain":"cdn.somenewdomain41.com"} api.put('/zones/pull/'+zoneId+'/customdomains.json/'+domainId,params=params)
$zoneId = '97167'; $domainId = '79182'; $params = array("custom_domain"=>"cdn.somenewdomain.com"); $api->put('/zones/pull/'.$zoneId.'/customdomains.json/'.$domainId, $params);
var zoneId = '97167' var domainId = '79182' api.put('/zones/pull/' + zoneId + '/customdomains.json/' + domainId, { custom_domain: 'cdn.somenewdomain.com' }, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "customdomain": { "bucket_id": "97167", "custom_domain": "cdn.somenewdomain4.com", "id": "79182", "type": null } } }
Deletes a custom domain specified by the {zone_id} and {customdomain_id} parameters
zoneId = '97167' domainId = '79182' api.delete('/zones/pull/'+zoneId+'/customdomains.json/'+domainId)
zoneId = '97167' domainId = '79182' api.delete('/zones/pull/'+zoneId+'/customdomains.json/'+domainId)
$zoneId = '97167'; $domainId = '79182'; $api->delete('/zones/pull/'.$zoneId.'/customdomains.json/'.$domainId);
var zoneId = '97167' var domainId = '79182' api.del('/zones/pull/' + zoneId + '/customdomains.json/' + domainId, function(err, response) { console.log('err', err, 'response', response) })
{ "code":200 }
Returns a list of all push zones on the specified account
Parameter | Description |
--- | --- | ---
id
| Push Zone ID |
name
| Push Zone name |
label
| Something that describes your zone |
valid_referers
| List of domains for http referrer protection (separated byspace). Only the domains in the list will be treated as validreferrers |
content_disposition
| Force files to download |
sslshared
| Enable Shared SSL. This feature allows you use your zone inHTTPS mode. You don't need your own SSL certificate, our servernetdna-ssl.com will be used. |
suspend
| Flag denoting if the zone has been suspended |
locked
| Flag denoting if the zone has been locked |
inactive
| Flag denoting if the zone has been deleted |
creation_date
| Date Created |
api.get('/zones/push.json')
api.get('/zones/push.json')
$api->get('/zones/push.json');
api.get('/zones/push.json', function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "current_page_size": 2, "page": 1, "page_size": "50", "pages": 1, "pushzones": [ { "cdn_url": "cdn.somedomain.net", "compress": "0", "content_disposition": "0", "creation_date": "2013-05-16 15:25:19", "expires": null, "ftp_url": "ftp.newpushzone2.alias.netdna-cdn.com", "id": "96182", "inactive": "0", "label": null, "locked": "0", "name": "newpushzone2", "server_id": "11", "sslshared": "0", "storage_updated": "2013-05-24 06:31:52", "storage_used": "20480", "suspend": "0", "tmp_url": "newpushzone2.alias.netdna-cdn.com", "type": "3", "valid_referers": null }, { "cdn_url": "cdn.somenewdomain2.com", "compress": "0", "content_disposition": "0", "creation_date": "2013-05-23 21:01:39", "expires": null, "ftp_url": "ftp.newpushzone3.alias.netdna-cdn.com", "id": "97181", "inactive": "0", "label": "Some other description", "locked": "0", "name": "newpushzone3", "server_id": "11", "sslshared": "0", "storage_updated": "2013-05-24 06:31:52", "storage_used": "20480", "suspend": "0", "tmp_url": "newpushzone3.alias.netdna-cdn.com", "type": "3", "valid_referers": null } ], "total": 2 } }
Creates a new push zone
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
name
| - | required
length: 3-30 chars; only letters, digits, and dash (-)accepted | Push Zone name |
password
| - | required
length: 5-30 chars; | Push Zone FTP password |
label
| - | length: 1-255 chars | Something that describes your zone |
valid_referers
| - | length: 1-200 chars | List of domains for http referrer protection (separated byspace). Only the domains in the list will be treated as validreferrers |
content_disposition
| 0 | only 0 or 1 accepted | Force files to download |
sslshared
| 0 | only 0 or 1 accepted | Enable Shared SSL. This feature allows you use your zone inHTTPS mode. You don't need your own SSL certificate, our servernetdna-ssl.com will be used. |
Parameter | Description |
--- | --- | ---
id
| Push Zone ID |
name
| Push Zone name |
label
| Something that describes your zone |
valid_referers
| List of domains for http referrer protection (separated byspace). Only the domains in the list will be treated as validreferrers |
content_disposition
| Force files to download |
sslshared
| Enable Shared SSL. This feature allows you use your zone inHTTPS mode. You don't need your own SSL certificate, our servernetdna-ssl.com will be used. |
suspend
| Flag denoting if the zone has been suspended |
locked
| Flag denoting if the zone has been locked |
inactive
| Flag denoting if the zone has been deleted |
creation_date
| Date Created |
params = {"name"=>"newPushZone99","password"=>"password"} api.post('/zones/push.json',params)
params = {"name":"newPushZone6","password":"password"} api.post('/zones/push.json',data=params)
$params = array("name"=>"newPushZone","password"=>"password"); $api->post('/zones/push.json', $params);
api.post('/zones/push.json', { name: 'newPushZone', password: 'password' }, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 201, "data": { "pushzone": { "cdn_url": "newpushzone4.alias.netdna-cdn.com", "compress": 0, "content_disposition": 0, "creation_date": "2013-05-24 16:41:53", "expires": null, "ftp_url": "ftp.newpushzone4.alias.netdna-cdn.com", "id": 97317, "inactive": 0, "label": null, "locked": 0, "name": "newpushzone4", "server_id": "11", "sslshared": null, "storage_updated": null, "storage_used": null, "suspend": 0, "tmp_url": "newpushzone4.alias.netdna-cdn.com", "type": 3, "valid_referers": null } } }
Counts all push zones on the specified account
Parameter | Description |
--- | --- | ---
count
| The number of push zones on the specified account |
api.get('/zones/push.json/count')
api.get('/zones/push.json/count')
$api->get('/zones/push.json/count');
api.get('/zones/push.json/count', function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "count": "3" } }
Gets a push zone specified by the {zone_id} parameter
Parameter | Description |
--- | --- | ---
id
| Push Zone ID |
name
| Push Zone name |
label
| Something that describes your zone |
valid_referers
| List of domains for http referrer protection (separated byspace). Only the domains in the list will be treated as validreferrers |
content_disposition
| Force files to download |
sslshared
| Enable Shared SSL. This feature allows you use your zone inHTTPS mode. You don't need your own SSL certificate, our servernetdna-ssl.com will be used. |
suspend
| Flag denoting if the zone has been suspended |
locked
| Flag denoting if the zone has been locked |
inactive
| Flag denoting if the zone has been deleted |
creation_date
| Date Created |
id = '97793' api.get('/zones/push.json/'+id)
id = '96182' api.get('/zones/push.json/'+id)
$id = '97181'; $api->get('/zones/push.json/'.$id);
var id = '97182' api.get('/zones/push.json/' + id, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "pushzone": { "cdn_url": "cdn.somenewdomain2.com", "compress": "0", "content_disposition": "0", "creation_date": "2013-05-23 21:01:39", "expires": null, "ftp_url": "ftp.newpushzone3.alias.netdna-cdn.com", "id": "97181", "inactive": "0", "label": "Some other description", "locked": "0", "name": "newpushzone3", "server_id": "11", "sslshared": "0", "storage_updated": "2013-05-24 06:31:52", "storage_used": "20480", "suspend": "0", "tmp_url": "newpushzone3.alias.netdna-cdn.com", "type": "3", "valid_referers": null } } }
Updates a push zone specified by the {zone_id} parameter
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
label
| - | length: 1-255 chars | Something that describes your zone |
valid_referers
| - | length: 1-100 chars | List of domains for http referrer protection (separated byspace). Only the domains in the list will be treated as validreferrers |
content_disposition
| 0 | only 0 or 1 accepted | Force files to download |
sslshared
| 0 | only 0 or 1 accepted | Enable Shared SSL. This feature allows you use your zone inHTTPS mode. You don't need your own SSL certificate, our servernetdna-ssl.com will be used. |
Parameter | Description |
--- | --- | ---
id
| Push Zone ID |
name
| Push Zone name |
label
| Something that describes your zone |
valid_referers
| List of domains for http referrer protection (separated byspace). Only the domains in the list will be treated as validreferrers |
content_disposition
| Force files to download |
sslshared
| Enable Shared SSL. This feature allows you use your zone inHTTPS mode. You don't need your own SSL certificate, our servernetdna-ssl.com will be used. |
suspend
| Flag denoting if the zone has been suspended |
locked
| Flag denoting if the zone has been locked |
inactive
| Flag denoting if the zone has been deleted |
creation_date
| Date Created |
id = '97793' params = {"label"=>"Some other description"} api.put('/zones/push.json/'+id,params)
id = '96182' params = {"label":"Some other description"} api.put('/zones/push.json/'+id,params=params)
$id = '97181'; $params = array("label"=>"Some other description"); $api->put('/zones/push.json/'.$id, $params);
var id = '97182' api.get('/zones/push.json/' + id, { label: 'Some other description' }, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "pushzone": { "cdn_url": "cdn.somenewdomain2.com", "compress": "0", "content_disposition": "0", "creation_date": "2013-05-23 21:01:39", "expires": null, "ftp_url": "ftp.newpushzone3.alias.netdna-cdn.com", "id": "97181", "inactive": "0", "label": "Some other description", "locked": "0", "name": "newpushzone3", "server_id": "11", "sslshared": "0", "storage_updated": "2013-05-24 06:31:52", "storage_used": "20480", "suspend": "0", "tmp_url": "newpushzone3.alias.netdna-cdn.com", "type": "3", "valid_referers": null } } }
Deletes a push zone specified by the {zone_id} parameter
id = '97793' api.delete('/zones/push.json/'+id)
id = '96182' api.delete('/zones/push.json/'+id)
$id = '97181'; $api->delete('/zones/push.json/'.$id);
var id = '97181' api.del('/zones/push.json/' + id, function(err, response) { console.log('err', err, 'response', response) })
{ "code":200 }
Enables a push zone specified by the {zone_id} parameter
id = '97793' api.put('/zones/push/'+id+'/enable.json')
id = '96182' api.put('/zones/push/'+id+'/enable.json')
$id = '97181'; $api->put('/zones/push/'.$id.'/enable.json');
var id = '97181' api.put('/zones/push/' + id + '/enable.json', function(err, response) { console.log('err', err, 'response', response) })
{ "code":200 }
Disables a push zone specified by the {zone_id} parameter
id = '97793' api.put('/zones/push/'+id+'/disable.json')
id = '96182' api.put('/zones/push/'+id+'/disable.json')
$id = '97181'; $api->put('/zones/push/'.$id.'/disable.json');
var id = '97181' api.put('/zones/push/' + id + '/disable.json', function(err, response) { console.log('err', err, 'response', response) })
{ "code":200 }
Returns a list of all custom domains on the zone specified by {zone_id}
Parameter | Description |
--- | --- | ---
id
| The id of the custom domain |
bucket_id
| The id of the zone the custom domain belongs to |
custom_domain
| A valid custom domain |
id = '97793' api.get('/zones/push/'+id+'/customdomains.json')
id = '96182' api.get('/zones/push/'+id+'/customdomains.json')
$id = '96061'; $api->get('/zones/push/'.$id.'/customdomains.json');
var id = '96061' api.get('/zones/push/' + id + '/customdomains.json', function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "customdomains": [ { "bucket_id": "96061", "custom_domain": "cdn.somedomain.com", "id": "78330", "type": null } ], "total": 1 } }
Adds a new custom domain to {zone_id}
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
custom_domain
| - | required
length: 1-255 chars, valid::custom_domain, !valid::full_domain | A valid custom domain |
type
| - | Applies only to Vod Zones and must be either 'vod-rtmp','vod-pseudo', 'vod-direct', or 'vod-ftp' | The type of custom domain being created |
Parameter | Description |
--- | --- | ---
id
| The id of the custom domain |
bucket_id
| The id of the zone the custom domain belongs to |
custom_domain
| The valid custom domain |
id = '97793' params = {"custom_domain"=>"cdn.somedomain19.com"} api.post('/zones/push/'+id+'/customdomains.json', params)
id = '96182' params = {"custom_domain":"cdn.somedomain15.com"} api.post('/zones/push/'+id+'/customdomains.json', params)
$id = '97181'; $params = array("custom_domain"=>"cdn.somedomain2.net"); $api->post('/zones/push/'.$id.'/customdomains.json', $params);
var id = '97181' api.post('/zones/push/' + id + '/customdomains.json', { custom_domain: 'cdn.somedomain2.net' }, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 201, "data": { "customdomain": { "bucket_id": "97181", "custom_domain": "cdn.somedomain4.net", "id": 79283, "type": null } } }
Gets a custom domain specified by the {zone_id} and {customdomain_id} parameters
Parameter | Description |
--- | --- | ---
id
| The id of the custom domain |
bucket_id
| The id of the zone the custom domain belongs to |
custom_domain
| The valid custom domain |
zoneId = '97793' domainId = '79747' api.get('/zones/push/'+zoneId+'/customdomains.json/'+domainId)
zoneId = '96182' domainId = '79320' api.get('/zones/push/'+zoneId+'/customdomains.json/'+domainId)
$zoneId = '97181'; $domainId = '79188'; $api->get('/zones/push/'.$zoneId.'/customdomains.json/'.$domainId);
var zoneId = '97181' var domainId = '79188' api.get('/zones/push/' + zoneId + '/customdomains.json/' + domainId, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "customdomain": { "bucket_id": "97181", "custom_domain": "cdn.somenewdomain2.com", "id": "79188", "type": null } } }
Updates a custom domain specified by the id parameter
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
custom_domain
| - | required
length: 1-255 chars, valid::custom_domain, !valid::full_domain | A new valid custom domain |
Parameter | Description |
--- | --- | ---
id
| The id of the custom domain |
bucket_id
| The id of the zone the custom domain belongs to |
custom_domain
| The new valid custom domain |
zoneId = '97793' domainId = '79747' params = {"custom_domain"=>"cdn.somenewdomain41.com"} api.put('/zones/push/'+zoneId+'/customdomains.json/'+domainId,params)
zoneId = '96182' domainId = '79320' params = {"custom_domain":"cdn.somenewdomain40.com"} api.put('/zones/push/'+zoneId+'/customdomains.json/'+domainId,params=params)
$zoneId = '97181'; $domainId = '79188'; $params = array("custom_domain"=>"cdn.somenewdomain2.com"); $api->put('/zones/push/'.$zoneId.'/customdomains.json/'.$domainId, $params);
var zoneId = '97181' var domainId = '79188' api.put('/zones/push/' + zoneId + '/customdomains.json/' + domainId, { custom_domain: 'cdn.somenewdomain2.com' }, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "customdomain": { "bucket_id": "97181", "custom_domain": "cdn.somenewdomain12.com", "id": "79188", "type": null } } }
Deletes a custom domain specified by the {zone_id} and {customdomain_id} parameters
zoneId = '97793' domainId = '79747' api.delete('/zones/push/'+zoneId+'/customdomains.json/'+domainId)
zoneId = '96182' domainId = '79320' api.delete('/zones/push/'+zoneId+'/customdomains.json/'+domainId)
$zoneId = '97181'; $domainId = '79188'; $api->delete('/zones/push/'.$zoneId.'/customdomains.json/'.$domainId);
var zoneId = '97181' var domainId = '79188' api.del('/zones/push/' + zoneId + '/customdomains.json/' + domainId, function(err, response) { console.log('err', err, 'response', response) })
{ "code":200 }
Returns a list of all VOD zones on the specified account
Parameter | Description |
--- | --- | ---
id
| VOD Zone ID |
name
| VOD Zone name |
label
| The zone's description |
suspend
| Flag denoting if the zone has been suspended |
locked
| Flag denoting if the zone has been locked |
inactive
| Flag denoting if the zone has been deleted |
creation_date
| Date Created |
api.get('/zones/vod.json')
api.get('/zones/vod.json')
$api->get('/zones/vod.json');
api.get('/zones/vod.json', function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "current_page_size": 2, "page": 1, "page_size": "50", "pages": 1, "total": 2, "vodzones": [ { "cdn_url": "cdn.somedomain.com", "creation_date": "2013-05-16 16:02:35", "direct_url": "d.newvodzone.alias.netdna-cdn.com", "ftp_url": "ftp.newvodzone.alias.netdna-cdn.com", "id": "96187", "inactive": "0", "label": null, "locked": "0", "name": "newvodzone", "pseudo_url": "p.newvodzone.alias.netdna-cdn.com", "rtmp_url": "r.newvodzone.alias.netdna-cdn.com", "server_id": "30", "storage_updated": "2013-05-24 06:35:35", "storage_used": "4096", "suspend": "0", "tmp_url": "newvodzone.alias.netdna-cdn.com", "token": null, "type": "4" }, { "cdn_url": "cdn.somenewdomain3.com", "creation_date": "2013-05-23 21:25:44", "direct_url": "d.newvodzone3.alias.netdna-cdn.com", "ftp_url": "ftp.newvodzone3.alias.netdna-cdn.com", "id": "97183", "inactive": "0", "label": "Some other description", "locked": "0", "name": "newvodzone3", "pseudo_url": "p.newvodzone3.alias.netdna-cdn.com", "rtmp_url": "r.newvodzone3.alias.netdna-cdn.com", "server_id": "30", "storage_updated": "2013-05-24 06:35:35", "storage_used": "4096", "suspend": "0", "tmp_url": "newvodzone3.alias.netdna-cdn.com", "token": null, "type": "4" } ] } }
Creates a new VOD zone
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
name
| - | required
length: 3-30 chars; only letters, digits, and dash (-)accepted | VOD Zone user name |
password
| - | required
length: 5-30 chars | Your desired password |
token
| - | length: 1-64 chars | The token value (shared secret) for secure streaming |
label
| - | length: 1-255 chars | Something that describes your zone |
Parameter | Description |
--- | --- | ---
id
| VOD Zone ID |
name
| VOD Zone name |
label
| The zone's description |
suspend
| Flag denoting if the zone has been suspended |
locked
| Flag denoting if the zone has been locked |
inactive
| Flag denoting if the zone has been deleted |
creation_date
| Date Created |
params = {"name"=>"newVodZone99","password"=>"password"} api.post('/zones/vod.json',params)
params = {"name":"newvodZone7","password":"password"} api.post('/zones/vod.json',data=params)
$params = array("name"=>"newVODZone3","password"=>"password"); $api->post('/zones/vod.json',$params);
api.post('/zones/vod.json', { name: 'newVODZone3', password: 'password' }, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 201, "data": { "vodzone": { "cdn_url": "newvodzone4.alias.netdna-cdn.com", "creation_date": "2013-05-24 16:50:18", "direct_url": "d.newvodzone4.alias.netdna-cdn.com", "ftp_url": "ftp.newvodzone4.alias.netdna-cdn.com", "id": 97319, "inactive": 0, "label": null, "locked": 0, "name": "newvodzone4", "pseudo_url": "p.newvodzone4.alias.netdna-cdn.com", "rtmp_url": "r.newvodzone4.alias.netdna-cdn.com", "server_id": "30", "storage_updated": null, "storage_used": null, "suspend": 0, "tmp_url": "newvodzone4.alias.netdna-cdn.com", "token": null, "type": 4 } } }
Counts all vod zones on the specified account
Parameter | Description |
--- | --- | ---
count
| The number of vod zones on the specified account |
api.get('/zones/vod.json/count')
api.get('/zones/vod.json/count')
$api->get('/zones/vod.json/count');
api.get('/zones/vod.json/count', function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "count": "4" } }
Gets a VOD zone specified by the {zone_id} parameter
Parameter | Description |
--- | --- | ---
id
| VOD Zone ID |
name
| VOD Zone name |
label
| The zone's description |
suspend
| Flag denoting if the zone has been suspended |
locked
| Flag denoting if the zone has been locked |
inactive
| Flag denoting if the zone has been deleted |
creation_date
| Date Created |
id = '97794' api.get('/zones/vod.json/'+id)
id = '96187' api.get('/zones/vod.json/'+id)
$id = '97183'; $api->get('/zones/vod.json/'.$id);
var id = '97183' api.get('/zones/vod.json/' + id, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "vodzone": { "cdn_url": "cdn.somenewdomain3.com", "creation_date": "2013-05-23 21:25:44", "direct_url": "d.newvodzone3.alias.netdna-cdn.com", "ftp_url": "ftp.newvodzone3.alias.netdna-cdn.com", "id": "97183", "inactive": "0", "label": "Some other description", "locked": "0", "name": "newvodzone3", "pseudo_url": "p.newvodzone3.alias.netdna-cdn.com", "rtmp_url": "r.newvodzone3.alias.netdna-cdn.com", "server_id": "30", "storage_updated": "2013-05-24 06:35:35", "storage_used": "4096", "suspend": "0", "tmp_url": "newvodzone3.alias.netdna-cdn.com", "token": null, "type": "4" } } }
Updates a VOD zone specified by the {zone_id} parameter
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
password
| - | length: 5-30 chars | Your desired password |
token
| - | length: 1-64 chars | The token value (shared secret) for secure streaming |
label
| - | length: 1-255 chars | Something that describes your zone |
Parameter | Description |
--- | --- | ---
id
| VOD Zone ID |
name
| VOD Zone name |
label
| The zone's description |
suspend
| Flag denoting if the zone has been suspended |
locked
| Flag denoting if the zone has been locked |
inactive
| Flag denoting if the zone has been deleted |
creation_date
| Date Created |
id = '97794' params = {"label"=>"Some other description"} api.put('/zones/vod.json/'+id,params)
id = '96187' params = {"label":"Some other description"} api.put('/zones/vod.json/'+id,params=params)
$id = '97183'; $params = array("label"=>"Some other description"); $api->put('/zones/vod.json/'.$id,$params);
var id = '97183' api.put('/zones/vod.json/' + id, { label: 'Some other description' }, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "vodzone": { "cdn_url": "cdn.somenewdomain3.com", "creation_date": "2013-05-23 21:25:44", "direct_url": "d.newvodzone3.alias.netdna-cdn.com", "ftp_url": "ftp.newvodzone3.alias.netdna-cdn.com", "id": "97183", "inactive": "0", "label": "Some other description", "locked": "0", "name": "newvodzone3", "pseudo_url": "p.newvodzone3.alias.netdna-cdn.com", "rtmp_url": "r.newvodzone3.alias.netdna-cdn.com", "server_id": "30", "storage_updated": "2013-05-24 06:35:35", "storage_used": "4096", "suspend": "0", "tmp_url": "newvodzone3.alias.netdna-cdn.com", "token": null, "type": "4" } } }
Deletes a VOD zone specified by the {zone_id} parameter
id = '97794' api.delete('/zones/vod.json/'+id)
id = '96187' api.delete('/zones/vod.json/'+id)
$id = '97183'; $api->delete('/zones/vod.json/'.$id);
var id = '97183' api.del('/zones/vod.json/' + id, function(err, response) { console.log('err', err, 'response', response) })
{ "code":200 }
Enables a VOD zone specified by the {zone_id} parameter
id = '97794' api.put('/zones/vod/'+id+'/enable.json')
id = '96187' api.put('/zones/vod/'+id+'/enable.json')
$id = '96187'; $api->put('/zones/vod/'.$id.'/enable.json');
var id = '96187' api.put('/zones/vod/' + id + '/enable.json', function(err, response) { console.log('err', err, 'response', response) })
{ "code":200 }
Disables a VOD zone specified by the {zone_id} parameter
id = '97794' api.put('/zones/vod/'+id+'/disable.json')
id = '96187' api.put('/zones/vod/'+id+'/disable.json')
$id = '96187'; $api->put('/zones/vod/'.$id.'/disable.json');
var id = '96187' api.put('/zones/vod/' + id + '/disable.json', function(err, response) { console.log('err', err, 'response', response) })
{ "code":200 }
Returns a list of all custom domains on the zone specified by {zone_id}
Parameter | Description |
--- | --- | ---
id
| The id of the custom domain |
bucket_id
| The id of the zone the custom domain belongs to |
custom_domain
| A valid custom domain |
id = '97794' api.get('/zones/vod/'+id+'/customdomains.json')
id = '96187' api.get('/zones/vod/'+id+'/customdomains.json')
$id = '97183'; $api->get('/zones/vod/'.$id.'/customdomains.json');
var id = '97183' api.get('/zones/vod.json/' + id + '/customdomains.json, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "customdomains": [ { "bucket_id": "97183", "custom_domain": "cdn.somenewdomain3.com", "id": "79191", "type": "vod-rtmp" } ], "total": 1 } }
Adds a new custom domain to {zone_id}
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
custom_domain
| - | required
length: 1-255 chars, valid::custom_domain, !valid::full_domain | A valid custom domain |
type
| - | Applies only to Vod Zones and must be either 'vod-rtmp','vod-pseudo', 'vod-direct', or 'vod-ftp' | The type of custom domain being created |
Parameter | Description |
--- | --- | ---
id
| The id of the custom domain |
bucket_id
| The id of the zone the custom domain belongs to |
custom_domain
| The valid custom domain |
id = '97794' params = {"custom_domain"=>"cdn.somedomain39.com","type"=>"vod-rtmp"} api.post('/zones/vod/'+id+'/customdomains.json', params)
id = '96187' params = {"custom_domain":"cdn.somedomain16.com","type":"vod-rtmp"} api.post('/zones/vod/'+id+'/customdomains.json', params)
$id = '97183'; $params = array("custom_domain"=>"cdn.somedomain2.com","type"=>"vod-rtmp"); $api->post('/zones/vod/'.$id.'/customdomains.json', $params);
var id = '97183' api.post('/zones/vod/' + id + '/customdomains.json', { custom_domain: 'cdn.somedomain2.com', type: 'vod-rtmp' }, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 201, "data": { "customdomain": { "bucket_id": "97183", "custom_domain": "cdn.somedomain2.com", "id": 79284, "type": "vod-rtmp" } } }
Gets a custom domain specified by the {zone_id} and {customdomain_id} parameters
Parameter | Description |
--- | --- | ---
id
| The id of the custom domain |
bucket_id
| The id of the zone the custom domain belongs to |
custom_domain
| The valid custom domain |
zoneId = '97794' domainId = '79748' api.get('/zones/vod/'+zoneId+'/customdomains.json/'+domainId)
zoneId = '96187' domainId = '79321' api.get('/zones/vod/'+zoneId+'/customdomains.json/'+domainId)
$zoneId = '97183'; $domainId = '79191'; $api->get('/zones/vod/'.$zoneId.'/customdomains.json/'.$domainId);
var zoneId = '97183' var domainId = '79191' api.get('/zones/vod/' + zoneId + '/customdomains.json/' + domainId, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "customdomain": { "bucket_id": "97183", "custom_domain": "cdn.somenewdomain3.com", "id": "79191", "type": "vod-rtmp" } } }
Updates a custom domain specified by the id parameter
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
custom_domain
| - | required
length: 1-255 chars, valid::custom_domain, !valid::full_domain | A new valid custom domain |
Parameter | Description |
--- | --- | ---
id
| The id of the custom domain |
bucket_id
| The id of the zone the custom domain belongs to |
custom_domain
| The new valid custom domain |
zoneId = '97794' domainId = '79748' params = {"custom_domain"=>"cdn.somenewdomain49.com"} api.put('/zones/vod/'+zoneId+'/customdomains.json/'+domainId,params)
zoneId = '96187' domainId = '79321' params = {"custom_domain":"cdn.somenewdomain401.com"} api.put('/zones/vod/'+zoneId+'/customdomains.json/'+domainId,params=params)
$zoneId = '97183'; $domainId = '79191'; $params = array("custom_domain"=>"cdn.somenewdomain3.com"); $api->put('/zones/vod/'.$zoneId.'/customdomains.json/'.$domainId, $params);
var zoneId = '97183' var domainId = '79191' api.put('/zones/vod/' + zoneId + '/customdomains.json/' + domainId, { custom_domain: 'cdn.somenewdomain3.com' }, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "customdomain": { "bucket_id": "97183", "custom_domain": "cdn.somenewdomain42.com", "id": "79284", "type": "vod-rtmp" } } }
Deletes a custom domain specified by the {zone_id} and {customdomain_id} parameters
zoneId = '97794' domainId = '79748' api.delete('/zones/vod/'+zoneId+'/customdomains.json/'+domainId)
zoneId = '96187' domainId = '79321' api.delete('/zones/vod/'+zoneId+'/customdomains.json/'+domainId)
$zoneId = '97183'; $domainId = '79191'; $api->delete('/zones/vod/'.$zoneId.'/customdomains.json/'.$domainId);
var zoneId = '97183' var domainId = '79191' api.del('/zones/vod/' + zoneId + '/customdomains.json/' + domainId, function(err, response) { console.log('err', err, 'response', response) })
{ "code":200 }
Returns a list of all live zones on the specified account
Parameter | Description |
--- | --- | ---
id
| Live Zone ID |
name
| Live Zone name |
label
| The zone's description |
suspend
| Flag denoting if the zone has been suspended |
locked
| Flag denoting if the zone has been locked |
inactive
| Flag denoting if the zone has been deleted |
creation_date
| Date Created |
api.get('/zones/live.json')
api.get('/zones/live.json')
$api->get('/zones/live.json');
api.get('/zones/live.json', function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "current_page_size": 2, "livezones": [ { "cdn_url": "newlivezone.alias.netdna-cdn.com", "creation_date": "2013-05-16 16:23:49", "id": "96193", "inactive": "0", "label": null, "locked": "0", "name": "newlivezone", "pub_url": "publish.newlivezone.alias.netdna-cdn.com/live/96193", "server_id": "3", "suspend": "0", "tmp_url": "newlivezone.alias.netdna-cdn.com", "type": "5", "view_url": "newlivezone.alias.netdna-cdn.com/live/96193" }, { "cdn_url": "newlivezone3.alias.netdna-cdn.com", "creation_date": "2013-05-23 21:50:00", "id": "97185", "inactive": "0", "label": "Some other description", "locked": "0", "name": "newlivezone3", "pub_url": "publish.newlivezone3.alias.netdna-cdn.com/live/97185", "server_id": "3", "suspend": "0", "tmp_url": "newlivezone3.alias.netdna-cdn.com", "type": "5", "view_url": "newlivezone3.alias.netdna-cdn.com/live/97185" } ], "page": 1, "page_size": "50", "pages": 1, "total": 2 } }
Creates a new live zone
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
name
| - | required
length: 3-30 chars; only letters, digits, and dash (-)accepted | Your desired zone name |
password
| - | required
length: 5-30 chars | Your desired password |
label
| - | length: 1-255 chars | Something that describes your zone |
Parameter | Description |
--- | --- | ---
id
| Live Zone ID |
name
| Live Zone name |
label
| The zone's description |
suspend
| Flag denoting if the zone has been suspended |
locked
| Flag denoting if the zone has been locked |
inactive
| Flag denoting if the zone has been deleted |
creation_date
| Date Created |
params = {"name"=>"newLiveZone99","password"=>"password"} api.post('/zones/live.json',params)
params = {"name":"newliveZone7","password":"password"} api.post('/zones/live.json',data=params)
$params = array("name"=>"newLiveZone3","password"=>"password"); $api->post('/zones/live.json', $params);
api.post('/zones/live.json', { name: 'newLiveZone3', password: 'password' }, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 201, "data": { "livezone": { "cdn_url": "newlivezone4.alias.netdna-cdn.com", "creation_date": "2013-05-24 17:01:30", "id": 97323, "inactive": 0, "label": null, "locked": 0, "name": "newlivezone4", "pub_url": "publish.newlivezone4.alias.netdna-cdn.com/live/97323", "server_id": 3, "suspend": 0, "tmp_url": "newlivezone4.alias.netdna-cdn.com", "type": 5, "view_url": "newlivezone4.alias.netdna-cdn.com/live/97323" } } }
Counts all live zones on the specified account
Parameter | Description |
--- | --- | ---
count
| The number of live zones on the specified account |
api.get('/zones/live.json/count')
api.get('/zones/live.json/count')
$api->get('/zones/live.json/count');
api.get('/zones.json', function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "count": "4" } }
Gets a live zone specified by the {zone_id} parameter
Parameter | Description |
--- | --- | ---
id
| Live Zone ID |
name
| Live Zone name |
label
| The zone's description |
suspend
| Flag denoting if the zone has been suspended |
locked
| Flag denoting if the zone has been locked |
inactive
| Flag denoting if the zone has been deleted |
creation_date
| Date Created |
id = '97795' api.get('/zones/live.json/'+id)
id = '96193' api.get('/zones/live.json/'+id)
$id = '97185'; $api->get('/zones/live.json/'.$id);
var id = '97185' api.get('/zones/live.json/' + id, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "livezone": { "cdn_url": "newlivezone3.alias.netdna-cdn.com", "creation_date": "2013-05-23 21:50:00", "id": "97185", "inactive": "0", "label": "Some other description", "locked": "0", "name": "newlivezone3", "pub_url": "publish.newlivezone3.alias.netdna-cdn.com/live/97185", "server_id": "3", "suspend": "0", "tmp_url": "newlivezone3.alias.netdna-cdn.com", "type": "5", "view_url": "newlivezone3.alias.netdna-cdn.com/live/97185" } } }
Updates a live zone specified by the {zone_id} parameter
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
password
| - | length: 5-30 chars | Your desired password |
token
| - | length: 1-64 chars | The token value (shared secret) for secure streaming |
label
| - | length: 1-255 chars | Something that describes your zone |
Parameter | Description |
--- | --- | ---
id
| Live Zone ID |
name
| Live Zone name |
label
| The zone's description |
suspend
| Flag denoting if the zone has been suspended |
locked
| Flag denoting if the zone has been locked |
inactive
| Flag denoting if the zone has been deleted |
creation_date
| Date Created |
id = '96193' params = {"label"=>"Some other description"} api.put('/zones/live.json/'+id,params)
id = '96193' params = {"label":"Some other description"} api.put('/zones/live.json/'+id,params=params)
$id = '97185'; $params = array("label"=>"Some other description"); $api->put('/zones/live.json/'.$id,$params);
var id = '97185' api.put('/zones/live.json/' + id, { label: 'Some other description' }, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "livezone": { "cdn_url": "newlivezone3.alias.netdna-cdn.com", "creation_date": "2013-05-23 21:50:00", "id": "97185", "inactive": "0", "label": "Some other description", "locked": "0", "name": "newlivezone3", "pub_url": "publish.newlivezone3.alias.netdna-cdn.com/live/97185", "server_id": "3", "suspend": "0", "tmp_url": "newlivezone3.alias.netdna-cdn.com", "type": "5", "view_url": "newlivezone3.alias.netdna-cdn.com/live/97185" } } }
Deletes a live zone specified by the {zone_id} parameter
id = '97795' api.delete('/zones/live.json/'+id)
id = '96193' api.delete('/zones/live.json/'+id)
$id = '97185'; $api->delete('/zones/live.json/'.$id);
var id = '97185' api.del('/zones/live.json/' + id, function(err, response) { console.log('err', err, 'response', response) })
{ "code":200 }
Enables a live zone specified by the {zone_id} parameter
id = '97795' api.put('/zones/live/'+id+'/enable.json')
id = '96193' api.put('/zones/live/'+id+'/enable.json')
$id = '96061'; $api->put('/zones/live/'.$id.'/enable.json');
var id = '96061' api.put('/zones/live/' + id + '/enable.json', function(err, response) { console.log('err', err, 'response', response) })
{ "code":200 }
Disables a live zone specified by the {zone_id} parameter
id = '97795' api.put('/zones/live/'+id+'/disable.json')
id = '96193' api.put('/zones/live/'+id+'/disable.json')
$id = '96061'; api->put('/zones/live/'.$id.'/disable.json');
var id = '96061' api.put('/zones/live/' + id + '/disable.json', function(err, response) { console.log('err', err, 'response', response) })
{ "code":200 }
Get the SSL certificate for the specified {zone_type} and {zone_id}.
id = '96061' type = 'pull' api.get('/zones/'+type+'/'+id+'/ssl.json')
id = '96061' type = 'pull' api.get('/zones/'+type+'/'+id+'/ssl.json')
$id = '96061'; $type = 'pull'; $api->get('/zones/'.$type.'/'.$id.'/ssl.json');
var id = '96061' var type = 'pull' api.get('/zones/' + type + '/' + id + '/ssl.json', function(err, response) { console.log('err', err, 'response', response) })
{ "code":201, "data":{ "ssl":{ "id":1459, "ssl_crt":"-----BEGIN CERTIFICATE-----\n{ ... your certificate ... }\n-----END CERTIFICATE-----\n", "ssl_key":"-----BEGIN RSA PRIVATE KEY-----\n{ ... your key ... }\n-----END RSA PRIVATE KEY-----", "ssl_cabundle":null, "date_expiration":"2014-01-24", "anycast_ip_id":null, "wildcard":1, "domain":"*.idcreator.com" } } }
Upload an SSL certificate for the specified {zone_type} and {zone_id}.
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
ssl_crt
| - | required
| The SSL certificate you are installing. |
ssl_key
| - | required
| The key for the SSL certificate you are installing. |
ssl_cabundle
| - | The CA Bundle for the SSL Certificate you are installing. |
Parameter | Description |
--- | --- | ---
id
| The SSL Certificate ID. |
ssl_crt
| The SSL certificate. |
ssl_key
| The SSL Private Key. |
ssl_cabundle
| The CA Bundle for the cert. |
domain
| The domain applicable to this certificate. |
date_expiration
| The date of expiration for the certificate. |
wildcard
| Flag to signify whether this is a wildcard certificate. |
id = '96061' type = 'pull' ssl_crt = "-----BEGIN CERTIFICATE-----\n{ ... your certificate ... }\n-----END CERTIFICATE-----\n" ssl_key = "-----BEGIN RSA PRIVATE KEY-----\n{ ... your key ... }\n-----END RSA PRIVATE KEY-----" params = {"ssl_crt"=> ssl_crt,"ssl_key"=> ssl_key} api.post('/zones/'+type+'/'+id+'/ssl.json',params)
id = '96061' type = 'pull' ssl_crt = "-----BEGIN CERTIFICATE-----\n{ ... your certificate ... }\n-----END CERTIFICATE-----\n" ssl_key = "-----BEGIN RSA PRIVATE KEY-----\n{ ... your key ... }\n-----END RSA PRIVATE KEY-----" params = {"ssl_crt": ssl_crt,"ssl_key": ssl_key} api.post('/zones/'+type+'/'+id+'/ssl.json',params)
$id = '96061'; $type = 'pull'; $ssl_crt = "-----BEGIN CERTIFICATE-----\n{ ... your certificate ... }\n-----END CERTIFICATE-----\n"; $ssl_key = "-----BEGIN RSA PRIVATE KEY-----\n{ ... your key ... }\n-----END RSA PRIVATE KEY-----"; $params = array("ssl_crt"=>$ssl_crt,"ssl_key"=>$ssl_key); $api->post('/zones/'.$type.'/'.$id.'/ssl.json',$params);
var id = '96061' var type = 'pull' var ssl_crt = "-----BEGIN CERTIFICATE-----\n{ ... your certificate ... }\n-----END CERTIFICATE-----\n" var ssl_key = "-----BEGIN RSA PRIVATE KEY-----\n{ ... your key ... }\n-----END RSA PRIVATE KEY-----" api.post('/zones/' + type + '/' + id + '/ssl.json', { ssl_crt: ssl_crt, ssl_key: ssl_key }, function(err, response) { console.log('err', err, 'response', response) })
{ "code":201, "data":{ "ssl":{ "id":1459, "ssl_crt":"-----BEGIN CERTIFICATE-----\n{ ... your certificate ... }\n-----END CERTIFICATE-----\n", "ssl_key":"-----BEGIN RSA PRIVATE KEY-----\n{ ... your key ... }\n-----END RSA PRIVATE KEY-----", "ssl_cabundle":null, "date_expiration":"2014-01-24", "anycast_ip_id":null, "wildcard":1, "domain":"*.idcreator.com" } } }
Update the SSL certificate for the specified {zone_type} and {zone_id}.
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
ssl_crt
| - | required
| The SSL certificate you are installing. |
ssl_key
| - | required
| The key for the SSL certificate you are installing. |
ssl_cabundle
| - | The CABundle for the SSL Certificate you are installing. |
Parameter | Description |
--- | --- | ---
id
| The SSL Certificate ID. |
ssl_crt
| The SSL certificate. |
ssl_key
| The SSL Private Key. |
ssl_cabundle
| The CA Bundle for the cert. |
domain
| The domain applicable to this certificate. |
date_expiration
| The date of expiration for the certificate. |
wildcard
| Flag to signify whether this is a wildcard certificate. |
id = '96061' type = 'pull' ssl_crt = "-----BEGIN CERTIFICATE-----\n{ ... your certificate ... }\n-----END CERTIFICATE-----\n" ssl_key = "-----BEGIN RSA PRIVATE KEY-----\n{ ... your key ... }\n-----END RSA PRIVATE KEY-----" params = {"ssl_crt"=> ssl_crt,"ssl_key"=> ssl_key} api.put('/zones/'+type+'/'+id+'/ssl.json',params)
id = '96061' type = 'pull' ssl_crt = "-----BEGIN CERTIFICATE-----\n{ ... your certificate ... }\n-----END CERTIFICATE-----\n" ssl_key = "-----BEGIN RSA PRIVATE KEY-----\n{ ... your key ... }\n-----END RSA PRIVATE KEY-----" params = {"ssl_crt": ssl_crt,"ssl_key": ssl_key} api.put('/zones/'+type+'/'+id+'/ssl.json',params)
$id = '96061'; $type = 'pull'; $ssl_crt = "-----BEGIN CERTIFICATE-----\n{ ... your certificate ... }\n-----END CERTIFICATE-----\n"; $ssl_key = "-----BEGIN RSA PRIVATE KEY-----\n{ ... your key ... }\n-----END RSA PRIVATE KEY-----"; $ssl_key = " $params = array("ssl_crt"=>$ssl_crt,"ssl_key"=>$ssl_key); $api->put('/zones/'.$type.'/'.$id.'/ssl.json',$params);
var id = '96061' var type = 'pull' var ssl_crt = "-----BEGIN CERTIFICATE-----\n{ ... your certificate ... }\n-----END CERTIFICATE-----\n" var ssl_key = "-----BEGIN RSA PRIVATE KEY-----\n{ ... your key ... }\n-----END RSA PRIVATE KEY-----" api.put('/zones/' + type + '/' + id + '/ssl.json', { ssl_crt: ssl_crt, ssl_key: ssl_key }, function(err, response) { console.log('err', err, 'response', response) })
{ "code":201, "data":{ "ssl":{ "id":1459, "ssl_crt":"-----BEGIN CERTIFICATE-----\n{ ... your certificate ... }\n-----END CERTIFICATE-----\n", "ssl_key":"-----BEGIN RSA PRIVATE KEY-----\n{ ... your key ... }\n-----END RSA PRIVATE KEY-----", "ssl_cabundle":null, "date_expiration":"2014-01-24", "anycast_ip_id":null, "wildcard":1, "domain":"*.idcreator.com" } } }
Remove the SSL certificate for the specified {zone_type} and {zone_id}.
id = '96061' type = 'pull' api.delete('/zones/'+type+'/'+id+'/ssl.json')
id = '96061' type = 'pull' api.delete('/zones/'+type+'/'+id+'/ssl.json')
$id = '96061'; $type = 'pull'; $api->delete('/zones/'.$type.'/'.$id.'/ssl.json');
var id = '96061' var type = 'pull' api.delete('/zones/' + type + '/' + id + '/ssl.json', function(err, response) { console.log('err', err, 'response', response) })
{ "code":200, "data":{ "zone":{ "id":"90652", "name":"newpullzonec5", "username":"username", "company_id":"1234", "url":"http:\/\/someplace.net", "port":"80", "ip":"123.0.0.49", "vhost":"someplace.net", "type":"2", "compress":"0", "backend_compress":"0", "queries":"1", "max_cache_size":"50000", "suspend":"0", "cache_valid":"1d", "content_encoding":"1", "label":"", "inactive":"0", "valid_referers":null, "key_zone_size":"50m", "expires":null, "disallow_robots":"0", "disallow_robots_txt":null, "canonical_link_headers":"0", "content_disposition":"0", "custom_domain_limit":"7", "locked":"0", "server_id":"123", "ssl":0, "sslshared":"0", "creation_date":"2013-07-22 19:00:54", "dsa_ip":null, "geo_enabled":"0", "set_host_header":null, "ssl_id":0, "dns_check":"1", "hit_bandwidth_by_dir":"0", "hit_bandwidth_by_custom_domain":"0", "hit_bandwidth_by_file_name_status_code":"0", "cache_version":"0", "ignore_setcookie_header":"0", "hide_setcookie_header":"0", "ignore_cache_control":"0", "use_stale":"0", "proxy_cache_lock":"0", "pseudo_streaming":"0", "secret":null, "upstream_enabled":"0", "cdn_url":"newpullzonec5.username.netdna-cdn.com", "tmp_url":"newpullzonec5.nycacorp.netdna-cdn.com" } } }
Get the upstream information for the specified {zone_id}.
type = 'pull' id = '96061' api.post('/zones/'+type+'/'+id+'/upstream.json')
type = 'pull' id = '96061' api.post('/zones/'+type+'/'+id+'/upstream.json')
$type = 'pull'; $id = '96061'; $api->post('/zones/'.$type.'/'.$id.'/upstream.json');
var type = 'pull' var id = '96061' api.post('/zones/' + type + '/' + id + '/upstream.json', function(err, response) { console.log('err', err, 'response', response) })
Create and enable Upstream for a specific {zone_id}.
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
server_url
| - | required
| The server url or ip to provide the streaming resources
port
| - | required
| The port where server is to be called
Parameter | Description |
--- | --- | ---
id
| The Upstream ID.
bucket_id
| The bucket_id it belongs to
server_url
| The server url or ip
port
| The port it uses to call the server
type = 'pull' id = '96061' params = {"server_url"=> "http=>//cdn.somedomain.com","server"=> "http=>//cdn.somedomain.com","port"=> "80"} api.post('/zones/'+type+'/'+id+'/upstream.json')
type = 'pull' id = '96061' params = {"server_url": "http://cdn.somedomain.com","server": "http://cdn.somedomain.com","port": "80"} api.post('/zones/'+type+'/'+id+'/upstream.json')
$type = 'pull'; $id = '96061'; $params = array("server_url"=>"http://cdn.somedomain.com","server"=>"http://cdn.somedomain.com","port"=>"80"); $api->post('/zones/'.$type.'/'.$id.'/upstream.json');
var type = 'pull' var id = '96061' api.post('/zones/' + type + '/' + id + '/upstream.json', { server_url: 'http://cdn.somedomain.com', server: 'http://cdn.somedomain.com', port: '80' }, function(err, response) { console.log('err', err, 'response', response) })
Update the Upstream information for the specified {zone_id}.
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
upstream_id
| - | required
| The Upstream Information you're modifying.
server_url
| - | required
| The server url or ip
port
| - | required
| The port it uses to call the server
Parameter | Description |
--- | --- | ---
id
| The Upstream ID.
bucket_id
| The bucket_id it belongs to
server_url
| The server url or ip
port
| The port it uses to call the server
type = 'pull' id = '96061' params = {"upsream_id"=> "93013","server_url"=> "http=>//somedomain.com","port"=> "80"} api.put('/zones/'+type+'/'+id+'/upstream.json')
type = 'pull' id = '96061' params = {"upsream_id": "93013","server_url": "http://somedomain.net","port": "80"} api.put('/zones/'+type+'/'+id+'/upstream.json')
$type = 'pull'; $id = '96061'; $params = array("upstream_id"=>"93013","server_url"=>"http://somedomain.net","port"=>"80"); $api->put('/zones/'.$type.'/'.$id.'/upstream.json');
var type = 'pull' var id = '96061' api.put('/zones/' + type + '/' + id + '/upstream.json', { upstream_id: '93013', server_url: 'http://somedomain.net', port: '80' }, function(err, response) { console.log('err', err, 'response', response) })
Remove the Upstream Information for the specified {zone_id}.
type = 'pull' id = '96061' api.delete('/zones/'+type+'/'+id+'/upstream.json')
type = 'pull' id = '96061' api.delete('/zones/'+type+'/'+id+'/upstream.json')
$type = 'pull'; $id = '96061'; $api->delete('/zones/'.$type.'/'.$id.'/upstream.json');
var type = 'pull' var id = '96061' api.del('/zones/' + type + '/' + id + '/upstream.json', function(err, response) { console.log('err', err, 'response', response) })
Gets all zone usage statistics optionally broken up by {report_type}. If no {report_type} is given the request will return the total usage for the zones.
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
date_from
| now() - 1 month | Y-m-d (e.g. 2012-01-01) | Start date |
date_to
| now() | Y-m-d (e.g. 2012-01-01) | End date |
Parameter | Description |
--- | --- | ---
size
| The amount of bytes transferred |
hit
| The number of times files were requested |
noncache_hit
| The number of times a requested file was not in cache |
cache_hit
| The number of times a requested file was already cached |
timestamp
| The timestamp for the corresponding {report_type}. |
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' api.get('/reports/stats.json'+reportType)
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' api.get('/reports/stats.json'+reportType)
$reportType = ''; //Vaild input includes '/daily', '/hourly', '/monthly' or '' $api->get('/reports/stats.json/'.$reportType);
var reportType = '' //Vaild input includes '/daily', '/hourly', '/monthly' or '' api.get('/reports/stats.json/' + reportType, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "stats": { "cache_hit": "0", "hit": "20", "noncache_hit": "20", "size": "0" }, "total": "1" } }
Gets the {zone_id} usage statistics optionally broken up by {report_type}. If no {report_type} is given the request will return the total usage for the zones.
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
date_from
| now() - 1 month | Y-m-d (e.g. 2012-01-01) | Start date |
date_to
| now() | Y-m-d (e.g. 2012-01-01) | End date |
Parameter | Description |
--- | --- | ---
size
| The amount of bytes transferred |
hit
| The number of times files were requested |
noncache_hit
| The number of times a requested file was not in cache |
cache_hit
| The number of times a requested file was already cached |
timestamp
| The timestamp for the corresponding {report_type}. |
id = '96061' reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' api.get('/reports/'+id+'/stats.json'+reportType)
id = '96061' reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' api.get('/reports/'+id+'/stats.json'+reportType)
$id = '96061'; $reportType = ''; //Vaild input includes '/daily', '/hourly', '/monthly' or '' $api->get('/reports/'.$id.'/stats.json/'.$reportType);
var id = '96061' var reportType = '' //Vaild input includes '/daily', '/hourly', '/monthly' or '' api.get('/reports/' + id + '/stats.json/' + reportType, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "stats": { "cache_hit": null, "hit": null, "noncache_hit": null, "size": null }, "summary": { "cache_hit": null, "hit": null, "noncache_hit": null, "size": null }, "total": "0" } }
Gets a list of all active nodes (locations)
Parameter | Description |
--- | --- | ---
id
| Node Id |
name
| Node 3 letter code |
description
| Full node name |
api.get('/reports/nodes.json')
api.get('/reports/nodes.json')
$api->get('/reports/nodes.json');
api.get('/reports/nodes.json', function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "nodes": [ { "description": "Los Angeles", "id": "1", "name": "lax" }, { "description": "New York", "id": "3", "name": "jfk" }, { "description": "Seattle", "id": "2", "name": "sea" }, { "description": "Atlanta", "id": "4", "name": "atl" }, { "description": "Amsterdam", "id": "5", "name": "ams" }, { "description": "Dallas", "id": "6", "name": "dal" }, { "description": "Chicago", "id": "8", "name": "chi" }, { "description": "Virginia", "id": "9", "name": "vir" }, { "description": "Miami", "id": "7", "name": "mia" }, { "description": "London", "id": "12", "name": "lhr" }, { "description": "San Francisco", "id": "13", "name": "sfo" }, { "description": "Los Angeles 3", "id": "30", "name": "lax" } ] } }
Gets a list of all active nodes (locations) specified by the {zone_id} parameter
Parameter | Description |
--- | --- | ---
id
| Node Id |
name
| Node 3 letter code |
description
| Full node name |
id = '96061' api.get('/reports/'+id+'/nodes.json')
id = '96061' api.get('/reports/'+id+'/nodes.json')
$id = '96061'; $api->get('/reports/'.$id.'/nodes.json');
var id = '96061' api.get('/reports/' + id + '/nodes.json', function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "nodes": [ { "description": "Dallas", "id": "6", "name": "dal" }, { "description": "Los Angeles", "id": "1", "name": "lax" }, { "description": "Seattle", "id": "2", "name": "sea" }, { "description": "New York", "id": "3", "name": "jfk" }, { "description": "Atlanta", "id": "4", "name": "atl" }, { "description": "Amsterdam", "id": "5", "name": "ams" }, { "description": "Chicago", "id": "8", "name": "chi" }, { "description": "Virginia", "id": "9", "name": "vir" }, { "description": "London", "id": "12", "name": "lhr" }, { "description": "San Francisco", "id": "13", "name": "sfo" } ] } }
Get usage statistics broken up by nodes and optionally {report_type}. If no {report_type} is given the request will return the total usage broken up by node.
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
date_from
| now() - 1 month | Y-m-d (e.g. 2012-01-31) | Start date |
date_to
| now() | Y-m-d (e.g. 2012-01-31) | End date |
Parameter | Description |
--- | --- | ---
pop_id
| Node Id |
pop_name
| Node 3 letter code. Only returned when {report_type} is notempty. |
pop_description
| Full node name. Only returned when {report_type} is notempty. |
size
| The amount of bytes transferred |
hit
| The number of times files were requested |
noncache_hit
| The number of times a requested file was not in cache |
cache_hit
| The number of times a requested file was already cached |
timestamp
| A timestamp corresponding to {report_type}. Only returned when{report_type} is not empty. |
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' api.get('/reports/nodes.json/stats'+reportType)
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' api.get('/reports/nodes.json/stats'+reportType)
$reportType = ''; //Vaild input includes '/daily', '/hourly', '/monthly' or '' $api->get('/reports/nodes.json/stats/'.$reportType);
var reportType = '' //Vaild input includes '/daily', '/hourly', '/monthly' or '' api.get('/reports/nodes.json/stats/' + reportType, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "stats": [ { "cache_hit": "0", "hit": "2", "noncache_hit": "2", "pop_description": "Los Angeles", "pop_id": "1", "pop_name": "lax", "size": "0" }, { "cache_hit": "0", "hit": "2", "noncache_hit": "2", "pop_description": "Atlanta", "pop_id": "4", "pop_name": "atl", "size": "0" }, { "cache_hit": "0", "hit": "2", "noncache_hit": "2", "pop_description": "Chicago", "pop_id": "8", "pop_name": "chi", "size": "0" }, { "cache_hit": "0", "hit": "2", "noncache_hit": "2", "pop_description": "San Francisco", "pop_id": "13", "pop_name": "sfo", "size": "0" }, { "cache_hit": "0", "hit": "2", "noncache_hit": "2", "pop_description": "Seattle", "pop_id": "2", "pop_name": "sea", "size": "0" }, { "cache_hit": "0", "hit": "2", "noncache_hit": "2", "pop_description": "Amsterdam", "pop_id": "5", "pop_name": "ams", "size": "0" }, { "cache_hit": "0", "hit": "2", "noncache_hit": "2", "pop_description": "Virginia", "pop_id": "9", "pop_name": "vir", "size": "0" }, { "cache_hit": "0", "hit": "2", "noncache_hit": "2", "pop_description": "New York", "pop_id": "3", "pop_name": "jfk", "size": "0" }, { "cache_hit": "0", "hit": "2", "noncache_hit": "2", "pop_description": "Dallas", "pop_id": "6", "pop_name": "dal", "size": "0" }, { "cache_hit": "0", "hit": "2", "noncache_hit": "2", "pop_description": "London", "pop_id": "12", "pop_name": "lhr", "size": "0" } ], "summary": { "cache_hit": "0", "hit": "20", "noncache_hit": "20", "size": "0" }, "total": "1" } }
Get usage statistics for a particular {zone_id} broken up by nodes and optionally {report_type}. If no {report_type} is given the request will return the total usage broken up by node.
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
date_from
| now() - 1 month | Y-m-d (e.g. 2012-01-01) | Start date |
date_to
| now() | Y-m-d (e.g. 2012-01-01) | End date |
Parameter | Description |
--- | --- | ---
pop_id
| Node Id |
pop_name
| Node 3 letter code. Only returned when {report_type} is notempty. |
pop_description
| Full node name. Only returned when {report_type} is notempty. |
size
| The amount of bytes transferred |
hit
| The number of times files were requested |
noncache_hit
| The number of times a requested file was not in cache |
cache_hit
| The number of times a requested file was already cached |
timestamp
| A timestamp corresponding to {report_type}. Only returned when{report_type} is not empty. |
id = '96061' reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' api.get('/reports/'+id+'/nodes.json/stats'+reportType)
id = '96061' reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' api.get('/reports/'+id+'/nodes.json/stats'+reportType)
$id = '96061'; $reportType = ''; //Vaild input includes '/daily', '/hourly', '/monthly' or '' $api->get('/reports/'.$id.'/nodes.json/stats/'.$reportType);
var id = '96061' var reportType = '' //Vaild input includes '/daily', '/hourly', '/monthly' or '' api.get('/reports/' + id + '/nodes.json/stats/' + reportType, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "stats": [], "summary": { "cache_hit": null, "hit": null, "noncache_hit": null, "size": null }, "total": null } }
Gets the node information for the specified {node_id}
Parameter | Description |
--- | --- | ---
id
| Node Id |
name
| Node 3 letter code |
description
| Full node name |
id = '1' api.get('/reports/nodes.json/'+id)
id = '1' api.get('/reports/nodes.json/'+id)
$id = '1'; $api->get('/reports/nodes.json/'.$id);
var id = '1' api.get('/reports/nodes.json/' + id, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "node": { "description": "Los Angeles", "id": "1", "name": "lax" } } }
Gets the node information for the specified {node_id} and {zone_id}
Parameter | Description |
--- | --- | ---
id
| Node Id |
name
| Node 3 letter code |
description
| Full node name |
zoneId = '96061' nodeId = '1' api.get('/reports/'+zoneId+'/nodes.json/'+nodeId)
zoneId = '96061' nodeId = '1' api.get('/reports/'+zoneId+'/nodes.json/'+nodeId)
$zoneId = '96061'; $nodeId = '1'; $api->get('/reports/'.$zoneId.'/nodes.json/'.$nodeId);
var zoneId = '96061' var nodeId = '1' api.get('/reports/' + zoneId + '/nodes.json/' + nodeId, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "stats": [], "summary": { "cache_hit": null, "hit": null, "noncache_hit": null, "size": null }, "total": null } }
Get usage statistics for a particular {node_id} optionally broken up by {report_type}. If no {report_type} is given the request will return the total usage for the node.
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
date_from
| now() - 1 month | Y-m-d (e.g. 2012-01-01) | Start date. |
date_to
| now() | Y-m-d (e.g. 2012-01-01) | End date. |
Parameter | Description |
--- | --- | ---
size
| The amount of bytes transferred |
hit
| The number of times files were requested |
noncache_hit
| The number of times a requested file was not in cache |
cache_hit
| The number of times a requested file was already cached |
timestamp
| A timestamp corresponding to {report_type}. Only returned when{report_type} is not empty. |
id = '1' reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' api.get('/reports/nodes.json/'+id+'/stats'+reportType)
id = '1' reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' api.get('/reports/nodes.json/'+id+'/stats'+reportType)
$id = '1'; $reportType = ''; //Vaild input includes '/daily', '/hourly', '/monthly' or '' $api->get('/reports/nodes.json/'.$id.'/stats/'.$reportType);
var id = '1' var reportType = '' //Valid input includes '/daily', '/hourly', '/monthly' or '' api.get('/reports/nodes.json/' + id + '/stats/' + reportType, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "stats": [ { "cache_hit": "0", "hit": "2", "noncache_hit": "2", "size": "0" } ], "total": "1" } }
Get usage statistics for a particular {node_id} and {zone_id}, optionally broken up by {report_type}. If no {report_type} is given the request will return the total usage for the node.
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
date_from
| now() - 1 month | Y-m-d (e.g. 2012-01-01) | Start date |
date_to
| now() | Y-m-d (e.g. 2012-01-01) | End date |
Parameter | Description |
--- | --- | ---
size
| The amount of bytes transferred |
hit
| The number of times files were requested |
noncache_hit
| The number of times a requested file was not in cache |
cache_hit
| The number of times a requested file was already cached |
timestamp
| A timestamp corresponding to {report_type}. Only returned when{report_type} is not empty. |
zoneId='96061' nodeId='1' reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' api.get('/reports/'+zoneId+'/nodes.json/'+nodeId+'/stats'+reportType)
zoneId='96061' nodeId='1' reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' api.get('/reports/'+zoneId+'/nodes.json/'+nodeId+'/stats'+reportType)
$zoneId='96061'; $nodeId='1'; $reportType = ''; //Vaild input includes '/daily', '/hourly', '/monthly' or '' $api->get('/reports/'.$zoneId.'/nodes.json/'.$nodeId.'/stats/'.$reportType);
var zoneId = '96061' var nodeId = '1' var reportType = '' //Valid input includes '/daily', '/hourly', '/monthly' or '' api.get('/reports/' + zoneId + '/nodes.json/' + nodeId + '/stats/' + reportType, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "stats": [ { "cache_hit": null, "hit": null, "noncache_hit": null, "size": null } ], "total": "0" } }
Gets the most popularly requested files for your account, grouped into daily statistics
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
date_from
| now() - 1 month | Y-m-d (e.g. 2012-01-01). | Start date |
date_to
| now() | Y-m-d (e.g. 2012-01-01). | End date |
Parameter | Description |
--- | --- | ---
bucket_id
| The Zone ID for the popular file |
uri
| The URI for the requested popular file |
hit
| The number of times the file was requested |
size
| The amount of bytes transferred for the given file |
vhost
| The CDN URL for the corresponding zone |
timestamp
| The amount of bytes transferred |
api.get('/reports/popularfiles.json')
api.get('/reports/popularfiles.json')
$api->get('/reports/popularfiles.json');
api.get('/reports/popularfiles.json', function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "current_page_size": 0, "page": 1, "page_size": "50", "pages": 0, "popularfiles": [], "summary": { "hit": null, "size": null }, "total": "0" } }
Gets the most popularly requested files for your account, filtered by {zone_type} and grouped into daily statistics
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
date_from
| now() - 1 month | Y-m-d (e.g. 2012-01-01) | Start date |
date_to
| now() | Y-m-d (e.g. 2012-01-01) | End date |
Parameter | Description |
--- | --- | ---
bucket_id
| The Zone ID for the popular file |
uri
| The URI for the requested popular file |
hit
| The number of times the file was requested |
size
| The amount of bytes transferred for the given file |
vhost
| The CDN URL for the corresponding zone |
timestamp
| The amount of bytes transferred |
type='pull' api.get('/reports/'+type+'/popularfiles.json')
type='pull' api.get('/reports/'+type+'/popularfiles.json')
$type='pull'; $api->get('/reports/'.$type.'/popularfiles.json');
var type = 'pull' api.get('/reports/' + type + '/popularfiles.json', function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "current_page_size": 0, "page": 1, "page_size": "50", "pages": 0, "popularfiles": [], "summary": { "hit": null, "size": null }, "total": "0" } }
Gets HTTP status code response statistics for your account
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
date_from
| now() - 1 month | Y-m-d (e.g. 2012-01-01) | Start date |
date_to
| now() | Y-m-d (e.g. 2012-01-01) | End date |
Parameter | Description |
--- | --- | ---
status_code
| The HTTP status code for the response |
hit
| The number of responses with this status code |
definition
| The definition for the status code |
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' api.get('/reports/statuscodes.json'+reportType)
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' api.get('/reports/statuscodes.json'+reportType)
$reportType = ''; //Vaild input includes '/daily', '/hourly', '/monthly' or '' $api->get('/reports/statuscodes.json/'.$reportType);
var reportType = '' //Valid input includes '/daily', '/hourly', '/monthly' or '' api.get('/reports/statuscodes.json/' + reportType, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "statuscodes": [ { "definition": "Not Found", "hit": "20", "status_code": "404" } ], "summary": { "hit": "20" }, "total": "1" } }
Gets HTTP status code response statistics for a specific {zone_id}
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
date_from
| now() - 1 month | Y-m-d (e.g. 2012-01-01) | Start date |
date_to
| now() | Y-m-d (e.g. 2012-01-01) | End date |
Parameter | Description |
--- | --- | ---
status_code
| The HTTP status code for the response |
hit
| The number of responses with this status code |
definition
| The definition for the status code |
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' id = '96061' api.get('/reports/'+id+'/statuscodes.json'+reportType)
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' id = '96061' api.get('/reports/'+id+'/statuscodes.json'+reportType)
$reportType = ''; //Vaild input includes '/daily', '/hourly', '/monthly' or '' $id = '96061'; $api->get('/reports/'.$id.'/statuscodes.json/'.$reportType);
var reportType = '' //Valid input includes '/daily', '/hourly', '/monthly' or '' var id = '96061' api.get('/reports/' + id + '/statuscodes.json/' + reportType, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "statuscodes": [], "summary": { "hit": null }, "total": "0" } }
Gets HTTP status code response statistics for a specific {zone_type}
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
date_from
| now() - 1 month | Y-m-d (e.g. 2012-01-01) | Start date |
date_to
| now() | Y-m-d (e.g. 2012-01-01) | End date |
Parameter | Description |
--- | --- | ---
status_code
| The HTTP status code for the response |
hit
| The number of responses with this status code |
definition
| The definition for the status code |
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' zoneType = 'pull' api.get('/reports/'+zoneType+'/statuscodes.json'+reportType)
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' zoneType = 'pull' api.get('/reports/'+zoneType+'/statuscodes.json'+reportType)
$reportType = ''; //Vaild input includes '/daily', '/hourly', '/monthly' or '' $zoneType = 'pull'; $api->get('/reports/'.$zoneType.'/statuscodes.json/'.$reportType);
var reportType = '' //Valid input includes '/daily', '/hourly', '/monthly' or '' var zoneType = 'pull' api.get('/reports/' + zoneType + '/statuscodes.json/' + reportType, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "statuscodes": [ { "definition": "Not Found", "hit": "20", "status_code": "404" } ], "summary": { "hit": "20" }, "total": "1" } }
Gets HTTP status code response statistics for a specific {zone_type} and {zone_id}
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
date_from
| now() - 1 month | Y-m-d (e.g. 2012-01-01) | Start date |
date_to
| now() | Y-m-d (e.g. 2012-01-01) | End date |
Parameter | Description |
--- | --- | ---
status_code
| The HTTP status code for the response |
hit
| The number of responses with this status code |
definition
| The definition for the status code |
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' zoneType = 'pull' id = '96061' api.get('/reports/'+zoneType+'/'+id+'/statuscodes.json'+reportType)
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' zoneType = 'pull' id = '96061' api.get('/reports/'+zoneType+'/'+id+'/statuscodes.json'+reportType)
$reportType = ''; //Vaild input includes '/daily', '/hourly', '/monthly' or '' $zoneType = 'pull'; $id = '96061'; $api->get('/reports/'.$zoneType.'/'.$id.'/statuscodes.json/'.$reportType);
var reportType = '' //Valid input includes '/daily', '/hourly', '/monthly' or '' var zoneType = 'pull' var id = '96061' api.get('/reports/' + zoneType + '/' + id + '/statuscodes.json/' + reportType, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "statuscodes": [], "summary": { "hit": null }, "total": "0" } }
Gets file type statistics for your account
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
date_from
| now() - 1 month | Y-m-d (e.g. 2012-01-01) | Start date |
date_to
| now() | Y-m-d (e.g. 2012-01-01) | End date |
Parameter | Description |
--- | --- | ---
file_type
| The file type requested |
hit
| The number of times a file of this type has been requested |
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' api.get('/reports/filetypes.json'+reportType)
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' api.get('/reports/filetypes.json'+reportType)
$reportType = ''; //Vaild input includes '/daily', '/hourly', '/monthly' or '' $api->get('/reports/filetypes.json'.$reportType);
var reportType = '' //Valid input includes '/daily', '/hourly', '/monthly' or '' api.get('/reports/filetypes.json', function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "current_page_size": 1, "filetypes": [ { "file_type": "txt", "hit": "20" } ], "page": 1, "page_size": "50", "pages": 1, "summary": { "hit": "20" }, "total": "1" } }
Gets file type statistics for a specific {zone_id}
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
date_from
| now() - 1 month | Y-m-d e.g. 2012-01-01 | Start date |
date_to
| now() | Y-m-d e.g. 2012-01-01 | End date |
Parameter | Description |
--- | --- | ---
file_type
| The file type requested |
hit
| The number of times a file of this type has been requested |
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' id = '96061' api.get('/reports/'+id+'/filetypes.json'+reportType)
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' id = '96061' api.get('/reports/'+id+'/filetypes.json'+reportType)
$reportType = ''; //Vaild input includes '/daily', '/hourly', '/monthly' or '' $id = '96061'; $api->get('/reports/'.$id.'/filetypes.json/'.$reportType);
var reportType = '' //Valid input includes '/daily', '/hourly', '/monthly' or '' var id = '96061' api.get('/reports/' + id + '/filetypes.json/' + reportType, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "current_page_size": 0, "filetypes": [], "page": 1, "page_size": "50", "pages": 0, "summary": { "hit": null }, "total": "0" } }
Gets file type statistics for a specific {zone_type}
Parameter | Description |
--- | --- | ---
file_type
| The file type requested |
hit
| The number of times a file of this type has been requested |
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' zoneType = 'pull' api.get('/reports/'+zoneType+'/filetypes.json'+reportType)
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' zoneType = 'pull' api.get('/reports/'+zoneType+'/filetypes.json'+reportType)
$reportType = ''; //Vaild input includes '/daily', '/hourly', '/monthly' or '' $zoneType = 'pull'; $api->get('/reports/'.$zoneType.'/filetypes.json/'.$reportType);
var reportType = '' //Valid input includes '/daily', '/hourly', '/monthly' or '' var zoneType = 'pull' api.get('/reports/' + zoneType + '/filetypes.json/' + reportType, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "current_page_size": 1, "filetypes": [ { "file_type": "txt", "hit": "20" } ], "page": 1, "page_size": "50", "pages": 1, "summary": { "hit": "20" }, "total": "1" } }
Gets file type statistics for a specific {zone_type} and {zone_id}
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
date_from
| now() - 1 month | Y-m-d (e.g. 2012-01-01) | Start date |
date_to
| now() | Y-m-d (e.g. 2012-01-01) | End date |
Parameter | Description |
--- | --- | ---
file_type
| The file type requested |
hit
| The number of times a file of this type has been requested |
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' zoneType = 'pull' id = '96061' api.get('/reports/'+zoneType+'/'+id+'/filetypes.json'+reportType)
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' zoneType = 'pull' id = '96061' api.get('/reports/'+zoneType+'/'+id+'/filetypes.json'+reportType)
$reportType = ''; //Vaild input includes '/daily', '/hourly', '/monthly' or '' $zoneType = 'pull'; $id = '96061'; $api->get('/reports/'.$zoneType.'/'.$id.'/filetypes.json/'.$reportType);
var reportType = '' //Valid input includes '/daily', '/hourly', '/monthly' or '' var zoneType = 'pull' var id = '96061' api.get('/reports/' + zoneType + '/' + id + '/filetypes.json/' + reportType, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "current_page_size": 0, "filetypes": [], "page": 1, "page_size": "50", "pages": 0, "summary": { "hit": null }, "total": "0" } }
Gets request statistics for your account based on file size ranges
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
date_from
| now() - 1 month | Y-m-d (e.g. 2012-01-01) | Start date |
date_to
| now() | Y-m-d (e.g. 2012-01-01) | End date |
Parameter | Description |
--- | --- | ---
le_10k_hits
| The number of requests for files <= 10KB |
le_50k_hits
| The number of requests for files <= 50KB |
le_100k_hits
| The number of requests for files <= 100KB |
le_500k_hits
| The number of requests for files <= 500KB |
le_1m_hits
| The number of requests for files <= 1MB |
le_10m_hits
| The number of requests for files <= 10MB |
le_100m_hits
| The number of requests for files <= 100MB |
gt_100m_hits
| The number of requests for files > 100MB |
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' zoneType = 'pull' id = '96061' api.get('/reports/'+zoneType+'/'+id+'/filetypes.json'+reportType)
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' api.get('/reports/filesizes.json'+reportType)
$reportType = ''; //Vaild input includes '/daily', '/hourly', '/monthly' or '' $api->get('/reports/filesizes.json/'.$reportType);
var reportType = '' //Valid input includes '/daily', '/hourly', '/monthly' or '' api.get('/reports/filesizes.json/' + reportType, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "filesizes": [ { "gt_100m_hit": "0", "le_100k_hit": "0", "le_100m_hit": "0", "le_10k_hit": "20", "le_10m_hit": "0", "le_1m_hit": "0", "le_500k_hit": "0", "le_50k_hit": "0" } ], "summary": { "hit": "20" } } }
Gets request statistics for the specified {zone_id} based on file size ranges
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
date_from
| now() - 1 month | Y-m-d e.g. 2012-01-01 | Start date |
date_to
| now() | Y-m-d e.g. 2012-01-01 | End date |
Parameter | Description |
--- | --- | ---
le_10k_hits
| The number of requests for files <= 10KB |
le_50k_hits
| The number of requests for files <= 50KB |
le_100k_hits
| The number of requests for files <= 100KB |
le_500k_hits
| The number of requests for files <= 500KB |
le_1m_hits
| The number of requests for files <= 1MB |
le_10m_hits
| The number of requests for files <= 10MB |
le_100m_hits
| The number of requests for files <= 100MB |
gt_100m_hits
| The number of requests for files > 100MB |
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' id = '96061' api.get('/reports/'+id+'/filesizes.json'+reportType)
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' id = '96061' api.get('/reports/'+id+'/filesizes.json'+reportType)
$reportType = ''; //Vaild input includes '/daily', '/hourly', '/monthly' or '' $id = '96061'; $api->get('/reports/'.$id.'/filesizes.json/'.$reportType);
var reportType = '' //Valid input includes '/daily', '/hourly', '/monthly' or '' var id = '96061' api.get('/reports/' + id + '/filesizes.json/' + reportType, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "filesizes": [ { "gt_100m_hit": null, "le_100k_hit": null, "le_100m_hit": null, "le_10k_hit": null, "le_10m_hit": null, "le_1m_hit": null, "le_500k_hit": null, "le_50k_hit": null } ], "summary": { "hit": null } } }
Gets request statistics for the specified {zone_type} based on file size ranges
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
date_from
| now() - 1 month | Y-m-d e.g. 2012-01-01 | Start date |
date_to
| now() | Y-m-d e.g. 2012-01-01 | End date |
Parameter | Description |
--- | --- | ---
le_10k_hits
| The number of requests for files <= 10KB |
le_50k_hits
| The number of requests for files <= 50KB |
le_100k_hits
| The number of requests for files <= 100KB |
le_500k_hits
| The number of requests for files <= 500KB |
le_1m_hits
| The number of requests for files <= 1MB |
le_10m_hits
| The number of requests for files <= 10MB |
le_100m_hits
| The number of requests for files <= 100MB |
gt_100m_hits
| The number of requests for files > 100MB |
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' zoneType = 'pull' api.get('/reports/'+zoneType+'/filesizes.json'+reportType)
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' zoneType = 'pull' api.get('/reports/'+zoneType+'/filesizes.json'+reportType)
$reportType = ''; //Vaild input includes '/daily', '/hourly', '/monthly' or '' $zoneType = 'pull'; $api->get('/reports/'.$zoneType.'/filesizes.json/'.$reportType);
var reportType = '' //Valid input includes '/daily', '/hourly', '/monthly' or '' var zoneType = 'pull' api.get('/reports/' + zoneType + '/filesizes.json/' + reportType, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "filesizes": [ { "gt_100m_hit": "0", "le_100k_hit": "0", "le_100m_hit": "0", "le_10k_hit": "20", "le_10m_hit": "0", "le_1m_hit": "0", "le_500k_hit": "0", "le_50k_hit": "0" } ], "summary": { "hit": "20" } } }
Gets request statistics for the specified {zone_type} and {zone_id} based on file size ranges
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
date_from
| now() - 1 month | Y-m-d (e.g. 2012-01-01) | Start date |
date_to
| now() | Y-m-d (e.g. 2012-01-01) | End date |
Parameter | Description |
--- | --- | ---
le_10k_hits
| The number of requests for files <= 10KB |
le_50k_hits
| The number of requests for files <= 50KB |
le_100k_hits
| The number of requests for files <= 100KB |
le_500k_hits
| The number of requests for files <= 500KB |
le_1m_hits
| The number of requests for files <= 1MB |
le_10m_hits
| The number of requests for files <= 10MB |
le_100m_hits
| The number of requests for files <= 100MB |
gt_100m_hits
| The number of requests for files > 100MB |
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' zoneType = 'pull' id = '96061' api.get('/reports/'+zoneType+'/'+id+'/filesizes.json'+reportType)
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' zoneType = 'pull' id = '96061' api.get('/reports/'+zoneType+'/'+id+'/filesizes.json'+reportType)
$reportType = ''; //Vaild input includes '/daily', '/hourly', '/monthly' or '' $zoneType = 'pull'; $id = '96061'; $api->get('/reports/'.$zoneType.'/'.$id.'/filesizes.json/'.$reportType);
var reportType = '' //Valid input includes '/daily', '/hourly', '/monthly' or '' var zoneType = 'pull' var id = '96061' api.get('/reports/' + zoneType + '/' + id + '/filesizes.json/' + reportType, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "filesizes": [ { "gt_100m_hit": null, "le_100k_hit": null, "le_100m_hit": null, "le_10k_hit": null, "le_10m_hit": null, "le_1m_hit": null, "le_500k_hit": null, "le_50k_hit": null } ], "summary": { "hit": null } } }
Gets usage statistics by directory for your account. (This report has to be enabled by Sales).
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
date_from
| now() - 1 month | Y-m-d (e.g. 2012-01-01) | Start date |
date_to
| now() | Y-m-d (e.g. 2012-01-01) | End date |
Parameter | Description |
--- | --- | ---
bucket_id
| The Zone ID for the top level directory |
dir
| The name of the directory |
hit
| The number of requests made to files within this directory |
size
| The amount of bytes transferred from within this directory |
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' api.get('/reports/statsbydir.json'+reportType)
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' api.get('/reports/statsbydir.json'+reportType)
$reportType = ''; //Vaild input includes '/daily', '/hourly', '/monthly' or '' $api->get('/reports/statsbydir.json/'.$reportType);
var reportType = '' //Valid input includes '/daily', '/hourly', '/monthly' or '' api.get('/reports/statsbydir.json/' + reportType, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "current_page_size": 0, "page": 1, "page_size": "50", "pages": 0, "statsbydir": [], "summary": { "hit": null, "size": null }, "total": "0" } }
Gets usage statistics by directory for the specified {zone_id}. (This report has to be enabled by Sales).
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
date_from
| now() - 1 month | Y-m-d (e.g. 2012-01-01) | Start date |
date_to
| now() | Y-m-d (e.g. 2012-01-01) | End date |
Parameter | Description |
--- | --- | ---
bucket_id
| The Zone ID for the top level directory |
dir
| The name of the directory |
hit
| The number of requests made to files within this directory |
size
| The amount of bytes transferred from within this directory |
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' id = '96061' api.get('/reports/'+id+'/statsbydir.json'+reportType)
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' id = '96061' api.get('/reports/'+id+'/statsbydir.json'+reportType)
$reportType = ''; //Vaild input includes '/daily', '/hourly', '/monthly' or '' $id = '96061'; $api->get('/reports/'.$id.'/statsbydir.json/'.$reportType);
var reportType = '' //Valid input includes '/daily', '/hourly', '/monthly' or '' var id = '96061' api.get('/reports/' + id + '/' + '/statsbydir.json/' + reportType, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "current_page_size": 0, "page": 1, "page_size": "50", "pages": 0, "statsbydir": [], "summary": { "hit": null, "size": null }, "total": "0" } }
Gets usage statistics by file name for your account
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
date_from
| now() - 1 month | Y-m-d (e.g. 2012-01-01) | Start date |
date_to
| now() | Y-m-d (e.g. 2012-01-01) | End date |
file_names
| A JSON Encoded file names list |
filter
| Matching expression for file names |
sort_by
| Field to sort by |
sort_dir
| Directory to sort files by |
page_size
| - | The number of records returned in the result set |
Parameter | Description |
--- | --- | ---
200
| The amount of 200 hits |
206
| The amount of 206 hits |
2xx
| The amount of 2xx hits |
3xx
| The amount of 3xx hits |
404
| The amount of 404 hits |
4xx
| The amount of 4xx hits |
5xx
| The amount of 5xx hits |
bucket_id
| The Zone ID for the top level directory |
file_name
| URI |
hit
| The number of requests made to files within this directory |
size
| The amount of bytes transferred from within this directory |
timestampf
| Timestamp |
vhost
| CDN URL |
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' clientId = '' api.get('/clients/'+clientId+'/reports/statsbyfilename.json'+reportType)
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' clientId = '' api.get('/clients/'+clientId+'/reports/statsbyfilename.json'+reportType)
$reportType = ''; //Vaild input includes '/daily', '/hourly', '/monthly' or '' $clientId = ''; $api->get('/clients/'.$clientId.'/reports/statsbyfilename.json/'.$reportType);
var reportType = '' //Valid input includes '/daily', '/hourly', '/monthly' or '' var clientId = '' api.get('/clients/' + clientId + '/reports/statsbyfilename.json/' + reportType, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "statsbyfilename": [ { "200": "0", "206": "0", "2xx": "0", "3xx": "0", "404": "0", "4xx": "0", "5xx": "35036", "bucket_id": "21597", "file_name": "/", "hit": "35036", "size": "20110664", "timestampf": "2013", "vhost": "edge02.nycacorp.netdna-cdn.com" }, { "200": "0", "206": "0", "2xx": "0", "3xx": "0", "404": "0", "4xx": "2", "5xx": "35032", "bucket_id": "21597", "file_name": "/favicon.ico", "hit": "35034", "size": "20108368", "timestampf": "2013", "vhost": "edge02.nycacorp.netdna-cdn.com" } ], "summary": { "200": "0", "206": "0", "2xx": "0", "3xx": "0", "404": "0", "4xx": "2", "5xx": "70068", "hit": "70070", "size": "40219032" }, "total": "2" } }
Gets usage statistics by file name for the specified {zone_id}
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
date_from
| now() - 1 month | Y-m-d (e.g. 2012-01-01) | Start date |
date_to
| now() | Y-m-d (e.g. 2012-01-01) | End date |
file_names
| A JSON Encoded file names list |
filter
| Matching expression for file names |
sort_by
| Field to sort by |
sort_dir
| Directory to sort files by |
page_size
| - | The number of records returned in the result set |
Parameter | Description |
--- | --- | ---
bucket_id
| The Zone ID for the top level directory |
hit
| The number of requests made to files within this directory |
size
| The amount of bytes transferred from within this directory |
200
| The amount of 200 hits |
206
| The amount of 206 hits |
2xx
| The amount of 2xx hits |
3xx
| The amount of 3xx hits |
404
| The amount of 404 hits |
4xx
| The amount of 4xx hits |
5xx
| The amount of 5xx hits |
timestampf
| Timestamp |
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' id = '' clientId = '' api.get('/clients/'+clientId+'/reports/'+id+'/statsbyfilename.json'+reportType)
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' id = '' clientId = '' api.get('/clients/'+clientId+'/reports/'+id+'/statsbyfilename.json'+reportType)
$reportType = ''; //Vaild input includes '/daily', '/hourly', '/monthly' or '' $id = '96061'; $clientId = ''; $api->get('/clients/'.$clientId.'/reports/'.$id.'/statsbyfilename.json/'.$reportType);
var reportType = '' //Valid input includes '/daily', '/hourly', '/monthly' or '' var id = '96061' var clientId = '' api.get('/clients/' + clientId + '/reports/' + id + '/statsbyfilename.json/' + reportType, function(err, response) { console.log('err', err, 'response', response) })
Non functional
Gets usage statistics by custom domain for your account. (This report has to be enabled by Sales).
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
date_from
| now() - 1 month | Y-m-d (e.g. 2012-01-01) | Start date |
date_to
| now() | Y-m-d (e.g. 2012-01-01) | End date |
Parameter | Description |
--- | --- | ---
bucket_id
| The Zone ID for the custom domain |
custom_domain_id
| The ID of your custom domain |
hit
| The number of requests made to this custom domain |
size
| The amount of bytes transferred to/from this custom domain |
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' clientId = '' api.get('/clients/'+clientId+'/reports/statsbycustomdomain.json'+reportType)
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' clientId = '' api.get('/clients/'+clientId+'/reports/statsbycustomdomain.json'+reportType)
$reportType = ''; //Vaild input includes '/daily', '/hourly', '/monthly' or '' $clientId = ''; $api->get('clients/'.$clientId.'/reports/statsbycustomdomain.json/'.$reportType);
var reportType = '' //Valid input includes '/daily', '/hourly', '/monthly' or '' var clientId = '' api.get('/clients/' + clientId + '/reports/statsbycustomdomain.json/' + reportType, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "current_page_size": 1, "page": 1, "page_size": "50", "pages": 1, "statsbycustomdomain": [ { "bucket_id": "21597", "custom_domain_id": "0", "hit": "70320", "size": "40362532", "vhost": "edge02.nycacorp.netdna-cdn.com" } ], "summary": { "hit": "70320", "size": "40362532" }, "total": "1" } }
Gets usage statistics by custom domain for the specified {zone_id}. (This report has to be enabled by Sales).
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
date_from
| now() - 1 month | Y-m-d (e.g. 2012-01-01) | Start date |
date_to
| now() | Y-m-d (e.g. 2012-01-01) | End date |
Parameter | Description |
--- | --- | ---
bucket_id
| The Zone ID for the top level directory |
custom_domain_id
| The ID of the Custom Domain |
hit
| The number of requests made to this custom domain |
size
| The amount of bytes transferred to/from this custom domain |
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' zoneId = '' clientId = '' api.get('/clients/'+clientId+'/reports/'+zoneId+'/statsbycustomdomain.json'+reportType)
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' zoneId = '84199' clientId = '1' api.get('/clients/'+clientId+'/reports/'+zoneId+'/statsbycustomdomain.json'+reportType)
$reportType = ''; //Vaild input includes '/daily', '/hourly', '/monthly' or '' $zoneId = ''; $clientId = ''; $api->get('clients/'.$clientId.'/reports/'.$zoneId.'/statsbycustomdomain.json/'.$reportType);
var reportType = '' //Valid input includes '/daily', '/hourly', '/monthly' or '' var zoneId = '' var clientId = '' api.get('/clients/' + clientId + '/reports/' + zoneId + '/statsbycustomdomain.json/' + reportType, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "current_page_size": 0, "page": 1, "page_size": "50", "pages": 0, "statsbycustomdomain": [], "summary": { "hit": null, "size": null }, "total": "0" } }
Gets zone stats in hourly, daily, or monthly summaries
Parameter | Default Value | Validation | Description |
--- | --- | --- | --- | ---
date_from
| - | Y-m-d e.g. 2012-01-01 | Start date |
date_to
| - | Y-m-d e.g. 2012-01-01 | End date |
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' api.get('/reports/live/connectionstats.json'+reportType)
reportType = '' #Valid input includes '/daily', '/hourly', '/monthly' or '' api.get('/reports/live/connectionstats.json'+reportType)
$reportType = ''; //Vaild input includes '/daily', '/hourly', '/monthly' or '' $api->get('/reports/live/connectionstats.json/'.$reportType);
var reportType = '' //Valid input includes '/daily', '/hourly', '/monthly' or '' api.get('/reports/live/connectionstats.json/' + reportType, function(err, response) { console.log('err', err, 'response', response) })
{ "code": 200, "data": { "current_page_size": 0, "page": 1, "page_size": "50", "pages": 0, "stats": [], "total": "0" } }