API documentation - 1 -

Similar documents
CloudOYE CDN USER MANUAL

Fairsail REST API: Guide for Developers

GravityLab Multimedia Inc. Windows Media Authentication Administration Guide

Cloud Elements! Marketing Hub Provisioning and Usage Guide!

Table of Contents. Open-Xchange Authentication & Session Handling. 1.Introduction...3

Axway API Gateway. Version 7.4.1

API V2.0. Documentation 7/28/2014

Copyright Pivotal Software Inc, of 10

Bitcoin Payment Gateway API

EdgeCast Networks Inc. Token-Based Authentication Administration Guide

Oracle Fusion Middleware Oracle API Gateway OAuth User Guide 11g Release 2 ( )

Secure Web Appliance. SSL Intercept

GDC Data Transfer Tool User s Guide. NCI Genomic Data Commons (GDC)

EdgeCast Networks Inc. Flash Media Streaming Administration Guide

OAuth 2.0 Developers Guide. Ping Identity, Inc th Street, Suite 100, Denver, CO

ZODIANET API (ZAPI2)

Installation & Configuration Guide User Provisioning Service 2.0

Certified Secure Web Application Security Test Checklist

Title page. Alcatel-Lucent 5620 SERVICE AWARE MANAGER 13.0 R7

Web Application Firewall

Description of Microsoft Internet Information Services (IIS) 5.0 and

Sharepoint server SSO

Single Sign On Guide. Table of Contents

CONTENT DELIVERY WHITE PAPER proinity GmbH 1

vcommander will use SSL and session-based authentication to secure REST web services.

REQUIREMENTS AND INSTALLATION OF THE NEFSIS DEDICATED SERVER

Accessing the FTP Server - User Manual

NTT Web Hosting Service [User Manual]

Contents. Before You Install Server Installation Configuring Print Audit Secure... 10

API Documentation. Introduction. General request structure. Authentication. Account and Site Identifiers. Name Description Optional

Lecture 11 Web Application Security (part 1)

Release Notes. CTERA Portal May CTERA Portal Release Notes 1

Internet Technologies. World Wide Web (WWW) Proxy Server Network Address Translator (NAT)

2 Downloading Access Manager 3.1 SP4 IR1

vcloud Air Platform Programmer's Guide

Mashery OAuth 2.0 Implementation Guide

Contents. 2 Alfresco API Version 1.0

Experian Secure Transport Service

DOSarrest Security Services (DSS) Version 4.0

Setup Citrix Access Gateway Enterprise Edition (NetScaler) for use of multiple authentication methods.

IBM Campaign and IBM Silverpop Engage Version 1 Release 2 August 31, Integration Guide IBM

Exchange 2013 mailbox setup guide

Collax Web Security. Howto. This howto describes the setup of a Web proxy server as Web content filter.

Installation and Setup Guide

Cofred Automated Payments Interface (API) Guide

Online Data Services. Security Guidelines. Online Data Services by Esri UK. Security Best Practice

Getting Started with the icontact API

leaseweb cdn CDN Product Sheet - LeaseWeb - EN 1.06


Cyber Security Workshop Ethical Web Hacking

API of DNS hosting. For DNS-master and Secondary services Table of contents

Chapter 6 Virtual Private Networking Using SSL Connections

Developer Guide: REST API Applications. SAP Mobile Platform 2.3 SP03

ICE Futures Europe. AFTS Technical Guide for Large Position Reporting V1.0

Lepide Active Directory Self Service. Configuration Guide. Follow the simple steps given in this document to start working with

Managing Qualys Scanners

Eucalyptus User Console Guide

Configuring. Moodle. Chapter 82

9. Database Management Utility

enom, Inc. API response codes

Architecture and Data Flow Overview. BlackBerry Enterprise Service Version: Quick Reference

Customize Mobile Apps with MicroStrategy SDK: Custom Security, Plugins, and Extensions

App Orchestration 2.5

Chapter 15: Advanced Networks

DOSarrest Security Services (DSS) Version 4.0

Connected Data. Connected Data requirements for SSO

Cloud Elements ecommerce Hub Provisioning Guide API Version 2.0 BETA

NEFSIS DEDICATED SERVER

EMC ViPR Controller. ViPR Controller REST API Virtual Data Center Configuration Guide. Version

Configuration Guide. BES12 Cloud

SFTP Server User Login Instructions. Open Internet explorer and enter the following url:

Criteria for web application security check. Version

Policy Guide Access Manager 3.1 SP5 January 2013

Customization & Enhancement Guide. Table of Contents. Index Page. Using This Document

STABLE & SECURE BANK lab writeup. Page 1 of 21

Proctor Caching User Guide

ULTEO OPEN VIRTUAL DESKTOP OVD WEB APPLICATION GATEWAY

Adobe Marketing Cloud First-Party Cookies

Sharp Remote Device Manager (SRDM) Server Software Setup Guide

Reverse Proxy Guide. Version 2.0 April 2016

How To Use Kiteworks On A Microsoft Webmail Account On A Pc Or Macbook Or Ipad (For A Webmail Password) On A Webcomposer (For An Ipad) On An Ipa Or Ipa (For

DreamFactory on Microsoft SQL Azure

Product Manual. MDM On Premise Installation Version 8.1. Last Updated: 06/07/15

CA Unified Infrastructure Management Server

SAML single sign-on configuration overview

Data Collection and Analysis: Get End-to-End Security with Cisco Connected Analytics for Network Deployment

Linux VPS with cpanel. Getting Started Guide

FAQs, Hints and Tips

LCH.Clearnet Version 1.0 Date : 26 June /10

Lecture 8a: WWW Proxy Servers and Cookies

Preparing for GO!Enterprise MDM On-Demand Service

Getting Started with AWS. Static Website Hosting

Flight Workflow User's Guide. Release

USER GUIDE. Lightweight Directory Access Protocol (LDAP) Schoolwires Centricity

Accelerating Wordpress for Pagerank and Profit

What s New in Propalms VPN 3.5?

ez Agent Administrator s Guide

Force.com REST API Developer's Guide

Secure Messaging Server Console... 2

Login with Amazon. Getting Started Guide for Websites. Version 1.0

Transcription:

API documentation - 1 -

Table of Contents 1. Introduction 1.1. What is an API 2. API Functions 2.1. Purge list of files 2.1.1 Description 2.1.2 Implementation 2.2. Purge of whole cache (all files on all edge servers) 2.2.1 Description 2.2.2 Implementation 2.3. Prefetch file to edge servers local cache 2.3.1 Description 2.3.2 Implementation 2.4. Create CDN resource 2.4.1 Description 2.4.2 Implementation 2.5. Delete CDN resource 2.5.1 Description 2.5.2 Implementation 2.6. Edit CDN resource 2.6.1 Description 2.6.2 Implementation 2.7. Fetch statistics data 2.7.1 Description 2.7.2 Implementation 2.8. Get CDN details 2.8.1 Description 2.8.2 Implementation - 2 -

1. Introduction 1.1. What is an API API is application programming interface and it allows to communicate with CDN77 service through JSON (JavaScript Object Notation). CDN77 API allows you to do various commands and tasks, like creating new CDN resource, editation of CDN resource, purging edge servers local cache and other tasks needed when using CDN77 from external script or server. 1.2. Supported API functions Supported CDN77 s API functions are: Purge of whole edge servers local cache Purge list of file(s) Prefetch content to edge servers local cache CDN resource editation creation details removal Traffic statistics - 3 -

2. API Functions 2.1. Purge list of files 2.1.1 Description Purge API request is used in case, the invalidation of some files in edge servers local cache is needed. (for instance: when refresh of files in the CDN to new version is needed). It takes from 2 to 10 minutes, until the request for file removal is processed. 2.1.2 Implementation Following HTTP POST parameters is accepted on the following gateway: https://client.cdn77.com/api/purge POST parameter name Parameter description Example of usage id login ID of CDN resource, on which the content will be purged Login to CDN77 client section 1234 sample@account.com passwd API password 8vL4BpXbRqgPTKA0hV36dWjMTNfIk ZK8 json Contains paths of files to be purged Single file: {"purge_paths":"path/to/your/file.jpg"} More files: {"purge_paths":"/path/to/file1.png\n/path/ to/file2.png\n/path/to/otherfile.png"} All parameters are required. Additional notes: - 4 -

id of CDN resource can be found in the CDN list: https://client.cdn77.com/cdn/list API password can be found in the API section, which can be found in the client section: https://client.cdn77.com/cdn/how-to-purge Limitations of purge API method allowed requests per second: 1 allowed requests per day: 1000 Example of usage (via Linux s curl utility): Purging of single file: curl --data "id=id of cdn&login=sample@account.com&passwd=your api password&json={'purge_paths':'/path/to/file.jpg'}" https:// client.cdn77.com/api/purge Purging of more files at once: curl --data "id=id of cdn&login=sample@account.com&passwd=your api password&json={'purge_paths':'/path/to/file.jpg\n/path/to/ file2.jpg\n/path/to/file3.jpg''}" https://client.cdn77.com/api/purge It returns status : ok JSON response in success and any other response or status is failure. Example of successful purge API response: {"status":"ok","description":"purge request successful"} string(19) "{'purge_paths':'/'}" - 5 -

2.2. Purge of whole cache (all files on all edge servers) 2.2.1 Description Purge of whole cache API request is used in case, the invalidation of all files in edge servers local cache is needed. (for instance: when refresh of all files in the CDN to new version is needed). It takes from 2 to 10 minutes, until the request for file removal is processed. 2.2.2 Implementation Following HTTP POST parameters is accepted on the following gateway: https://client.cdn77.com/api/purge-all POST parameter name Parameter description Example of usage id login ID of CDN resource, on which the content will be purged Login to CDN77 client section 1234 sample@account.com passwd API password 8vL4BpXbRqgPTKA0hV36dWjMTNfIkZK8 All parameters are required. - 6 -

Additional notes: id of CDN resource can be found in the CDN list: https://client.cdn77.com/cdn/list API password can be found in the API section, which can be found in the client section: https://client.cdn77.com/cdn/how-to-purge-all Limitations of purge all API method allowed requests per second: 1 allowed requests per day: 1000 Example of usage (via Linux s curl utility): curl --data "id=id of cdn&login=sample@account.com&passwd=your api password" https://client.cdn77.com/api/purge-all It returns status : ok JSON response in success and any other response or status is failure. Example of successful purge all API response: {"status":"ok","description":"purge request successful"} - 7 -

2.3. Prefetch file to edge servers local cache 2.3.1 Description Prefetch of desired file or files to edge servers local cache is used in case, the predownload of all desired files from origin to edge servers cache is needed. (for instance: when new files are uploaded and it is needed to upload them to edge servers local cache before presenting them to public). There is one advantage of doing this: The CDN cache can be pre-filled, so it will be present there, when presented to public. This practically means, that even the first request from visitor to this new file, will be served from edge servers local cache and so it will be faster, than in case the file is not in the edge servers local cache yet and has to be downloaded from origin at first. It takes from 2 to 10 minutes, until the request for file removal is processed. The whole time of upload to edge servers depends on the connectivity (bandwidth) between the origin and edge server (and on the load on the line of course; in example: it will be faster if there is 1 Gbps network on the origin and on the edge server than in case of 100 Mbps on origin or edge server). 2.3.2 Implementation Following HTTP POST parameters is accepted on the following gateway: https://client.cdn77.com/api/prefetch POST parameter name Parameter description Example of usage - 8 -

id login ID of CDN resource, on which the content will be purged Login to CDN77 client section 1234 sample@account.com passwd API password 8vL4BpXbRqgPTKA0hV36dWjMTNfIkZK8 json Contains paths of files to be purged Single file: {"prefetch_paths":"path/to/your/file.jpg"} More files: {"prefetch_paths":"/path/to/file1.png\n/path/to/file2.png\n/path/to/ otherfile.png"} All parameters are required. Additional notes: id of CDN resource can be found in the CDN list: https://client.cdn77.com/cdn/list API password can be found in the API section, which can be found in the client section: https://client.cdn77.com/cdn/how-to-prefetch Limitations of prefetch API method allowed requests per second: 1 allowed requests per day: 1000 Example of usage (via Linux s curl utility): Prefetching of single file: curl --data "id=id of cdn&login=sample@account.com&passwd=your api password&json={'prefetch_paths':'/path/to/file.jpg'}" https:// client.cdn77.com/api/prefetch Prefetching of more files at once: - 9 -

curl --data "id=id of cdn&login=sample@account.com&passwd=your api password&json={'prefetch_paths':'/path/to/file.jpg\n/path/to/ file2.jpg\n/path/to/file3.jpg''}" https://client.cdn77.com/api/prefetch It returns status : ok JSON response in success and any other response or status is failure. Example of successful prefetch API response: {"status":"ok","description":"prefetch request successful"} 2.4. Create CDN resource 2.4.1 Description New CDN resource can be created via API just like from the client section. Origin domain, cname and SSL support can be chosen in the creation. 2.4.2 Implementation Following HTTP POST parameters is accepted on the following gateway: https://client.cdn77.com/api/create-cdn POST parameter name Parameter description Example of usage origin_url cname Origin domain, from which the content will be pulled CNAME for your CDN resource www.yourwebsite.com (without protocol specification) cdn.yourwebsite.com (without protocol specification) - 10 -

ssl Type of CDN resource values: 0 = SSL disabled (custom CNAME could be used) 1 = SSL enabled (CNAME must end with r.worldssl.net ) method login Amount of data returned in response Login to CDN77 client section values: verbose = more data will be returned in response without value (not present/not set or null) = simple response without CDN resource ID etc. sample@account.com passwd API password 8vL4BpXbRqgPTKA0hV36dWjMTNfIkZK8 All parameters are required, except for method parameter, which is optional. Additional notes: id of CDN resource can be found in the CDN list: https://client.cdn77.com/cdn/list API password can be found in the API section, which can be found in the client section: https://client.cdn77.com/cdn/how-to-create Limitations of prefetch API method allowed requests per second: 1 allowed requests per day: 100 Example of usage (via Linux s curl utility): Creating CDN resource without SSL support: curl --data "login=sample@account.com&passwd=your api password&origin_url=www.yourwebsite.com&cname=cdn.yourwebsite.com&ssl=0" https://client.cdn77.com/api/create-cdn It returns status : ok JSON response in success and any other response or status is failure. - 11 -

Example of successful create CDN API response: {"status":"ok","description":"cdn cdn.yourwebsite.com created"} Creating CDN resource without SSL support with method present and with value verbose : curl --data "login=sample@account.com&passwd=your api password&origin_url=www.yourwebsite.com&cname=cdn.yourwebsite.com&ssl=0&method=verbose" https://client.cdn77.com/api/createcdn It returns status : ok JSON response in success and any other response or status ( status : error ) is failure. Example of successful create CDN API response: {"status":"ok","description":"cdn cdn.yourwebsite.com created","id":1234,"cdnurl":"733812352.r.cdn77.net","cname":"cdn.yourwebsite.com"} 2.5. Delete CDN resource 2.5.1 Description Any CDN resource can be deleted via API (via its ID) just like from the client section. 2.5.2 Implementation Following HTTP POST parameters is accepted on the following gateway: https://client.cdn77.com/api/delete-cdn POST parameter name Parameter description Example of usage - 12 -

id login ID of CDN resource, on which the Login to CDN77 client section 1234 sample@account.com passwd API password 8vL4BpXbRqgPTKA0hV36dWjMTNfIkZK8 All parameters are required. Additional notes: id of CDN resource can be found in the CDN list: https://client.cdn77.com/cdn/list API password can be found in the API section, which can be found in the client section: https://client.cdn77.com/cdn/how-to-delete Limitations of prefetch API method allowed requests per second: 1 allowed requests per day: 100 Example of usage (via Linux s curl utility): Deleting CDN resource with ID 1234: curl --data "id=1234&login=sample@account.com&passwd=your api password" https://client.cdn77.com/api/delete-cdn It returns status : ok JSON response in success and any other response or status is failure. Example of successful delete CDN API response: {"status":"ok","description":"cdn id 1234 was deleted"} - 13 -

2.6. Edit CDN resource 2.6.1 Description Any CDN resource can be edited via API (via its ID). Not all settings from client section are available via API. 2.6.2 Implementation Following HTTP POST parameters is accepted on the following gateway: https://client.cdn77.com/api/edit-cdn POST parameter name Parameter description Example of usage id login ID of CDN resource, on which the Login to CDN77 client section 1234 sample@account.com passwd API password 8vL4BpXbRqgPTKA0hV36dWjMTNfIkZK8 origin_url cname Origin URL from which the content will be pulled (source of files for CDN) CNAME for your CDN resource www.yourdomain.com cdn.yourdomain.com cache_expiry Cache Expiry value (cache TTL) 14400 (see additional notes below this table, to see all allowed values) - 14 -

url_signing_on Switch token authentication setting values: 1 = url signing enabled 0 = url signing disabled url_signing_key Set token authentication key (password) rkybztaapfhsv5nd (it must be 16 characters long) All parameters are optional, except for id, login and password, which are required. Additional notes: id of CDN resource can be found in the CDN list: https://client.cdn77.com/cdn/list API password can be found in the API section, which can be found in the client section: https://client.cdn77.com/cdn/how-to-edit-cdn Limitations of prefetch API method allowed requests per second: 1 allowed requests per day: 1000 allowed cache_expiry values: 10, 30, 60, 240, 720, 1440, 2880, 4320, 5760, 7200, 8640, 10080, 11520, 12960, 14400, 15840, 17280 cache_expiry values are in minutes cache_expiry value can be overridden by setting custom Expires and Cache-Control headers on the origin url_signing_key must be equal 16 characters Example of usage (via Linux s curl utility): Editing CDN resource with ID 1234: curl --data "login=sample@account.com&passwd=your api password&id=1234&origin_url=www.yourwebsite.com&cname=cdn.yourwebsite.com&cache_expiry=14400&url_signing_on=1&url_signing _key=abcdefghij123456" https://client.cdn77.com/api/edit-cdn - 15 -

It returns status : ok JSON response in success and any other response or status is failure. Example of successful edit CDN API response: {"status":"ok","description":"cdn id 1234 updated;origin_url updated to www.yourwebsite.com;cname updated to cdn.yourwebsite.com;cache_expiry updated to 14400;url_signing_key updated to abcdefghij123456;url_signing_on updated to 1"} 2.7. Fetch statistics data 2.7.1 Description purposes. Traffic statistics data can be fetched via API for any further processing or archiving 2.7.2 Implementation Following HTTP POST parameters is accepted on the following gateway: https://client.cdn77.com/api/traffic POST parameter name Parameter description Example of usage id login ID of CDN resource, on which the Login to CDN77 client section 1234 sample@account.com passwd API password 8vL4BpXbRqgPTKA0hV36dWjMTNfIkZK8-16 -

All parameters are required. Additional notes: id of CDN resource can be found in the CDN list: https://client.cdn77.com/cdn/list if id parameter set to all then traffic statistics for all CDN resources will be returned API password can be found in the API section, which can be found in the client section: https://client.cdn77.com/cdn/how-to-traffic Limitations of prefetch API method allowed requests per second: 1 allowed requests per day: 1000 Example of usage (via Linux s curl utility): Getting traffic statistics for CDN resource with ID 1234: curl --data "id=1234&login=sample@account.com&passwd=your api password" https://client.cdn77.com/api/traffic It returns status : ok JSON response in success and any other response or status is failure. Example of successful CDN traffic statistics API response: {"24h":"164.95 MB","48h":"399.47 MB","30d":"14.67 GB","02m":"0 Bytes","01m":"35.56 GB","00m":"14.67 GB"} - 17 -

Getting traffic statistics for all CDN resources: curl --data "id=all&login=sample@account.com&passwd=your api password" https://client.cdn77.com/api/traffic It returns status : ok JSON response in success and any other response or status is failure. Example of successful CDN traffic statistics API response: {"24h":"164.95 MB","48h":"399.56 MB","30d":"36.61 GB","02m":"206.82 KB","01m":"115.58 GB","00m":"29.05 GB"} 2.8. Get CDN details 2.8.1 Description Get details (of settings) of CDN resource. 2.8.2 Implementation Following HTTP POST parameters is accepted on the following gateway: https://client.cdn77.com/api/cdn-detail POST parameter name Parameter description Example of usage id login ID of CDN resource, on which the Login to CDN77 client section 1234 sample@account.com passwd API password 8vL4BpXbRqgPTKA0hV36dWjMTNfIkZK8-18 -

All parameters are required, except for id parameter. - 19 -

Additional notes: id of CDN resource can be found in the CDN list: https://client.cdn77.com/cdn/list if id parameter is missing, details for all CDN resources will be shown (this could take a while) API password can be found in the API section, which can be found in the client section: https://client.cdn77.com/cdn/how-to-cdn-detail Limitations of prefetch API method allowed requests per second: 1 allowed requests per day: 1000 Getting details of settings for CDN resource with ID 1234: curl --data "id=1234&login=sample@account.com&passwd=your api password" https://client.cdn77.com/api/cdn-detail It returns status : ok JSON response in success and any other response or status is failure. Example of successful CDN traffic statistics API response: {"status":"ok","description":[{"id":1234,"origin_url":"www.yourwebsite.com","cname":"cdn.yourwebsite.com","cdn_url":"105264313.r.cdn78.n et","cache_expiry":2880,"url_signing_on":false,"url_signing_key":""}]} Getting details of settings for all CDN resources: curl --data "login=sample@account.com&passwd=your api password" https://client.cdn77.com/api/cdn-detail - 20 -

It returns status : ok JSON response in success and any other response or status is failure. Example of successful CDN traffic statistics API response: {"status":"ok","description":[{"id":4004,"origin_url":"www.yourwebsite.com","cname":"cdn.yourwebsite.com", "cdn_url":"123499422.r.cdn77.net","cache_expiry":14400,"url_signing_on":true,"url_signing_key":"abcd5mn6ipzpjmxd"}, {"id":3308,"origin_url":"www.yourwebsite2.com","cname":"cdn.yourwebsite2.com","cdn_url":"361236165.r.cdn77.net", "cache_expiry":2160,"url_signing_on":false,"url_signing_key":""}]} - 21 -