Skip to content

Kcrainman/netdna.github.com

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NetDNA API Docs

NetDNA is a content delivery network ("CDN") provider.

Index

Overview

  1. Sign up for a free NetDNA developer account.

  2. Create a new application.

  3. Integrate with our RESTful API using your language wrapper:

Follow the documentation for our API below!

Support

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.

Feel free to tweet and follow us @netdna and @netdnasupport.

Changelog

Reference to History.md for a complete log of API changes and improvements.


Key: Path Parameters

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.

Account API

Get Account

Gets account information

Response Parameters

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 |

Code Samples


  
api.get("/account.json")
$api->get('/account.json');
var netdna = require('netdna')({
	companyAlias: 'alias'
	, consumerKey: 'key'
	, consumerSecret: 'secret'
})
netdna.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"
        }
    }
}
<script> $(function () { $('#myTab1 a:last').tab('show'); }) </script>

Update Account

Updates account information

Accepted Request Parameters

Parameter | Default Value | Validation | Description | --- | --- | --- | --- | --- name | - | required
length: 1-30 chars | The name of your account |

Response Parameters

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 |

Code Samples


  
params={"name": "Monty"}
	api.put('/account.json',params=params)
$api->put('/account.json',array("name"=>"newName"));
var netdna = require('netdna')({
	companyAlias: 'alias'
	, consumerKey: 'key'
	, consumerSecret: 'secret'
})
netdna.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"
        }
    }
}
<script> $(function () { $('#myTab2 a:last').tab('show'); }) </script>

Get Account Address

Gets account address information

Response Parameters

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 |

Code Samples

		
api.get('/account.json/address')
$api->get('/account.json/address')
var netdna = require('netdna')({
	companyAlias: 'alias'
	, consumerKey: 'key'
	, consumerSecret: 'secret'
})
netdna.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"
        }
    }
}
<script> $(function () { $('#myTab3 a:last').tab('show'); }) </script>

Update Account Address

Updates account address information

Accepted Request Parameters

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 |

Response Parameters

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 |

Code Samples

		
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);
var netdna = require('netdna')({
	companyAlias: 'alias'
	, consumerKey: 'key'
	, consumerSecret: 'secret'
})
netdna.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"
        }
    }
}
<script> $(function () { $('#myTab4 a:last').tab('show'); }) </script>

Users API

List Users

Returns a list of all users on the specified account

Response Parameters

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 |

Code Samples

		
api.get('/users.json')
$api->get('/users.json');
var netdna = require('netdna')({
	companyAlias: 'alias'
	, consumerKey: 'key'
	, consumerSecret: 'secret'
})
netdna.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"
            }
        ]
    }
}
<script> $(function () { $('#myTab5 a:last').tab('show'); }) </script>

Create User

Creates a new user on the specified account

Accepted Request Parameters

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) |

Response Parameters

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 |

Code Samples

		
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 );
var netdna = require('netdna')({
	companyAlias: 'alias'
	, consumerKey: 'key'
	, consumerSecret: 'secret'
})
netdna.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"
        }
    }
}
<script> $(function () { $('#myTab6 a:last').tab('show'); }) </script>

Get User

Gets a user specified by the {user_id} parameter

Response Parameters

Parameter | Description | --- | --- | --- id | User ID | email | Email Address | firstname | First Name | lastname | Last Name | phone | Phone Number | timezone | User's Timezone |

Code Samples


  
id = '33706'
api.get('/users.json/'+id)
$id = '33941';
$api->get('/users.json/'.$id);
var netdna = require('netdna')({
	companyAlias: 'alias'
	, consumerKey: 'key'
	, consumerSecret: 'secret'
})
var id = '33941'
netdna.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"
        }
    }
}
<script> $(function () { $('#myTab7 a:last').tab('show'); }) </script>

Update User

Updates a user specified by the {user_id} parameter

Accepted Request Parameters

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) |

Response Parameters

Parameter | Description | --- | --- | --- id | User ID | email | Email Address | firstname | First Name | lastname | Last Name | phone | Phone Number | timezone | User's Timezone |

Code Samples


  
api.put('/users.json/'+id,params={'firstname': 'Verran'})
$id = '33941';
$params =  array("firstname"=>"Billy");
$api->put('/users.json/'.$id,$params);
var netdna = require('netdna')({
	companyAlias: 'alias'
	, consumerKey: 'key'
	, consumerSecret: 'secret'
})
var id = '33941'
netdna.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"
        }
    }
}
<script> $(function () { $('#myTab8 a:last').tab('show'); }) </script>

Delete User

Deletes a user specified by the {user_id} parameter

Code Samples


  
id = '33706'
api.delete('/users.json/'+id)
$id = '33715';
$api->delete('/users.json/'.$id);
var netdna = require('netdna')({
	companyAlias: 'alias'
	, consumerKey: 'key'
	, consumerSecret: 'secret'
})
var id = '33715'
netdna.del('/users.json/' + id, callback)
function callback(err, response) {
  if (err) return console.log(err)
  console.log(response)
}
{
	"code":200
}
<script> $(function () { $('#myTab9 a:last').tab('show'); }) </script>

Zones API

List Zones

Returns a list of all zones on the specified account

Code Samples


  
api.get('/zones.json')
$api->get('/zones.json');
netdna.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"
            }
        ]
    }
}
<script> $(function () { $('#myTab10 a:last').tab('show'); }) </script>

Get Zone Summary

Gets a summarized count of all zone types on the specified account

Response Parameters

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 |

Code Samples


  
api.get('/zones.json/summary')
$api->get('/zones.json/summary');
netdna.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
        }
    }
}
<script> $(function () { $('#myTab11 a:last').tab('show'); }) </script>

Get Zone Count

Counts all zones on the specified account

Response Parameters

Parameter | Description | --- | --- | --- count | The total number of content zones for your account |

Code Samples


  
api.get('/zones.json/count')
$api->get('/zones.json/count');
netdna.get('/zones.json/count', function(err, response) {
  console.log('err', err, 'response', response)
})
{"code":200,"data":
	{
		"count":"4"
	}
}
<script> $(function () { $('#myTab12 a:last').tab('show'); }) </script>

Pull Zone API

List Pull Zones

Returns a list of all pull zones on the specified account

Response Parameters

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 |

Code Samples


  
api.get('/zones/pull.json')
$api->get('/zones/pull.json');
netdna.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
    }
}
<script> $(function () { $('#myTab13 a:last').tab('show'); }) </script>

Create Pull Zone

Creates a new pull zone

Accepted Request Parameters

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. |

Response Parameters

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 |

Code Samples


  
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);
netdna.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
        }
    }
}
<script> $(function () { $('#myTab14 a:last').tab('show'); }) </script>

Get Pull Zones Count

Counts all pull zones on the specified account

Response Parameters

Parameter | Description | --- | --- | --- count | The number of pull zones on the specified account |

Code Samples


  
api.get('/zones/pull.json/count')
$api->get('/zones/pull.json/count');
netdna.get('/zones/pull.json/count', function(err, response) {
  console.log('err', err, 'response', response)
})
{"code":200,"data":
	{
    "count": "3"
	}
}
<script> $(function () { $('#myTab15 a:last').tab('show'); }) </script>

Get Pull Zone

Gets a pull zone specified by the {zone_id} parameter

Response Parameters

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 |

Code Samples


  
api.get('/zones/pull.json/'+id)
$id = '96076';
$api->get('/zones/pull.json/'.$id);
var id = '96076'
netdna.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
        }
    }
}
<script> $(function () { $('#myTab16 a:last').tab('show'); }) </script>

Update Pull Zone

Updates a pull zone specified by the {zone_id} parameter

Accepted Request Parameters

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. |

Response Parameters

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 |

Code Samples


  
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'
netdna.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
        }
    }
}
<script> $(function () { $('#myTab17 a:last').tab('show'); }) </script>

Delete Pull Zone

Deletes a pull zone specified by the {zone_id} parameter

Code Samples


  
id = '97167'
api.delete('/zones/pull.json/'+id)
$id = '97167';
$api->delete('/zones/pull.json/'.$id);
var id = '97167'
netdna.del('/zones/pull.json' + id, function(err, response) {
  console.log('err', err, 'response', response)
})
{
	"code":200
}
<script> $(function () { $('#myTab18 a:last').tab('show'); }) </script>

Enable Pull Zone

Enables a pull zone specified by the {zone_id} parameter

Code Samples


  
id = '97167'
api.enable('/zones/pull.json/'+id)
$id = '97167';
$api->enable('/zones/pull.json/'.$id);
var id = '97167'
netdna.enable('/zones/pull.json' + id, function(err, response) {
  console.log('err', err, 'response', response)
})

  
<script> $(function () { $('#myTab19 a:last').tab('show'); }) </script>

Disable Pull Zone

Disables a pull zone specified by the {zone_id} parameter

Code Samples


  
id = '97167'
api.disable('/zones/pull.json/'+id)
$id = '97167';
$api->disable('/zones/pull.json/'.$id);
var id = '97167'
netdna.disable('/zones/pull.json' + id, function(err, response) {
  console.log('err', err, 'response', response)
})
{
	"code":200
}
<script> $(function () { $('#myTab20 a:last').tab('show'); }) </script>

Purge Cache

Purges pull zone cache

Accepted Request Parameters

Parameter | Default Value | Validation | Description | --- | --- | --- | --- | --- files | - | An array containing relative paths of the files to purge (i.e./favicon.ico) |

Code Samples

api.purge(zone_id)
api.purge(zone_id, '/some_file')
api.purge(zone_id, ['/some_file', '/another_file'])
id = '97167'
params = {"file":"/robots.txt"}
api.delete('/zones/pull.json/'+id+'/cache',data=params)
$id = '97167';
$params = array('file' => '/robots.txt');
$api->delete('/zones/pull.json/'.$id.'/cache', $params);
var netdna = require('netdna')({
	companyAlias: 'alias'
	, consumerKey: 'key'
	, consumerSecret: 'secret'
})
netdna.del('/zones/pull.json/zone_id', callback)
function callback(err, response) {
  if (err) return console.log(err)
  console.log(response)
}
{
    "code": 200
}
<script> $(function () { $('#myTab21 a:last').tab('show'); }) </script>

Pull Zone Custom Domains API

List Custom Domains

Returns a list of all custom domains on the zone specified by {zone_id}

Response Parameters

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 |

Code Samples


  
id = '97167'
api.get('/zones/pull/'+id+'/customdomains.json')
$id = '96061';
$api->get('/zones/pull/'.$id.'/customdomains.json');
var id = '96061'
netdna.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
    }
}
<script> $(function () { $('#myTab22 a:last').tab('show'); }) </script>

Create Custom Domain

Adds a new custom domain to {zone_id}

Accepted Request Parameters

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 |

Response 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 |

Code Samples


  
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'
netdna.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
        }
    }
}
<script> $(function () { $('#myTab23 a:last').tab('show'); }) </script>

Get Custom Domain

Gets a custom domain specified by the {zone_id} and {customdomain_id} parameters

Response 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 |

Code Samples

		
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'
netdna.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
        }
    }
}
<script> $(function () { $('#myTab24 a:last').tab('show'); }) </script>

Update Custom Domain

Updates a custom domain specified by the id parameter

Accepted Request Parameters

Parameter | Default Value | Validation | Description | --- | --- | --- | --- | --- custom_domain | - | required
length: 1-255 chars, valid::custom_domain, !valid::full_domain | A new valid custom domain |

Response 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 new valid custom domain |

Code Samples


  
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");
$response =  $api->put('/zones/pull/'.$zoneId.'/customdomains.json/'.$domainId, $params);
var zoneId = '97167'
var domainId = '79182'
netdna.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
        }
    }
}
<script> $(function () { $('#myTab25 a:last').tab('show'); }) </script>

Delete Custom Domain

Deletes a custom domain specified by the {zone_id} and {customdomain_id} parameters

Code Samples


  
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'
netdna.del('/zones/pull/' + zoneId + '/customdomains.json/' + domainId, function(err, response) {
  console.log('err', err, 'response', response)
})
{
	"code":200
}
<script> $(function () { $('#myTab26 a:last').tab('show'); }) </script>

Push Zone API

List Push Zones

Returns a list of all push zones on the specified account

Response Parameters

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 |

Code Samples


  
api.get('/zones/push.json')
$api->get('/zones/push.json');
netdna.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
    }
}
<script> $(function () { $('#myTab27 a:last').tab('show'); }) </script>

Create Push Zone

Creates a new push zone

Accepted Request Parameters

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. |

Response Parameters

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 |

Code Samples

		
params = {"name":"newPushZone6","password":"password"}
api.post('/zones/push.json',data=params)
$params = array("name"=>"newPushZone","password"=>"password");
$api->post('/zones/push.json', $params);
netdna.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
        }
    }
}
<script> $(function () { $('#myTab28 a:last').tab('show'); }) </script>

Get Push Zones Count

Counts all push zones on the specified account

Response Parameters

Parameter | Description | --- | --- | --- count | The number of push zones on the specified account |

Code Samples


  
api.get('/zones/push.json/count')
$api->get('/zones/push.json/count');
netdna.get('/zones/push.json/count', function(err, response) {
  console.log('err', err, 'response', response)
})
{
    "code": 200,
    "data": {
        "count": "3"
    }
}
<script> $(function () { $('#myTab29 a:last').tab('show'); }) </script>

Get Push Zone

Gets a push zone specified by the {zone_id} parameter

Response Parameters

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 |

Code Samples


  
id = '96182'
api.get('/zones/push.json/'+id)
$id = '97181';
$api->get('/zones/push.json/'.$id);
var id = '97182'
netdna.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
        }
    }
}
<script> $(function () { $('#myTab30 a:last').tab('show'); }) </script>

Update Push Zone

Updates a push zone specified by the {zone_id} parameter

Accepted Request Parameters

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. |

Response Parameters

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 |

Code Samples


  
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'
netdna.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
        }
    }
}
<script> $(function () { $('#myTab31 a:last').tab('show'); }) </script>

Delete Push Zone

Deletes a push zone specified by the {zone_id} parameter

Code Samples


  
id = '96182'
api.delete('/zones/push.json/'+id)
$id = '97181';
$api->delete('/zones/push.json/'.$id);
var id = '97181'
netdna.del('/zones/push.json/' + id, function(err, response) {
  console.log('err', err, 'response', response)
})
{
	"code":200
}
<script> $(function () { $('#myTab32 a:last').tab('show'); }) </script>

Enable Push Zone

Enables a push zone specified by the {zone_id} parameter

Code Samples


  
id = '96182'
api.enable('/zones/push.json/'+id)
$id = '97181';
$api->enable('/zones/push.json/'.$id);
var id = '97181'
netdna.enable('/zones/push.json/' + id, function(err, response) {
  console.log('err', err, 'response', response)
})
{
	"code":200
}
<script> $(function () { $('#myTab33 a:last').tab('show'); }) </script>

Disable Push Zone

Disables a push zone specified by the {zone_id} parameter

Code Samples


  
id = '96182'
api.disable('/zones/push.json/'+id)
$id = '97181';
$api->disable('/zones/push.json/'.$id);
var id = '97181'
netdna.disable('/zones/push.json/' + id, function(err, response) {
  console.log('err', err, 'response', response)
})
{
	"code":200
}
<script> $(function () { $('#myTab34 a:last').tab('show'); }) </script>

Push Zone Custom Domains API

List Custom Domains

Returns a list of all custom domains on the zone specified by {zone_id}

Response Parameters

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 |

Code Samples


  
id = '96182'
api.get('/zones/push/'+id+'/customdomains.json')
$id = '96061';
$api->get('/zones/push/'.$id.'/customdomains.json');
var id = '96061'
netdna.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
    }
}
<script> $(function () { $('#myTab35 a:last').tab('show'); }) </script>

Create Custom Domain

Adds a new custom domain to {zone_id}

Accepted Request Parameters

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 |

Response 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 |

Code Samples


  
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'
netdna.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
        }
    }
}
<script> $(function () { $('#myTab36 a:last').tab('show'); }) </script>

Get Custom Domain

Gets a custom domain specified by the {zone_id} and {customdomain_id} parameters

Response 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 |

Code Samples


  
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'
netdna.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
        }
    }
}
<script> $(function () { $('#myTab37 a:last').tab('show'); }) </script>

Update Custom Domain

Updates a custom domain specified by the id parameter

Accepted Request Parameters

Parameter | Default Value | Validation | Description | --- | --- | --- | --- | --- custom_domain | - | required
length: 1-255 chars, valid::custom_domain, !valid::full_domain | A new valid custom domain |

Response 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 new valid custom domain |

Code Samples


  
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'
netdna.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
        }
    }
}
<script> $(function () { $('#myTab38 a:last').tab('show'); }) </script>

Delete Custom Domain

Deletes a custom domain specified by the {zone_id} and {customdomain_id} parameters

Code Samples


  
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'
netdna.del('/zones/push/' + zoneId + '/customdomains.json/' + domainId, function(err, response) {
  console.log('err', err, 'response', response)
})
{
	"code":200
}
<script> $(function () { $('#myTab39 a:last').tab('show'); }) </script>

VOD Zone API

List VOD Zones

Returns a list of all VOD zones on the specified account

Response Parameters

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 |

Code Samples


  
api.get('/zones/vod.json')
$api->get('/zones/vod.json');
netdna.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"
            }
        ]
    }
}
<script> $(function () { $('#myTab40 a:last').tab('show'); }) </script>

Create VOD Zone

Creates a new VOD zone

Accepted Request Parameters

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 |

Response Parameters

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 |

Code Samples


  
params = {"name":"newvodZone7","password":"password"}
api.post('/zones/vod.json',data=params)
$params = array("name"=>"newVODZone3","password"=>"password");
$response = $api->post('/zones/vod.json',$params);
netdna.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
        }
    }
}
<script> $(function () { $('#myTab41 a:last').tab('show'); }) </script>

Get VOD Zones Count

Counts all vod zones on the specified account

Response Parameters

Parameter | Description | --- | --- | --- count | The number of vod zones on the specified account |

Code Samples


  
api.get('/zones/vod.json/count')
$api->get('/zones/vod.json/count');
netdna.get('/zones/vod.json/count', function(err, response) {
  console.log('err', err, 'response', response)
})
{
    "code": 200,
    "data": {
        "count": "4"
    }
}
<script> $(function () { $('#myTab42 a:last').tab('show'); }) </script>

Get VOD Zone

Gets a VOD zone specified by the {zone_id} parameter

Response Parameters

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 |

Code Samples


  
id = '96187'
api.get('/zones/vod.json/'+id)
$id = '97183';
$api->get('/zones/vod.json/'.$id);
var id = '97183'
netdna.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"
        }
    }
}
<script> $(function () { $('#myTab43 a:last').tab('show'); }) </script>

Update VOD Zone

Updates a VOD zone specified by the {zone_id} parameter

Accepted Request Parameters

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 |

Response Parameters

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 |

Code Samples


  
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'
netdna.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"
        }
    }
}
<script> $(function () { $('#myTab44 a:last').tab('show'); }) </script>

Delete VOD Zone

Deletes a VOD zone specified by the {zone_id} parameter

Code Samples


  
id = '96187'
api.delete('/zones/vod.json/'+id)
$id = '97183';
$api->delete('/zones/vod.json/'.$id);
var id = '97183'
netdna.del('/zones/vod.json/' + id, function(err, response) {
  console.log('err', err, 'response', response)
})
{
	"code":200
}
<script> $(function () { $('#myTab45 a:last').tab('show'); }) </script>

Enable VOD Zone

Enables a VOD zone specified by the {zone_id} parameter

Code Samples


  
id = '96187'
api.enable('/zones/vod.json/'+id)
$id = '96187';
$api->enable('/zones/vod.json/'.$id);
var id = '96187'
netdna.enable('/zones/vod.json/' + id, function(err, response) {
  console.log('err', err, 'response', response)
})
{
	"code":200
}
<script> $(function () { $('#myTab46 a:last').tab('show'); }) </script>

Disable VOD Zone

Disables a VOD zone specified by the {zone_id} parameter

Code Samples


  
id = '96187'
api.disable('/zones/vod.json/'+id)
$id = '96187';
$api->disable('/zones/vod.json/'.$id);
var id = '96187'
netdna.disable('/zones/vod.json/' + id, function(err, response) {
  console.log('err', err, 'response', response)
})
{
	"code":200
}
<script> $(function () { $('#myTab47 a:last').tab('show'); }) </script>

VOD Zone Custom Domains API

List Custom Domains

Returns a list of all custom domains on the zone specified by {zone_id}

Response Parameters

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 |

Code Samples


  
id = '96187'
api.get('/zones/vod/'+id+'/customdomains.json')
$id = '97183';
$api->get('/zones/vod/'.$id.'/customdomains.json');
var id = '97183'
netdna.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
    }
}
<script> $(function () { $('#myTab48 a:last').tab('show'); }) </script>

Create Custom Domain

Adds a new custom domain to {zone_id}

Accepted Request Parameters

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 |

Response 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 |

Code Samples


  
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'
netdna.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"
        }
    }
}
<script> $(function () { $('#myTab49 a:last').tab('show'); }) </script>

Get Custom Domain

Gets a custom domain specified by the {zone_id} and {customdomain_id} parameters

Response 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 |

Code Samples


  
zoneId = '96187'
domainId = '79321'
api.get('/zones/vod/'+zoneId+'/customdomains.json/'+domainId)
$zoneId = '97183';
$domainId = '79191';
$response =  $api->get('/zones/vod/'.$zoneId.'/customdomains.json/'.$domainId);
var zoneId = '97183'
var domainId = '79191'
netdna.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"
        }
    }
}
<script> $(function () { $('#myTab50 a:last').tab('show'); }) </script>

Update Custom Domain

Updates a custom domain specified by the id parameter

Accepted Request Parameters

Parameter | Default Value | Validation | Description | --- | --- | --- | --- | --- custom_domain | - | required
length: 1-255 chars, valid::custom_domain, !valid::full_domain | A new valid custom domain |

Response 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 new valid custom domain |

Code Samples


  
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'
netdna.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"
        }
    }
}
<script> $(function () { $('#myTab51 a:last').tab('show'); }) </script>

Delete Custom Domain

Deletes a custom domain specified by the {zone_id} and {customdomain_id} parameters

Code Samples


  
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'
netdna.del('/zones/vod/' + zoneId + '/customdomains.json/' + domainId, function(err, response) {
  console.log('err', err, 'response', response)
})
{
	"code":200
}
<script> $(function () { $('#myTab52 a:last').tab('show'); }) </script>

Live Zone API

List Live Zones

Returns a list of all live zones on the specified account

Response Parameters

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 |

Code Samples


  
api.get('/zones/live.json')
$api->get('/zones/live.json');
netdna.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
    }
}
<script> $(function () { $('#myTab53 a:last').tab('show'); }) </script>

Create Live Zone

Creates a new live zone

Accepted Request Parameters

Parameter | Default Value | Validation | Description | --- | --- | --- | --- | --- name | - | required
length: 3-30 chars; only letters, digits, and dash (-)accepted | Your desired zone name | password | - | length: 5-30 chars | Your desired password | label | - | length: 1-255 chars | Something that describes your zone |

Response Parameters

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 |

Code Samples


  
params = {"name":"newliveZone7","password":"password"}
api.post('/zones/live.json',data=params)
$api->post('/zones/live.json', array("name"=>"newLiveZone3","password"=>"password"));
netdna.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"
        }
    }
}
<script> $(function () { $('#myTab54 a:last').tab('show'); }) </script>

Get Live Zones Count

Counts all live zones on the specified account

Response Parameters

Parameter | Description | --- | --- | --- count | The number of live zones on the specified account |

Code Samples


  
api.get('/zones/live.json/count')
$api->get('/zones/live.json/count');
netdna.get('/zones.json', function(err, response) {
  console.log('err', err, 'response', response)
})
{
    "code": 200,
    "data": {
        "count": "4"
    }
}
<script> $(function () { $('#myTab55 a:last').tab('show'); }) </script>

Get Live Zone

Gets a live zone specified by the {zone_id} parameter

Response Parameters

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 |

Code Samples


  
id = '96193'
api.get('/zones/live.json/'+id)
$id = '97185';
$api->get('/zones/live.json/'.$id);
var id = '97185'
netdna.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"
        }
    }
}
<script> $(function () { $('#myTab56 a:last').tab('show'); }) </script>

Update Live Zone

Updates a live zone specified by the {zone_id} parameter

Accepted Request Parameters

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 |

Response Parameters

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 |

Code Samples


  
id = '96193'
params = {"label":"Some other description"}
api.put('/zones/live.json/'+id,params=params)
$id = '97185';
$params =  array("label"=>"Some other description");
$response =  $api->put('/zones/live.json/'.$id,$params);
var id = '97185'
netdna.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"
        }
    }
}
<script> $(function () { $('#myTab57 a:last').tab('show'); }) </script>

Delete Live Zone

Deletes a live zone specified by the {zone_id} parameter

Code Samples


  
id = '96193'
api.delete('/zones/live.json/'+id)
$id = '97185';
$api->delete('/zones/live.json/'.$id);
var id = '97185'
netdna.del('/zones/live.json/' + id, function(err, response) {
  console.log('err', err, 'response', response)
})
{
	"code":200
}
<script> $(function () { $('#myTab58 a:last').tab('show'); }) </script>

Enable Live Zone

Enables a live zone specified by the {zone_id} parameter

Code Samples


  
id = '96193'
api.enable('/zones/live.json/'+id)
$id = '96061';
$api->enable('/zones/live.json/'.$id);
var id = '96061'
netdna.enable('/zones/live.json/' + id, function(err, response) {
  console.log('err', err, 'response', response)
})
{
	"code":200
}
<script> $(function () { $('#myTab59 a:last').tab('show'); }) </script>

Disable Live Zone

Disables a live zone specified by the {zone_id} parameter

Code Samples


  
id = '96193'
api.disable('/zones/live.json/'+id)
$id = '96061';
api->disable('/zones/live.json/'.$id);
var id = '96061'
netdna.disable('/zones/live.json/' + id, function(err, response) {
  console.log('err', err, 'response', response)
})
{
	"code":200
}
<script> $(function () { $('#myTab60 a:last').tab('show'); }) </script>

Zones SSL API

Get Zone's SSL Information

Get the SSL certificate for the specified {zone_type} and {zone_id}.

Code Samples


  
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'
netdna.get('/zones/' + type + '/' + id + '/ssl.json', function(err, response) {
  console.log('err', err, 'response', response)
})

  
<script> $(function () { $('#myTab61 a:last').tab('show'); }) </script>

Install SSL on Zone

Upload an SSL certificate for the specified {zone_type} and {zone_id}.

Accepted Request Parameters

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. |

Response Parameters

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. |

Code Samples


  
id = '96061'
type = 'pull'
ssl_crt = ""
params = {"ssl_crt": ssl_crt,"ssl_key": "somesslkey"}
api.post('/zones/'+type+'/'+id+'/ssl.json',params)
$id = '96061';
$type = 'pull';
$ssl_crt = " ... ";
$params = array("ssl_crt"=>$ssl_crt,"ssl_key"=>"somesslkey");
$api->post('/zones/'.$type.'/'.$id.'/ssl.json',$params);
var id = '96061'
var type = 'pull'
var ssl_crt = " ... "
netdna.post('/zones/' + type + '/' + id + '/ssl.json', { ssl_crt: ssl_crt, ssl_key: 'somesslkey' }, function(err, response) {
  console.log('err', err, 'response', response)
})

  
<script> $(function () { $('#myTab62 a:last').tab('show'); }) </script>

Update Zone's SSL Information

Update the SSL certificate for the specified {zone_type} and {zone_id}.

Accepted Request Parameters

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. |

Response Parameters

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. |

Code Samples


  
id = '96061'
type = 'pull'
ssl_crt = ""
params = {"ssl_crt": ssl_crt,"ssl_key": "somesslkey"}
api.put('/zones/'+type+'/'+id+'/ssl.json',params)
$id = '96061';
$type = 'pull';
$ssl_crt = " ... ";
$params = array("ssl_crt"=>$ssl_crt,"ssl_key"=>"somesslkey");
$api->put('/zones/'.$type.'/'.$id.'/ssl.json',$params);
var id = '96061'
var type = 'pull'
var ssl_crt = " ... "
netdna.put('/zones/' + type + '/' + id + '/ssl.json', { ssl_crt: ssl_crt, ssl_key: 'somesslkey' }, function(err, response) {
  console.log('err', err, 'response', response)
})

  
<script> $(function () { $('#myTab63 a:last').tab('show'); }) </script>

Remove Zone's SSL Information

Remove the SSL certificate for the specified {zone_type} and {zone_id}.

Code Samples


  
id = '96061'
type = 'pull'
api.post('/zones/'+type+'/'+id+'/ssl.json')
$id = '96061';
$type = 'pull';
$api->post('/zones/'.$type.'/'.$id.'/ssl.json');
var id = '96061'
var type = 'pull'
netdna.post('/zones/' + type + '/' + id + '/ssl.json', function(err, response) {
  console.log('err', err, 'response', response)
})

  
<script> $(function () { $('#myTab64 a:last').tab('show'); }) </script>

Zones Upstream API

Get Upstream information for the current zone

Get the upstream information for the specified {zone_id}.

Code Samples


  
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'
netdna.post('/zones/' + type + '/' + id + '/upstream.json', function(err, response) {
  console.log('err', err, 'response', response)
})

  
<script> $(function () { $('#myTab65 a:last').tab('show'); }) </script>

Enable Upstream on Zone

Create and enable Upstream for a specific {zone_id}.

Accepted Request Parameters

Parameter | Default Value | Validation | Description | --- | --- | --- | --- | --- server_url | - | required
| The server url or ip to provide the streaming resources | 1.0.1 | port | - | required
| The port where server is to be called | 1.0.1 |

Response Parameters

Parameter | Description | --- | --- | --- id | The Upstream ID. | 1.0.1 | bucket_id | The bucket_id it belongs to | 1.0.1 | server_url | The server url or ip | 1.0.1 | port | The port it uses to call the server | 1.0.1 |

Code Samples


  
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'
netdna.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)
})

  
<script> $(function () { $('#myTab a:last').tab('show'); }) </script>

Update Zone's Upstream Information

Update the Upstream information for the specified {zone_id}.

Accepted Request Parameters

Parameter | Default Value | Validation | Description | --- | --- | --- | --- | --- upstream_id | - | required
| The Upstream Information you're modifying. | 1.0.1 | server_url | - | required
| The server url or ip | 1.0.1 | port | - | required
| The port it uses to call the server | 1.0.1 |

Response Parameters

Parameter | Description | --- | --- | --- id | The Upstream ID. | 1.0.1 | bucket_id | The bucket_id it belongs to | 1.0.1 | server_url | The server url or ip | 1.0.1 | port | The port it uses to call the server | 1.0.1 |

Code Samples


  
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'
netdna.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)
})

  
<script> $(function () { $('#myTab67 a:last').tab('show'); }) </script>

Remove Zone's Upstream Information

Remove the Upstream Information for the specified {zone_id}.

Code Samples


  
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'
netdna.del('/zones/' + type + '/' + id + '/upstream.json', function(err, response) {
  console.log('err', err, 'response', response)
})

  
<script> $(function () { $('#myTab68 a:last').tab('show'); }) </script>

Reports by Zone API

List Zone Stats

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.

Accepted Request Parameters

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 |

Response Parameters

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}. |

Code Samples

	</pre>
reportType = ''
api.get('/reports/stats.json'+reportType)
$reportType = '';
$api->get('/reports/stats.json/'.$reportType);
var reportType = ''
netdna.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"
    }
}
<script> $(function () { $('#myTab69 a:last').tab('show'); }) </script>

List Stats per Zone

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.

Accepted Request Parameters

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 |

Response Parameters

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}. |

Code Samples

	</pre>
id = '96061'
reportType = ''
api.get('/reports/'+id+'/stats.json'+reportType)
$id = '96061';
$reportType = '';
$api->get('/reports/'.$id.'/stats.json/'.$reportType);
var id = '96061'
var reportType = ''
netdna.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"
    }
}
<script> $(function () { $('#myTab70 a:last').tab('show'); }) </script>

Reports by Location API

List Nodes

Gets a list of all active nodes (locations)

Response Parameters

Parameter | Description | --- | --- | --- id | Node Id | name | Node 3 letter code | description | Full node name |

Code Samples

	</pre>
api.get('/reports/nodes.json')
$api->get('/reports/nodes.json');
netdna.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"
            }
        ]
    }
}
<script> $(function () { $('#myTab71 a:last').tab('show'); }) </script>

List Nodes by Zone

Gets a list of all active nodes (locations) specified by the {zone_id} parameter

Response Parameters

Parameter | Description | --- | --- | --- id | Node Id | name | Node 3 letter code | description | Full node name |

Code Samples

	</pre>
id = '96061'
api.get('/reports/'+id+'/nodes.json')
$id = '96061';
$api->get('/reports/'.$id.'/nodes.json');
var id = '96061'
netdna.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"
            }
        ]
    }
}
<script> $(function () { $('#myTab72 a:last').tab('show'); }) </script>

List Zone Node Stats by Report Type

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.

Accepted Request Parameters

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 |

Response Parameters

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. |

Code Samples

	</pre>
reportType = ''
api.get('/reports/nodes.json/stats'+reportType)
$reportType = '';
$api->get('/reports/nodes.json/stats/'.$reportType);
var reportType = ''
netdna.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"
    }
}
<script> $(function () { $('#myTab73 a:last').tab('show'); }) </script>

List Node Stats by Zone and Report Type

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.

Accepted Request Parameters

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 |

Response Parameters

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. |

Code Samples

	</pre>
id = '96061'
reportType = ''
api.get('/reports/'+id+'/nodes.json/stats'+reportType)
$id = '96061';
$reportType = '';
$api->get('/reports/'.$id.'/nodes.json/stats/'.$reportType);
var id = '96061'
var reportType = ''
netdna.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
    }
}
<script> $(function () { $('#myTab74 a:last').tab('show'); }) </script>

Get Zone Node

Gets the node information for the specified {node_id}

Response Parameters

Parameter | Description | --- | --- | --- id | Node Id | name | Node 3 letter code | description | Full node name |

Code Samples

	</pre>
id = '1'
api.get('/reports/nodes.json/'+id)
$id = '1';
$api->get('/reports/nodes.json/'.$id);
var id = '1'
netdna.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"
        }
    }
}
<script> $(function () { $('#myTab75 a:last').tab('show'); }) </script>

Get Node by Zone

Gets the node information for the specified {node_id} and {zone_id}

Response Parameters

Parameter | Description | --- | --- | --- id | Node Id | name | Node 3 letter code | description | Full node name |

Code Samples

	</pre>
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'
netdna.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
    }
}
<script> $(function () { $('#myTab76 a:last').tab('show'); }) </script>

Get Zone Node Stats by Report Type

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.

Accepted Request Parameters

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. |

Response Parameters

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. |

Code Samples

	</pre>
id = '1'
reportType = ''
api.get('/reports/nodes.json/'+id+'/stats'+reportType)
$id = '1';
$reportType = '';
$api->get('/reports/nodes.json/'.$id.'/stats/'.$reportType);
var id = '1'
var reportType = ''
netdna.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"
    }
}
<script> $(function () { $('#myTab77 a:last').tab('show'); })7 </script>

Get Node Stats by Zone and Report Type

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.

Accepted Request Parameters

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 |

Response Parameters

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. |

Code Samples

	</pre>
zoneId='96061'
nodeId='1'
reportType = ''
api.get('/reports/'+zoneId+'/nodes.json/'+nodeId+'/stats'+reportType)
$zoneId='96061';
$nodeId='1';
$reportType = '';
$api->get('/reports/'.$zoneId.'/nodes.json/'.$nodeId.'/stats/'.$reportType);
var zoneId = '96061'
var nodeId = '1'
var reportType = ''
netdna.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"
    }
}
<script> $(function () { $('#myTab78 a:last').tab('show'); }) </script>

Reports by Popular Files API

List Popular Files

Gets the most popularly requested files for your account, grouped into daily statistics

Accepted Request Parameters

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 |

Response Parameters

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 |

Code Samples

	</pre>
api.get('/reports/popularfiles.json')
$api->get('/reports/popularfiles.json');
netdna.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"
    }
}
<script> $(function () { $('#myTab79 a:last').tab('show'); }) </script>

List Popular Files By Zone Type

Gets the most popularly requested files for your account, filtered by {zone_type} and grouped into daily statistics

Accepted Request Parameters

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 |

Response Parameters

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 |

Code Samples

	</pre>
type='pull'
api.get('/reports/'+type+'/popularfiles.json')
$type='pull';
$api->get('/reports/'.$type.'/popularfiles.json');
var type = 'pull'
netdna.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"
    }
}
<script> $(function () { $('#myTab80 a:last').tab('show'); }) </script>

Reports by Status Codes API

List Status Code Responses

Gets HTTP status code response statistics for your account

Accepted Request Parameters

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 |

Response Parameters

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 |

Code Samples

	</pre>
reportType = ''
api.get('/reports/statuscodes.json'+reportType)
$reportType = '';
$api->get('/reports/statuscodes.json/'.$reportType);
var reportType = ''
netdna.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"
    }
}
<script> $(function () { $('#myTab81 a:last').tab('show'); }) </script>

List Status Code Responses by Zone Id

Gets HTTP status code response statistics for a specific {zone_id}

Accepted Request Parameters

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 |

Response Parameters

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 |

Code Samples

	</pre>
reportType = ''
id = '96061'
api.get('/reports/'+id+'/statuscodes.json'+reportType)
$reportType = '';
$id = '96061';
$api->get('/reports/'.$id.'/statuscodes.json/'.$reportType);
var reportType = ''
var id = '96061'
netdna.get('/reports/' + id + '/statuscodes.json/' + reportType, function(err, response) {
  console.log('err', err, 'response', response)
})
{
    "code": 200,
    "data": {
        "statuscodes": [],
        "summary": {
            "hit": null
        },
        "total": "0"
    }
}
<script> $(function () { $('#myTab82 a:last').tab('show'); }) </script>

List Status Codes by Zone Type

Gets HTTP status code response statistics for a specific {zone_type}

Accepted Request Parameters

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 |

Response Parameters

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 |

Code Samples

	</pre>
reportType = ''
zoneType = 'pull'
api.get('/reports/'+zoneType+'/statuscodes.json'+reportType)
$reportType = '';
$zoneType = 'pull';
$api->get('/reports/'.$zoneType.'/statuscodes.json/'.$reportType);
var reportType = ''
var zoneType = 'pull'
netdna.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"
    }
}
<script> $(function () { $('#myTab83 a:last').tab('show'); }) </script>

List Status Codes by Zone Id

Gets HTTP status code response statistics for a specific {zone_type} and {zone_id}

Accepted Request Parameters

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 |

Response Parameters

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 |

Code Samples

	</pre>
reportType = ''
zoneType = 'pull'
id = '96061'
api.get('/reports/'+zoneType+'/'+id+'/statuscodes.json'+reportType)
$reportType = '';
$zoneType = 'pull';
$id = '96061';
$api->get('/reports/'.$zoneType.'/'.$id.'/statuscodes.json/'.$reportType);
var reportType = ''
var zoneType = 'pull'
var id = '96061'
netdna.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"
    }
}
<script> $(function () { $('#myTab84 a:last').tab('show'); }) </script>

Reports by File Types API

List File Types

Gets file type statistics for your account

Accepted Request Parameters

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 |

Response Parameters

Parameter | Description | --- | --- | --- file_type | The file type requested | hit | The number of times a file of this type has been requested |

Code Samples

	</pre>
reportType = ''
api.get('/reports/filetypes.json'+reportType)
$reportType = '';
$api->get('/reports/filetypes.json'.$reportType);
var reportType = ''
netdna.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"
    }
}
<script> $(function () { $('#myTab85 a:last').tab('show'); }) </script>

List File Types by Zone Id

Gets file type statistics for a specific {zone_id}

Accepted Request Parameters

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 |

Response Parameters

Parameter | Description | --- | --- | --- file_type | The file type requested | hit | The number of times a file of this type has been requested |

Code Samples

	</pre>
reportType = ''
id = '96061'
api.get('/reports/'+id+'/filetypes.json'+reportType)
$reportType = '';
$id = '96061';
$api->get('/reports/'.$id.'/filetypes.json/'.$reportType);
var reportType = ''
var id = '96061'
netdna.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"
    }
}
<script> $(function () { $('#myTab86 a:last').tab('show'); }) </script>

List File Types by Zone Type

Gets file type statistics for a specific {zone_type}

Response Parameters

Parameter | Description | --- | --- | --- file_type | The file type requested | hit | The number of times a file of this type has been requested |

Code Samples

	</pre>
reportType = ''
zoneType = 'pull'
api.get('/reports/'+zoneType+'/filetypes.json'+reportType)
$reportType = '';
$zoneType = 'pull';
$api->get('/reports/'.$zoneType.'/filetypes.json/'.$reportType);
var reportType = ''
var zoneType = 'pull'
netdna.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"
    }
}
<script> $(function () { $('#myTab87 a:last').tab('show'); }) </script>

List File Types by Zone Id

Gets file type statistics for a specific {zone_type} and {zone_id}

Accepted Request Parameters

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 |

Response Parameters

Parameter | Description | --- | --- | --- file_type | The file type requested | hit | The number of times a file of this type has been requested |

Code Samples

	</pre>
reportType = ''
zoneType = 'pull'
id = '96061'
api.get('/reports/'+zoneType+'/'+id+'/filetypes.json'+reportType)
$reportType = '';
$zoneType = 'pull';
$id = '96061';
$api->get('/reports/'.$zoneType.'/'.$id.'/filetypes.json/'.$reportType);
var reportType = ''
var zoneType = 'pull'
var id = '96061'
netdna.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"
    }
}
<script> $(function () { $('#myTab88 a:last').tab('show'); }) </script>

Reports by File Size Ranges API

List File Sizes

Gets request statistics for your account based on file size ranges

Accepted Request Parameters

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 |

Response Parameters

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 |

Code Samples

	</pre>
reportType = ''
api.get('/reports/filesizes.json'+reportType)
$reportType = '';
$api->get('/reports/filesizes.json/'.$reportType);
var reportType = ''
netdna.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"
        }
    }
}
<script> $(function () { $('#myTab89 a:last').tab('show'); }) </script>

List File Sizes by Zone Id

Gets request statistics for the specified {zone_id} based on file size ranges

Accepted Request Parameters

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 |

Response Parameters

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 |

Code Samples

	</pre>
reportType = ''
id = '96061'
api.get('/reports/'+id+'/filesizes.json'+reportType)
$reportType = '';
$id = '96061';
$api->get('/reports/'.$id.'/filesizes.json/'.$reportType);
var reportType = ''
var id = '96061'
netdna.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
        }
    }
}
<script> $(function () { $('#myTab90 a:last').tab('show'); }) </script>

List File Sizes by Zone Type

Gets request statistics for the specified {zone_type} based on file size ranges

Accepted Request Parameters

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 |

Response Parameters

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 |

Code Samples

	</pre>
reportType = ''
zoneType = 'pull'
api.get('/reports/'+zoneType+'/filesizes.json'+reportType)
$reportType = '';
$zoneType = 'pull';
$api->get('/reports/'.$zoneType.'/filesizes.json/'.$reportType);
var reportType = ''
var zoneType = 'pull'
netdna.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"
        }
    }
}
<script> $(function () { $('#myTab91 a:last').tab('show'); }) </script>

List File Sizes by Zone Id

Gets request statistics for the specified {zone_type} and {zone_id} based on file size ranges

Accepted Request Parameters

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 |

Response Parameters

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 |

Code Samples

	</pre>
reportType = ''
zoneType = 'pull'
id = '96061'
api.get('/reports/'+zoneType+'/'+id+'/filesizes.json'+reportType)
$reportType = '';
$zoneType = 'pull';
$id = '96061';
$api->get('/reports/'.$zoneType.'/'.$id.'/filesizes.json/'.$reportType);
var reportType = ''
var zoneType = 'pull'
var id = '96061'
netdna.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
        }
    }
}
<script> $(function () { $('#myTab92 a:last').tab('show'); }) </script>

Reports By Directory API

List Stats By Directory

Gets usage statistics by directory for your account. (This report has to be enabled by Sales).

Accepted Request Parameters

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 |

Response Parameters

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 |

Code Samples

	</pre>
reportType = ''
api.get('/reports/statsbydir.json'+reportType)
$reportType = '';
$api->get('/reports/statsbydir.json/'.$reportType);
var reportType = ''
netdna.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"
    }
}
<script> $(function () { $('#myTab93 a:last').tab('show'); }) </script>

List Stats By Directory and Zone Id

Gets usage statistics by directory for the specified {zone_id}. (This report has to be enabled by Sales).

Accepted Request Parameters

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 |

Response Parameters

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 |

Code Samples

	</pre>
reportType = ''
id = '96061'
api.get('/reports/'+id+'/statsbydir.json'+reportType)
$reportType = '';
$id = '96061';
$api->get('/reports/'.$id.'/statsbydir.json/'.$reportType);
var reportType = ''
var id = '96061'
netdna.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"
    }
}
<script> $(function () { $('#myTab94 a:last').tab('show'); }) </script>

Reports By File Name API

List Stats By File Name

Gets usage statistics by file name for your account

Accepted Request Parameters

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 |

Response Parameters

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 206 hits | 5xx | The amount of 206 hits | timestampf | Timestamp |

Code Samples

	</pre>
reportType = ''
clientId = '50'	
api.get('/clients/'+clientId+'/reports/statsbyfilename.json'+reportType)
$reportType = '';
$clientId = '';
$api->get('/clients/'.$clientId.'/reports/statsbyfilename.json/'.$reportType);
var reportType = ''
var clientId = ''
netdna.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"
    }
}
<script> $(function () { $('#myTab95 a:last').tab('show'); }) </script>

List Stats By File Name and Zone Id

Gets usage statistics by file name for the specified {zone_id}

Accepted Request Parameters

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 |

Response Parameters

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 206 hits | 5xx | The amount of 206 hits | timestampf | Timestamp |

Code Samples

	</pre>
reportType = ''
id = '16888'
clientId = '50'
api.get('/clients/'+clientId+'/reports/'+id+'/statsbyfilename.json'+reportType)
$reportType = '';
$id = '96061';
$clientId = '';
$api->get('/clients/'.$clientId.'/reports/'.$id.'/statsbyfilename.json/'.$reportType);
var reportType = ''
var id = '96061'
var clientId = ''
netdna.get('/clients/' + clientId + '/reports/' + id + '/statsbyfilename.json/' + reportType, function(err, response) {
  console.log('err', err, 'response', response)
})
Non functional
<script> $(function () { $('#myTab96 a:last').tab('show'); }) </script>

Reports By Custom Domain API

List Stats By Directory

Gets usage statistics by custom domain for your account. (This report has to be enabled by Sales).

Accepted Request Parameters

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 |

Response Parameters

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 |

Code Samples

	</pre>
reportType = ''
clientId = '50'
api.get('/clients/'+clientId+'/reports/statsbycustomdomain.json'+reportType)
$reportType = '';
$clientId = '';
$api->get('clients/'.$clientId.'/reports/statsbycustomdomain.json/'.$reportType);
var reportType = ''
var clientId = ''
netdna.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"
    }
}
<script> $(function () { $('#myTab97 a:last').tab('show'); }) </script>

List Stats By Custom Domain and Zone Id

Gets usage statistics by custom domain for the specified {zone_id}. (This report has to be enabled by Sales).

Accepted Request Parameters

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 |

Response Parameters

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 |

Code Samples

	</pre>
reportType = ''
zoneId = '84199'
clientId = '1'
api.get('/clients/'+clientId+'/reports/'+zoneId+'/statsbycustomdomain.json'+reportType)
$reportType = '';
$zoneId = '';
$clientId = '';
$api->get('clients/'.$clientId.'/reports/'.$zoneId.'/statsbycustomdomain.json/'.$reportType);
var reportType = ''
var zoneId = ''
var clientId = ''
netdna.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"
    }
}
<script> $(function () { $('#myTab98 a:last').tab('show'); }) </script>

Reports for Live Zones API

List Connection Stats

Gets zone stats in hourly, daily, or monthly summaries

Accepted Request Parameters

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 |

Code Samples

	</pre>
reportType = ''
api.get('/reports/live/connectionstats.json'+reportType)
$reportType = '';
$api->get('/reports/live/connectionstats.json/'.$reportType);
var reportType = ''
netdna.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"
    }
}
<script> $(function () { $('#myTab99 a:last').tab('show'); }) </script>

@niftylettuce was here.

Releases

No releases published

Packages

No packages published