From 9961eccfdf4175ab91563b14e3ac7420267a5bea Mon Sep 17 00:00:00 2001 From: Kyle Economou Date: Tue, 6 Jan 2015 15:58:43 -0800 Subject: [PATCH 1/3] final docs --- public/index.html | 7297 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 7277 insertions(+), 20 deletions(-) diff --git a/public/index.html b/public/index.html index 2331074..1a2827a 100644 --- a/public/index.html +++ b/public/index.html @@ -1,6 +1,7 @@ MaxCDN - API Docs
API Docs

MaxCDN API Docs

+
API Docs

MaxCDN API Docs

+
API Docs
+ + +

Reseller API

+ + + +

Get Client Bandwidth

+Gets client bandwidth information +
+
+
GET +https://rws.maxcdn.com/{companyalias}/clients/{id}/bandwidth.json
+
+ +

Code Samples

+ + + +
+
+
+api.get("/clients/{id}/bandwidth.json")
+
+
+
api.get("/clients/{id}/bandwidth.json")
+
+
+
+$api->get('/clients/{id}/bandwidth.json');
+
+
+
+api.get('/clients/{id}/bandwidth.json', callback)
+function callback(err, response) {
+  if (err) return console.log(err)
+  console.log(response)
+}
+
+
+
+{
+    "code": 200,
+    "data": {
+        "account": {total": "1", 
+        "summary": [{
+            "valid_until": "Jun 07, 2011", 
+            "credit": "10", 
+            "still_valid": false, 
+            "base": 1000, 
+            "expiration": false, 
+            "purchased": "Jun 07, 2010", "debit": 11107173020
+            }]
+        }
+    }
+}
+
+
+ +

Get Storage Data

+ +

Gets relevant storage data

+ +
+
GET +https://rws.maxcdn.com/{companyalias}/clients/{id}/storage.json
+
+ +

Response Parameters

+ + + + + + + + +
ParameterDescription
zone_idZone ID
storageAmount of Storage Used
storage_id Storage ID
zone_typeType of Zone
zone_nameName of Zone
last_updatedDate Last Updated
+ +

Code Samples

+ + + +
+
+
+api.get("/clients/{id}/storage.json")
+
+
+
api.get("/clients/{id}/storage.json")
+
+
+
+$api->get('/clients/{id}/storage.json');
+
+
+
+api.get('/clients/{id}/storage.json', callback)
+function callback(err, response) {
+  if (err) return console.log(err)
+  console.log(response)
+}
+
+
+
+{
+    "code": 200, "data": {
+        "stats": [
+        {
+            "last_updated": "2014-11-13 18:39:19", 
+            "zone_id": "{zoneid}", 
+            "storage_used": "1234", 
+            "storage_id": "1", 
+            "zone_type": "1", 
+            "zone_name": "zonename"}, 
+        {
+            "last_updated": "2014-11-13 16:00:50", 
+            "zone_id": "zoneid", 
+            "storage_used": "5678", 
+            "storage_id": "2", 
+            "zone_type": "2", 
+            "zone_name": "zonename2"
+        }, 
+        {
+            "last_updated": "2014-11-13 16:00:08", 
+            "zone_id": "zoneid", 
+            "storage_used": "9012", 
+            "storage_id": "3", 
+            "zone_type": "3", 
+            "zone_name": "zonename3"
+        }, 
+        {
+            "last_updated": "2014-11-13 18:39:19", 
+            "zone_id": "zoneid", 
+            "storage_used": "3456", 
+            "storage_id": "4", 
+            "zone_type": "4", 
+            "zone_name": "zonename4"
+        }, 
+        {
+            "last_updated": "2014-11-13 16:00:50", 
+            "zone_id": "zoneid", 
+            "storage_used": "7890", 
+            "storage_id": "5", 
+            "zone_type": "5", 
+            "zone_name": "zonename"}
+        ], 
+    "page_size": "50", 
+    "pages": 1, 
+    "current_page_size": 1, 
+    "total": "1", 
+    "page": 1
+    }
+}
+    
+
+
+ +

Get Storage Used

+ +

Gets the amount of storage that has currently been used.

+ +
+
GET +https://rws.maxcdn.com/{companyalias}/clients/{id}/storage/used.json
+
+ +

Code Samples

+ + + +
+
+
+api.get("/clients/{id}/storage/used.json")
+
+
+
api.get("/clients/{id}/storage/used.json")
+
+
+
+$api->get('/clients/{id}/storage/used.json');
+
+
+
+api.get('/clients/{id}/storage/used.json', callback)
+function callback(err, response) {
+  if (err) return console.log(err)
+  console.log(response)
+}
+
+
+
+{
+"code": 200, 
+"data": {
+    "storage": "1535815680"
+    }
+}
+
+
+ +

Account API

+ +

Get Account

+ +

Gets account information

+ +
+
GET +https://rws.maxcdn.com/{companyalias}/clients.json
+
+ +

Response Parameters

+ + + + + + + + + +
ParameterDescription
nameThe Name of your Account
address_idAddress ID
alias Company Alias
ssl_creditsSSL Credits
flex_creditsFlex Location Credits
date_createdDate Created
date_updatedDate Updated
+ +

Code Samples

+ + + +
+
+
+api.get("{/clients.json")
+
+
+
api.get("{/clients.json")
+
+
+
+$api->get('/clients.json');
+
+
+
+api.get('/clients.json', callback)
+function callback(err, response) {
+  if (err) return console.log(err)
+  console.log(response)
+}
+
+
+
+{
+    "code": 200,
+    "data": {
+        "current_page_size": 2,
+        "page": 1,
+        "page_size": "50",
+        "pages": 1,
+        "total": 2,
+        "users": [
+        {
+            "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": "MaxCDN sampleCode",
+            "secure_token_pull_credits": "0",
+            "server_id": "18",
+            "ssl_credits": "1",
+            "status": "2",
+            "storage_quota": "107374182400",
+            "storage_server_id": "11",
+            "zone_credits": "-1"
+        },
+        {
+            "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": "MaxCDN sampleCode",
+            "secure_token_pull_credits": "0",
+            "server_id": "18",
+            "ssl_credits": "1",
+            "status": "2",
+            "storage_quota": "107374182400",
+            "storage_server_id": "11",
+            "zone_credits": "-1"
+        }
+    ]}
+}
+
+
+ +

Users API

+ +

List Users

+ +

Returns a list of all users on the specified account

+ +
+
GET +https://rws.maxcdn.com/{companyalias}/clients/{id}/users.json
+
+ +

Response Parameters

+ + + + + + + + + + + + + +
ParameterDescription
idUser ID
emailE-mail Address
firstnameFirst Name
lastnameLast Name
phonePhone Number
timezoneUsers' Time Zone
date_last_loginThe date and time the user last logged into the system
ip_last_longThe IP for the user at the last login
date_createdDate Created
date_uodatedDate Updated
rolesAn array of roles for the given user
+ +

Code Samples

+ + + +
+
+
+api.get('/clients/{id}/users.json')
+
+
+
+api.get('/clients/{id}/users.json')
+
+
+
+$api->get('/clients/{id}/users.json');
+
+
+
+api.get('/clients/{id}/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": "name@domain.com",
+                "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": "caphammer1@hamcave.com",
+                "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": "drhorrible3@ele.net",
+                "firstname": "Billy",
+                "id": "33716",
+                "ip_last_login": null,
+                "isadmin": "0",
+                "isdisabled": "0",
+                "lastname": "Horrible",
+                "phone": null,
+                "roles": [
+                    "User"
+                ],
+                "timezone": "Europe/London"
+            }
+        ]
+    }
 }
@@ -11177,33 +11645,593 @@

Code Samples

] }, "code": 201 -} +
-
+
+

Create Client

+

Creates a new client on the specified account

-

Delete Origin Shield

-

Remove the active Origin Shield from your Pull Zone

- +
POST +https://rws.maxcdn.com/{companyalias}/clients.json
-

Code Samples

-
+ })(document,"script","hs-analytics",300000); From b166ee7af26aef728fa524a7c9454f8944e2d78f Mon Sep 17 00:00:00 2001 From: Ivan Dabic Date: Fri, 29 May 2015 23:45:43 +0200 Subject: [PATCH 2/3] Added Perl Intro --- README.md | 1 + public/index.html | 7292 +-------------------------------------------- 2 files changed, 19 insertions(+), 7274 deletions(-) diff --git a/README.md b/README.md index 0b55eca..f3076de 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ * Integrate with our RESTful API using a language wrapper: * [Node](https://github.com/maxcdn/node-maxcdn) * [Ruby](https://github.com/maxcdn/ruby-maxcdn) + * [Perl](https://github.com/maxcdn/perl-maxcdn) * [Python](https://github.com/maxcdn/python-maxcdn) * [PHP](https://github.com/MaxCDN/php-maxcdn) * [.NET](https://github.com/MaxCDN/dotnet-maxcdn) diff --git a/public/index.html b/public/index.html index 1a2827a..2dc6d9c 100644 --- a/public/index.html +++ b/public/index.html @@ -1,7 +1,6 @@ MaxCDN - API Docs
API Docs

MaxCDN API Docs

-
API Docs

MaxCDN API Docs

+
API Docs
- - -

Reseller API

- - - -

Get Client Bandwidth

-Gets client bandwidth information -
-
-
GET -https://rws.maxcdn.com/{companyalias}/clients/{id}/bandwidth.json
-
- -

Code Samples

- - - -
-
-
-api.get("/clients/{id}/bandwidth.json")
-
-
-
api.get("/clients/{id}/bandwidth.json")
-
-
-
-$api->get('/clients/{id}/bandwidth.json');
-
-
-
-api.get('/clients/{id}/bandwidth.json', callback)
-function callback(err, response) {
-  if (err) return console.log(err)
-  console.log(response)
-}
-
-
-
-{
-    "code": 200,
-    "data": {
-        "account": {total": "1", 
-        "summary": [{
-            "valid_until": "Jun 07, 2011", 
-            "credit": "10", 
-            "still_valid": false, 
-            "base": 1000, 
-            "expiration": false, 
-            "purchased": "Jun 07, 2010", "debit": 11107173020
-            }]
-        }
-    }
-}
-
-
- -

Get Storage Data

- -

Gets relevant storage data

- -
-
GET -https://rws.maxcdn.com/{companyalias}/clients/{id}/storage.json
-
- -

Response Parameters

- - - - - - - - -
ParameterDescription
zone_idZone ID
storageAmount of Storage Used
storage_id Storage ID
zone_typeType of Zone
zone_nameName of Zone
last_updatedDate Last Updated
- -

Code Samples

- - - -
-
-
-api.get("/clients/{id}/storage.json")
-
-
-
api.get("/clients/{id}/storage.json")
-
-
-
-$api->get('/clients/{id}/storage.json');
-
-
-
-api.get('/clients/{id}/storage.json', callback)
-function callback(err, response) {
-  if (err) return console.log(err)
-  console.log(response)
-}
-
-
-
-{
-    "code": 200, "data": {
-        "stats": [
-        {
-            "last_updated": "2014-11-13 18:39:19", 
-            "zone_id": "{zoneid}", 
-            "storage_used": "1234", 
-            "storage_id": "1", 
-            "zone_type": "1", 
-            "zone_name": "zonename"}, 
-        {
-            "last_updated": "2014-11-13 16:00:50", 
-            "zone_id": "zoneid", 
-            "storage_used": "5678", 
-            "storage_id": "2", 
-            "zone_type": "2", 
-            "zone_name": "zonename2"
-        }, 
-        {
-            "last_updated": "2014-11-13 16:00:08", 
-            "zone_id": "zoneid", 
-            "storage_used": "9012", 
-            "storage_id": "3", 
-            "zone_type": "3", 
-            "zone_name": "zonename3"
-        }, 
-        {
-            "last_updated": "2014-11-13 18:39:19", 
-            "zone_id": "zoneid", 
-            "storage_used": "3456", 
-            "storage_id": "4", 
-            "zone_type": "4", 
-            "zone_name": "zonename4"
-        }, 
-        {
-            "last_updated": "2014-11-13 16:00:50", 
-            "zone_id": "zoneid", 
-            "storage_used": "7890", 
-            "storage_id": "5", 
-            "zone_type": "5", 
-            "zone_name": "zonename"}
-        ], 
-    "page_size": "50", 
-    "pages": 1, 
-    "current_page_size": 1, 
-    "total": "1", 
-    "page": 1
-    }
-}
-    
-
-
- -

Get Storage Used

- -

Gets the amount of storage that has currently been used.

- -
-
GET -https://rws.maxcdn.com/{companyalias}/clients/{id}/storage/used.json
-
- -

Code Samples

- - - -
-
-
-api.get("/clients/{id}/storage/used.json")
-
-
-
api.get("/clients/{id}/storage/used.json")
-
-
-
-$api->get('/clients/{id}/storage/used.json');
-
-
-
-api.get('/clients/{id}/storage/used.json', callback)
-function callback(err, response) {
-  if (err) return console.log(err)
-  console.log(response)
-}
-
-
-
-{
-"code": 200, 
-"data": {
-    "storage": "1535815680"
-    }
-}
-
-
- -

Account API

- -

Get Account

- -

Gets account information

- -
-
GET -https://rws.maxcdn.com/{companyalias}/clients.json
-
- -

Response Parameters

- - - - - - - - - -
ParameterDescription
nameThe Name of your Account
address_idAddress ID
alias Company Alias
ssl_creditsSSL Credits
flex_creditsFlex Location Credits
date_createdDate Created
date_updatedDate Updated
- -

Code Samples

- - - -
-
-
-api.get("{/clients.json")
-
-
-
api.get("{/clients.json")
-
-
-
-$api->get('/clients.json');
-
-
-
-api.get('/clients.json', callback)
-function callback(err, response) {
-  if (err) return console.log(err)
-  console.log(response)
-}
-
-
-
-{
-    "code": 200,
-    "data": {
-        "current_page_size": 2,
-        "page": 1,
-        "page_size": "50",
-        "pages": 1,
-        "total": 2,
-        "users": [
-        {
-            "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": "MaxCDN sampleCode",
-            "secure_token_pull_credits": "0",
-            "server_id": "18",
-            "ssl_credits": "1",
-            "status": "2",
-            "storage_quota": "107374182400",
-            "storage_server_id": "11",
-            "zone_credits": "-1"
-        },
-        {
-            "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": "MaxCDN sampleCode",
-            "secure_token_pull_credits": "0",
-            "server_id": "18",
-            "ssl_credits": "1",
-            "status": "2",
-            "storage_quota": "107374182400",
-            "storage_server_id": "11",
-            "zone_credits": "-1"
-        }
-    ]}
-}
-
-
- -

Users API

- -

List Users

- -

Returns a list of all users on the specified account

- -
-
GET -https://rws.maxcdn.com/{companyalias}/clients/{id}/users.json
-
- -

Response Parameters

- - - - - - - - - - - - - -
ParameterDescription
idUser ID
emailE-mail Address
firstnameFirst Name
lastnameLast Name
phonePhone Number
timezoneUsers' Time Zone
date_last_loginThe date and time the user last logged into the system
ip_last_longThe IP for the user at the last login
date_createdDate Created
date_uodatedDate Updated
rolesAn array of roles for the given user
- -

Code Samples

- - - -
-
-
-api.get('/clients/{id}/users.json')
-
-
-
-api.get('/clients/{id}/users.json')
-
-
-
-$api->get('/clients/{id}/users.json');
-
-
-
-api.get('/clients/{id}/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": "name@domain.com",
-                "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": "caphammer1@hamcave.com",
-                "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": "drhorrible3@ele.net",
-                "firstname": "Billy",
-                "id": "33716",
-                "ip_last_login": null,
-                "isadmin": "0",
-                "isdisabled": "0",
-                "lastname": "Horrible",
-                "phone": null,
-                "roles": [
-                    "User"
-                ],
-                "timezone": "Europe/London"
-            }
-        ]
-    }
+  "code": 201
 }
@@ -11645,589 +11178,29 @@

Code Samples

] }, "code": 201 - -
+}
-

Create Client

+
-

Creates a new client on the specified account

+

Delete Origin Shield

+

Remove the active Origin Shield from your Pull Zone

-
POST -https://rws.maxcdn.com/{companyalias}/clients.json
+
-

Accepted Request Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterDefault ValueValidationDescription
companyname - required
length: 1-255 chars
Company Name
companyalias - required
length: 1-45 chars
Company Alias
group_id - required
length: 1-11 chars
Group ID Number
package_id - required
length: 1-11 chars
Package ID Number (Contact your sales representative to determine your Package ID Number)
account_owner - required
A JSON Encoded Array including 'email', 'firstname', 'lastname', 'password', 'phone', 'order_status (active)
- Account Owner Information: -
-
-
    -
  • 'email' - Account Owner's Email
  • -
  • 'firstname' - Account Owner's First Name
  • -
  • 'lastname' - Account Owner's Last Name
  • -
  • 'password' - Account's Password
  • -
  • 'phone' - Account Owner's Phone Number
  • -
  • 'order_status' - Status of the Account (hard coded to 'active')
  • -
- -
address - required
A JSON Encoded Array including street1, street2 (not required), City, State, ZIP / Postal Code, Country
Account Owner Address
paymentmethod'mailin'required
Payment Method "Hard code this to Mail-In Payment"
generateinvoice'0'required
Hard Code this to not generate an invoice with the parameter '0'
order_status'active'required
Hard Code this to active with 'Active'
-

Response Parameters

- - - - - - - - - - - - - - - - - - -
ParameterDescription
emailEmail Address
firstnameFirst Name
lastnameLast Name
phonePhone Number
companynameName of the Company
companyaliasAlias of the Company
group_idGroup ID Number
address1Address, first line
cityCity
stateAlias of the Company
postcodeCity Post/ZIP Code
countryCountry
phonenumberPhone Number
passwordPassword
activeWhether or not the client is active
- -

Code Samples

- -
+})(document,"script","hs-analytics",300000); From 08a16e247066fcbd80883f3273906da135a03dc2 Mon Sep 17 00:00:00 2001 From: Ivan Dabic Date: Fri, 29 May 2015 23:51:13 +0200 Subject: [PATCH 3/3] Added Perl Intro --- README.md | 2 +- public/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f3076de..be3862a 100644 --- a/README.md +++ b/README.md @@ -24,8 +24,8 @@ * Integrate with our RESTful API using a language wrapper: * [Node](https://github.com/maxcdn/node-maxcdn) * [Ruby](https://github.com/maxcdn/ruby-maxcdn) - * [Perl](https://github.com/maxcdn/perl-maxcdn) * [Python](https://github.com/maxcdn/python-maxcdn) + * [Perl](https://github.com/maxcdn/perl-maxcdn) * [PHP](https://github.com/MaxCDN/php-maxcdn) * [.NET](https://github.com/MaxCDN/dotnet-maxcdn) * [Go Beta](http://godoc.org/github.com/MaxCDN/go-maxcdn) diff --git a/public/index.html b/public/index.html index 2dc6d9c..0f032f5 100644 --- a/public/index.html +++ b/public/index.html @@ -25,8 +25,8 @@

Overview