SlideShare a Scribd company logo
1 of 55
PRESENTED BY: 
Sean & Ricky 
INTRODUCTION TO 
KAZOO APIs
#kazoocon14 
What is an API?
#kazoocon14 
Application 
Programming 
Interface
#kazoocon14 
An API as a bolt.
#kazoocon14 
REST 
Kazoo APIs are an example of a RESTFul web-service.
#kazoocon14 
HTTP/HTTPS 
Kazoo APIs are provided over HTTP/HTTPS
#kazoocon14 
In most cases Kazoo APIs work just like a website!
#kazoocon14 
What do the HTTP requests do?
#kazoocon14 
Resources 
Resources are just “Things”.
#kazoocon14 
Collections 
Collections are just a group of resources of the same 
type.
#kazoocon14 
Entities 
Entities are a single instance of a 
resource.
#kazoocon14 
IDs 
We use IDs to identify entities.
#kazoocon14 
But how do we tell the server 
what resources we want to 
interact with?
#kazoocon14 
Uniform Resource Identifiers (URIs) 
http://test.2600hz.com:8000/v1/accounts/C1234/users/U3456
#kazoocon14 
URI – Uniform Resource Identifier 
http://test.2600hz.com:8000/v1/accounts/C1234/users/U3456 
Base URL = http://test.2600hz.com:8000
#kazoocon14 
URI – Uniform Resource Identifier 
http://test.2600hz.com:8000/v1/accounts/C1234/users/U3456 
Base URL = http://test.2600hz.com:8000 
/v1/
#kazoocon14 
URI – Uniform Resource Identifier 
http://test.2600hz.com:8000/v1/accounts/C1234/users/U3456 
Base URL = http://test.2600hz.com:8000 
/v1/ 
/v1/accounts/
#kazoocon14 
URI – Uniform Resource Identifier 
http://test.2600hz.com:8000/v1/accounts/C1234/users/U3456 
Base URL = http://test.2600hz.com:8000 
/v1/ 
/v1/accounts/ 
/v1/accounts/C1234/
#kazoocon14 
URI – Uniform Resource Identifier 
http://test.2600hz.com:8000/v1/accounts/C1234/users/U3456 
Base URL = http://test.2600hz.com:8000 
/v1/ 
/v1/accounts/ 
/v1/accounts/C1234/ 
/v1/accounts/C1234/users/
#kazoocon14 
URI – Uniform Resource Identifier 
http://test.2600hz.com:8000/v1/accounts/C1234/users/U3456 
Base URL = http://test.2600hz.com:8000 
/v1/ 
/v1/accounts/ 
/v1/accounts/C1234/ 
/v1/accounts/C1234/users/ 
/v1/accounts/C1234/users/U3456/
#kazoocon14 
How do we tell the server 
what to do with the resource 
we identified?
#kazoocon14 
HTTP Verbs or Methods 
GET - /v1/accounts/C1234/users/ 
PUT - /v1/accounts/C1234/devices/ 
+ data payload 
POST /v1/accounts/C1234/users/U1112 
+ data payload 
DELETE - /v1/accounts/C1234/users/U1112
Verbs for interacting with collections 
#kazoocon14 
GET - /v1/accounts/C1234/users/ 
PUT - /v1/accounts/C1234/users/ 
+ data payload
#kazoocon14 
Verbs for interacting with entities 
GET - /v1/accounts/C1234/users/U1112 
POST /v1/accounts/C1234/users/U1112 
+ data payload 
DELETE /v1/accounts/C1234/users/U1112
#kazoocon14 
HTTP Response codes 
2xx - successful request! 
200 - means the request was successful 
201 - Entity was created 
4xx - you messed up! 
401 - unauthorized (check your auth token) 
404 - entity or endpoint doesn't exist. 
5xx - server messed up! 
500 - generic server error
#kazoocon14 
HTTP headers 
Headers are used to set parameters used in 
processing the request. 
Example: 
X-Auth-Token: <your auth token> 
Content-Type: application/json
#kazoocon14 
What is the payload?
#kazoocon14 
Payload 
A payload is the 
representation of the resource 
we requested.
Kazoo APIs mostly uses the JavaScript Object Notation (JSON) data 
format for most payloads 
#kazoocon14 
{ 
“key” : “value” 
}
#kazoocon14 
Key value pairs 
“key” : “value”
#kazoocon14 
Key example: 
“key” : “value”
#kazoocon14 
Value examples 
“key” : “value”
#kazoocon14 
JSON Data Types: 
“string_example” : “a string”, 
“number_example” : 1, 
“boolean_example” : true, 
“null_example” : null, 
“array_example” : [ “a string”, “a number” ], 
“object_example” : { “some_key” : “some_value”, “other_key” : 1 }
#kazoocon14 
JSON BASE OBJECT 
{ 
“key” : “value” 
}
#kazoocon14 
Complex nested JSON example: 
{ 
“level_one_object” : { 
“level_two_object” : { 
“level3_key” : “level3_value”, 
“level3_array” : [ 
“level4_value” 
] 
}, 
“level_two_array” : [ 
“level3_value” 
] 
} 
}
#kazoocon14 
In the API, we always have a “data” object which 
contains the payload. 
{ 
“data” : { 
“parameters_for_resource” : “some value” 
} 
“metadata_stuff” : … 
}
#kazoocon14 
Putting it all together.
#kazoocon14
#kazoocon14
#kazoocon14
#kazoocon14
#kazoocon14 
To recap.
#kazoocon14 
• The URI is a “noun” which Identifies a specific resource. 
• The HTTP method is a “verb” which defines what type of action we 
want to take against the resource. 
• The contents of the payload is a JSON object.
#kazoocon14 
Ok, let’s play with the Kazoo 
APIs!!!
Tools for exploring Kazoo APIs 
#kazoocon14 
• Kazoo UI, Developer tools 
• Curl – Command Line Tool 
• Postman – Browser based. 
• SDKs (Software Development Kit)
Tools for exploring Kazoo APIs 
#kazoocon14 
• Kazoo UI, Developer tools 
http://kazooui.kazoocon.com 
• Curl – Command Line Tool 
• Postman – Browser based. 
• SDKs (Software Development Kit)
#kazoocon14 
Authentication Tokens 
Temporary “Security tokens” used to authenticate clients. 
How to get one: 
credentials = an md5 hash of the string username:password 
echo -n “user:pass” | md5 
PUT http://api.sandbox.2600hz.com:8000/v1/user_auth 
{ “data”: { “credentials” : “12345678”, “realm” : “your.realm.com” }} 
or 
{ “data”: { “credentials” : “12345678”, “account_name” : “account_name”}} 
PUT http://api.sandbox.2600hz.com:8000/v1/api_auth 
{ “data” : { “api_key” : “YOUR_API_KEY” }} 
NOTE: you can get API key with GET -/v1/accounts/<Account_ID>/api_key
Tools for exploring Kazoo APIs 
#kazoocon14 
• Kazoo UI, Developer tools 
• Curl – Command Line Tool 
• Postman – Browser based. 
• SDKs (Software Development Kit)
Tools for exploring Kazoo APIs 
#kazoocon14 
• Kazoo UI, Developer tools 
• Curl – Command Line Tool 
• Postman – Browser based. 
• SDKs (Software Development Kit)
Tools for exploring Kazoo APIs 
#kazoocon14 
• Kazoo UI, Developer tools 
• Curl – Command Line Tool 
• Postman – Browser based. 
• SDKs (Software Development Kit)
#kazoocon14 
CreateNewAdminAccount
#kazoocon14 
CreateNewAdminUser
#kazoocon14 
PHP SDK example sign-up form.
#kazoocon14 
Links 
Github link for PHP SDK: 
https://github.com/2600hz/kazoo-php-sdk 
Google Groups: 
https://groups.google.com/forum/#!forum/2600hz-dev 
https://groups.google.com/forum/#!forum/2600hz-users 
Sign-up page: 
http://userxxx.u.kazoocon.com/sign_up/gobblin/#ajax/sig 
nup.html
Thank You! 
#kazoocon14

More Related Content

What's hot

Network Automation (NetDevOps) with Ansible
Network Automation (NetDevOps) with AnsibleNetwork Automation (NetDevOps) with Ansible
Network Automation (NetDevOps) with AnsibleAPNIC
 
Yesplan: 10 Years later
Yesplan: 10 Years laterYesplan: 10 Years later
Yesplan: 10 Years laterPharo
 
Docker and Pharo @ZWEIDENKER
Docker and Pharo @ZWEIDENKERDocker and Pharo @ZWEIDENKER
Docker and Pharo @ZWEIDENKERZWEIDENKER GmbH
 
AWS SDK for PHP のインストールから 始めるクラウドマスターへの道 〜 Promise による非同期オペレーション 〜
AWS SDK for PHP のインストールから 始めるクラウドマスターへの道 〜 Promise による非同期オペレーション 〜 AWS SDK for PHP のインストールから 始めるクラウドマスターへの道 〜 Promise による非同期オペレーション 〜
AWS SDK for PHP のインストールから 始めるクラウドマスターへの道 〜 Promise による非同期オペレーション 〜 崇之 清水
 
Time to say goodbye to your Nagios based setup
Time to say goodbye to your Nagios based setupTime to say goodbye to your Nagios based setup
Time to say goodbye to your Nagios based setupCheck my Website
 
SIP Server Optimizations for Mobile Networks
SIP Server Optimizations for Mobile NetworksSIP Server Optimizations for Mobile Networks
SIP Server Optimizations for Mobile NetworksDaniel-Constantin Mierla
 
Icinga 2011 at Chemnitzer Linuxtage
Icinga 2011 at Chemnitzer LinuxtageIcinga 2011 at Chemnitzer Linuxtage
Icinga 2011 at Chemnitzer LinuxtageIcinga
 
Icinga Web 2 is more
Icinga Web 2 is moreIcinga Web 2 is more
Icinga Web 2 is moreIcinga
 
Icinga 2 and puppet: automate monitoring
Icinga 2 and puppet: automate monitoringIcinga 2 and puppet: automate monitoring
Icinga 2 and puppet: automate monitoringOlinData
 
Core bluetooth @ cocohead
Core bluetooth @ cocoheadCore bluetooth @ cocohead
Core bluetooth @ cocoheadKai-Yuan Cheng
 
Icinga 2010 at Nagios Workshop
Icinga 2010 at Nagios WorkshopIcinga 2010 at Nagios Workshop
Icinga 2010 at Nagios WorkshopIcinga
 
Plack on SL4A in Yokohama.pm #8
Plack on SL4A in Yokohama.pm #8Plack on SL4A in Yokohama.pm #8
Plack on SL4A in Yokohama.pm #8Yoshiki Kurihara
 
Making It To Veteren Cassandra Status
Making It To Veteren Cassandra StatusMaking It To Veteren Cassandra Status
Making It To Veteren Cassandra StatusEric Lubow
 
Distributed Developer Workflows using Git
Distributed Developer Workflows using GitDistributed Developer Workflows using Git
Distributed Developer Workflows using GitSusan Potter
 
Counters At Scale - A Cautionary Tale
Counters At Scale - A Cautionary TaleCounters At Scale - A Cautionary Tale
Counters At Scale - A Cautionary TaleEric Lubow
 
Grafana and MySQL - Benefits and Challenges
Grafana and MySQL - Benefits and ChallengesGrafana and MySQL - Benefits and Challenges
Grafana and MySQL - Benefits and ChallengesPhilip Wernersbach
 
Icinga 2010 at OSMC
Icinga 2010 at OSMCIcinga 2010 at OSMC
Icinga 2010 at OSMCIcinga
 

What's hot (20)

Network Automation (NetDevOps) with Ansible
Network Automation (NetDevOps) with AnsibleNetwork Automation (NetDevOps) with Ansible
Network Automation (NetDevOps) with Ansible
 
Yesplan: 10 Years later
Yesplan: 10 Years laterYesplan: 10 Years later
Yesplan: 10 Years later
 
Network automation (NetDevOps) with Ansible
Network automation (NetDevOps) with AnsibleNetwork automation (NetDevOps) with Ansible
Network automation (NetDevOps) with Ansible
 
Docker and Pharo @ZWEIDENKER
Docker and Pharo @ZWEIDENKERDocker and Pharo @ZWEIDENKER
Docker and Pharo @ZWEIDENKER
 
AWS SDK for PHP のインストールから 始めるクラウドマスターへの道 〜 Promise による非同期オペレーション 〜
AWS SDK for PHP のインストールから 始めるクラウドマスターへの道 〜 Promise による非同期オペレーション 〜 AWS SDK for PHP のインストールから 始めるクラウドマスターへの道 〜 Promise による非同期オペレーション 〜
AWS SDK for PHP のインストールから 始めるクラウドマスターへの道 〜 Promise による非同期オペレーション 〜
 
Time to say goodbye to your Nagios based setup
Time to say goodbye to your Nagios based setupTime to say goodbye to your Nagios based setup
Time to say goodbye to your Nagios based setup
 
SIP Server Optimizations for Mobile Networks
SIP Server Optimizations for Mobile NetworksSIP Server Optimizations for Mobile Networks
SIP Server Optimizations for Mobile Networks
 
Icinga 2011 at Chemnitzer Linuxtage
Icinga 2011 at Chemnitzer LinuxtageIcinga 2011 at Chemnitzer Linuxtage
Icinga 2011 at Chemnitzer Linuxtage
 
Icinga Web 2 is more
Icinga Web 2 is moreIcinga Web 2 is more
Icinga Web 2 is more
 
Icinga 2 and puppet: automate monitoring
Icinga 2 and puppet: automate monitoringIcinga 2 and puppet: automate monitoring
Icinga 2 and puppet: automate monitoring
 
Zabbix Console
Zabbix ConsoleZabbix Console
Zabbix Console
 
Core bluetooth @ cocohead
Core bluetooth @ cocoheadCore bluetooth @ cocohead
Core bluetooth @ cocohead
 
Icinga 2010 at Nagios Workshop
Icinga 2010 at Nagios WorkshopIcinga 2010 at Nagios Workshop
Icinga 2010 at Nagios Workshop
 
Plack on SL4A in Yokohama.pm #8
Plack on SL4A in Yokohama.pm #8Plack on SL4A in Yokohama.pm #8
Plack on SL4A in Yokohama.pm #8
 
Making It To Veteren Cassandra Status
Making It To Veteren Cassandra StatusMaking It To Veteren Cassandra Status
Making It To Veteren Cassandra Status
 
Bolts
Bolts  Bolts
Bolts
 
Distributed Developer Workflows using Git
Distributed Developer Workflows using GitDistributed Developer Workflows using Git
Distributed Developer Workflows using Git
 
Counters At Scale - A Cautionary Tale
Counters At Scale - A Cautionary TaleCounters At Scale - A Cautionary Tale
Counters At Scale - A Cautionary Tale
 
Grafana and MySQL - Benefits and Challenges
Grafana and MySQL - Benefits and ChallengesGrafana and MySQL - Benefits and Challenges
Grafana and MySQL - Benefits and Challenges
 
Icinga 2010 at OSMC
Icinga 2010 at OSMCIcinga 2010 at OSMC
Icinga 2010 at OSMC
 

Viewers also liked

Kamailio and VoIP Wild World
Kamailio and VoIP Wild WorldKamailio and VoIP Wild World
Kamailio and VoIP Wild World2600Hz
 
KazooCon 2014 - Control Cellular Service via APIs
KazooCon 2014 - Control Cellular Service via APIsKazooCon 2014 - Control Cellular Service via APIs
KazooCon 2014 - Control Cellular Service via APIs2600Hz
 
Zotonic tutorial EUC 2013
Zotonic tutorial EUC 2013Zotonic tutorial EUC 2013
Zotonic tutorial EUC 2013Arjan
 
2600hz CTO Karl Anderson speaks at Kamailio World 2014
2600hz CTO Karl Anderson speaks at Kamailio World 20142600hz CTO Karl Anderson speaks at Kamailio World 2014
2600hz CTO Karl Anderson speaks at Kamailio World 20142600Hz
 
VirtualPBX - Back Office, Delivering Voice in a Competitive Market - KazooCon...
VirtualPBX - Back Office, Delivering Voice in a Competitive Market - KazooCon...VirtualPBX - Back Office, Delivering Voice in a Competitive Market - KazooCon...
VirtualPBX - Back Office, Delivering Voice in a Competitive Market - KazooCon...2600Hz
 
KazooCon 2014 - Playing Kazoo Dudka Style
KazooCon 2014 - Playing Kazoo Dudka StyleKazooCon 2014 - Playing Kazoo Dudka Style
KazooCon 2014 - Playing Kazoo Dudka Style2600Hz
 
KazooCon 2014 - Building Your Business: Behind the Numbers!
KazooCon 2014 - Building Your Business: Behind the Numbers!KazooCon 2014 - Building Your Business: Behind the Numbers!
KazooCon 2014 - Building Your Business: Behind the Numbers!2600Hz
 
2600hz WebRTC Meetup at WeWork, San Francisco, CA
2600hz WebRTC Meetup at WeWork, San Francisco, CA2600hz WebRTC Meetup at WeWork, San Francisco, CA
2600hz WebRTC Meetup at WeWork, San Francisco, CA2600Hz
 
Telnexus - Quote to Cash – KazooCon 2015
Telnexus - Quote to Cash – KazooCon 2015Telnexus - Quote to Cash – KazooCon 2015
Telnexus - Quote to Cash – KazooCon 20152600Hz
 
2600Hz - Billing Data with Kazoo
2600Hz - Billing Data with Kazoo2600Hz - Billing Data with Kazoo
2600Hz - Billing Data with Kazoo2600Hz
 
KazooCon 2014 - Range Networks, the Future of Mobile
KazooCon 2014 - Range Networks, the Future of Mobile KazooCon 2014 - Range Networks, the Future of Mobile
KazooCon 2014 - Range Networks, the Future of Mobile 2600Hz
 
2600Hz - Least Cost Routing in the Cloud
2600Hz - Least Cost Routing in the Cloud2600Hz - Least Cost Routing in the Cloud
2600Hz - Least Cost Routing in the Cloud2600Hz
 
KazooCon 2014 - Ziron, SMS for voice people
KazooCon 2014 - Ziron, SMS for voice peopleKazooCon 2014 - Ziron, SMS for voice people
KazooCon 2014 - Ziron, SMS for voice people2600Hz
 
2600Hz - Telecom Rating and Limits
2600Hz - Telecom Rating and Limits2600Hz - Telecom Rating and Limits
2600Hz - Telecom Rating and Limits2600Hz
 
Voxter - Building Value with Kazoo - KazooCon 2015
Voxter - Building Value with Kazoo - KazooCon 2015Voxter - Building Value with Kazoo - KazooCon 2015
Voxter - Building Value with Kazoo - KazooCon 20152600Hz
 
KazooCon 2014 - Deploying Kazoo Globally
KazooCon 2014 - Deploying Kazoo GloballyKazooCon 2014 - Deploying Kazoo Globally
KazooCon 2014 - Deploying Kazoo Globally2600Hz
 
2600Hz - Detecting and Managing VoIP Fraud
2600Hz - Detecting and Managing VoIP Fraud2600Hz - Detecting and Managing VoIP Fraud
2600Hz - Detecting and Managing VoIP Fraud2600Hz
 
TADSummit Dangerous demo: Oracle
TADSummit Dangerous demo: OracleTADSummit Dangerous demo: Oracle
TADSummit Dangerous demo: OracleAlan Quayle
 
Fuentes alternativas de materia prima
Fuentes alternativas de materia primaFuentes alternativas de materia prima
Fuentes alternativas de materia primaangelo26_
 
Life after cancer adolescents and young adults with cancer
Life after cancer   adolescents and young adults with cancerLife after cancer   adolescents and young adults with cancer
Life after cancer adolescents and young adults with cancerDiego Villalón García
 

Viewers also liked (20)

Kamailio and VoIP Wild World
Kamailio and VoIP Wild WorldKamailio and VoIP Wild World
Kamailio and VoIP Wild World
 
KazooCon 2014 - Control Cellular Service via APIs
KazooCon 2014 - Control Cellular Service via APIsKazooCon 2014 - Control Cellular Service via APIs
KazooCon 2014 - Control Cellular Service via APIs
 
Zotonic tutorial EUC 2013
Zotonic tutorial EUC 2013Zotonic tutorial EUC 2013
Zotonic tutorial EUC 2013
 
2600hz CTO Karl Anderson speaks at Kamailio World 2014
2600hz CTO Karl Anderson speaks at Kamailio World 20142600hz CTO Karl Anderson speaks at Kamailio World 2014
2600hz CTO Karl Anderson speaks at Kamailio World 2014
 
VirtualPBX - Back Office, Delivering Voice in a Competitive Market - KazooCon...
VirtualPBX - Back Office, Delivering Voice in a Competitive Market - KazooCon...VirtualPBX - Back Office, Delivering Voice in a Competitive Market - KazooCon...
VirtualPBX - Back Office, Delivering Voice in a Competitive Market - KazooCon...
 
KazooCon 2014 - Playing Kazoo Dudka Style
KazooCon 2014 - Playing Kazoo Dudka StyleKazooCon 2014 - Playing Kazoo Dudka Style
KazooCon 2014 - Playing Kazoo Dudka Style
 
KazooCon 2014 - Building Your Business: Behind the Numbers!
KazooCon 2014 - Building Your Business: Behind the Numbers!KazooCon 2014 - Building Your Business: Behind the Numbers!
KazooCon 2014 - Building Your Business: Behind the Numbers!
 
2600hz WebRTC Meetup at WeWork, San Francisco, CA
2600hz WebRTC Meetup at WeWork, San Francisco, CA2600hz WebRTC Meetup at WeWork, San Francisco, CA
2600hz WebRTC Meetup at WeWork, San Francisco, CA
 
Telnexus - Quote to Cash – KazooCon 2015
Telnexus - Quote to Cash – KazooCon 2015Telnexus - Quote to Cash – KazooCon 2015
Telnexus - Quote to Cash – KazooCon 2015
 
2600Hz - Billing Data with Kazoo
2600Hz - Billing Data with Kazoo2600Hz - Billing Data with Kazoo
2600Hz - Billing Data with Kazoo
 
KazooCon 2014 - Range Networks, the Future of Mobile
KazooCon 2014 - Range Networks, the Future of Mobile KazooCon 2014 - Range Networks, the Future of Mobile
KazooCon 2014 - Range Networks, the Future of Mobile
 
2600Hz - Least Cost Routing in the Cloud
2600Hz - Least Cost Routing in the Cloud2600Hz - Least Cost Routing in the Cloud
2600Hz - Least Cost Routing in the Cloud
 
KazooCon 2014 - Ziron, SMS for voice people
KazooCon 2014 - Ziron, SMS for voice peopleKazooCon 2014 - Ziron, SMS for voice people
KazooCon 2014 - Ziron, SMS for voice people
 
2600Hz - Telecom Rating and Limits
2600Hz - Telecom Rating and Limits2600Hz - Telecom Rating and Limits
2600Hz - Telecom Rating and Limits
 
Voxter - Building Value with Kazoo - KazooCon 2015
Voxter - Building Value with Kazoo - KazooCon 2015Voxter - Building Value with Kazoo - KazooCon 2015
Voxter - Building Value with Kazoo - KazooCon 2015
 
KazooCon 2014 - Deploying Kazoo Globally
KazooCon 2014 - Deploying Kazoo GloballyKazooCon 2014 - Deploying Kazoo Globally
KazooCon 2014 - Deploying Kazoo Globally
 
2600Hz - Detecting and Managing VoIP Fraud
2600Hz - Detecting and Managing VoIP Fraud2600Hz - Detecting and Managing VoIP Fraud
2600Hz - Detecting and Managing VoIP Fraud
 
TADSummit Dangerous demo: Oracle
TADSummit Dangerous demo: OracleTADSummit Dangerous demo: Oracle
TADSummit Dangerous demo: Oracle
 
Fuentes alternativas de materia prima
Fuentes alternativas de materia primaFuentes alternativas de materia prima
Fuentes alternativas de materia prima
 
Life after cancer adolescents and young adults with cancer
Life after cancer   adolescents and young adults with cancerLife after cancer   adolescents and young adults with cancer
Life after cancer adolescents and young adults with cancer
 

Similar to KazooCon 2014 - Introduction to Kazoo APIs!

Building Better Web APIs with Rails
Building Better Web APIs with RailsBuilding Better Web APIs with Rails
Building Better Web APIs with RailsAll Things Open
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformAntonio Peric-Mazar
 
Nordic APIs - Automatic Testing of (RESTful) API Documentation
Nordic APIs - Automatic Testing of (RESTful) API DocumentationNordic APIs - Automatic Testing of (RESTful) API Documentation
Nordic APIs - Automatic Testing of (RESTful) API DocumentationRouven Weßling
 
Enter the app era with ruby on rails (rubyday)
Enter the app era with ruby on rails (rubyday)Enter the app era with ruby on rails (rubyday)
Enter the app era with ruby on rails (rubyday)Matteo Collina
 
Recipes for a successful production cloudfoundry deployment - CF Summit 2014
Recipes for a successful production cloudfoundry deployment - CF Summit 2014Recipes for a successful production cloudfoundry deployment - CF Summit 2014
Recipes for a successful production cloudfoundry deployment - CF Summit 2014Vinícius Carvalho
 
Cloud Foundry Cookbook: Recipes for a Successful Cloud Foundry Deployment in ...
Cloud Foundry Cookbook: Recipes for a Successful Cloud Foundry Deployment in ...Cloud Foundry Cookbook: Recipes for a Successful Cloud Foundry Deployment in ...
Cloud Foundry Cookbook: Recipes for a Successful Cloud Foundry Deployment in ...VMware Tanzu
 
API Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIsAPI Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIsTom Johnson
 
API Days Paris - Automatic Testing of (RESTful) API Documentation
API Days Paris - Automatic Testing of (RESTful) API DocumentationAPI Days Paris - Automatic Testing of (RESTful) API Documentation
API Days Paris - Automatic Testing of (RESTful) API DocumentationRouven Weßling
 
Dead Simple APIs with OpenAPI
Dead Simple APIs with OpenAPIDead Simple APIs with OpenAPI
Dead Simple APIs with OpenAPIChris Tankersley
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformAntonio Peric-Mazar
 
Amazon API Gateway and AWS Lambda: Better Together
Amazon API Gateway and AWS Lambda: Better TogetherAmazon API Gateway and AWS Lambda: Better Together
Amazon API Gateway and AWS Lambda: Better TogetherDanilo Poccia
 
Introduction to CloudStack API
Introduction to CloudStack APIIntroduction to CloudStack API
Introduction to CloudStack APIKrunal Jain
 
Enter the app era with ruby on rails
Enter the app era with ruby on railsEnter the app era with ruby on rails
Enter the app era with ruby on railsMatteo Collina
 
API Days Australia - Automatic Testing of (RESTful) API Documentation
API Days Australia  - Automatic Testing of (RESTful) API DocumentationAPI Days Australia  - Automatic Testing of (RESTful) API Documentation
API Days Australia - Automatic Testing of (RESTful) API DocumentationRouven Weßling
 
ContainerCon 2015 - Be a Microservices Hero
ContainerCon 2015 - Be a Microservices HeroContainerCon 2015 - Be a Microservices Hero
ContainerCon 2015 - Be a Microservices HeroDragos Dascalita
 
REST with Eve and Python
REST with Eve and PythonREST with Eve and Python
REST with Eve and PythonPiXeL16
 
Webinar AWS 201 Delivering apps without servers
Webinar AWS 201 Delivering apps without serversWebinar AWS 201 Delivering apps without servers
Webinar AWS 201 Delivering apps without serversAmazon Web Services
 
Lies you have been told about REST
Lies you have been told about RESTLies you have been told about REST
Lies you have been told about RESTdarrelmiller71
 
RoR Workshop - Web applications hacking - Ruby on Rails example
RoR Workshop - Web applications hacking - Ruby on Rails exampleRoR Workshop - Web applications hacking - Ruby on Rails example
RoR Workshop - Web applications hacking - Ruby on Rails exampleRailwaymen
 

Similar to KazooCon 2014 - Introduction to Kazoo APIs! (20)

Building Better Web APIs with Rails
Building Better Web APIs with RailsBuilding Better Web APIs with Rails
Building Better Web APIs with Rails
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API Platform
 
Nordic APIs - Automatic Testing of (RESTful) API Documentation
Nordic APIs - Automatic Testing of (RESTful) API DocumentationNordic APIs - Automatic Testing of (RESTful) API Documentation
Nordic APIs - Automatic Testing of (RESTful) API Documentation
 
Enter the app era with ruby on rails (rubyday)
Enter the app era with ruby on rails (rubyday)Enter the app era with ruby on rails (rubyday)
Enter the app era with ruby on rails (rubyday)
 
Recipes for a successful production cloudfoundry deployment - CF Summit 2014
Recipes for a successful production cloudfoundry deployment - CF Summit 2014Recipes for a successful production cloudfoundry deployment - CF Summit 2014
Recipes for a successful production cloudfoundry deployment - CF Summit 2014
 
Cloud Foundry Cookbook: Recipes for a Successful Cloud Foundry Deployment in ...
Cloud Foundry Cookbook: Recipes for a Successful Cloud Foundry Deployment in ...Cloud Foundry Cookbook: Recipes for a Successful Cloud Foundry Deployment in ...
Cloud Foundry Cookbook: Recipes for a Successful Cloud Foundry Deployment in ...
 
API Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIsAPI Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIs
 
API Days Paris - Automatic Testing of (RESTful) API Documentation
API Days Paris - Automatic Testing of (RESTful) API DocumentationAPI Days Paris - Automatic Testing of (RESTful) API Documentation
API Days Paris - Automatic Testing of (RESTful) API Documentation
 
Dead Simple APIs with OpenAPI
Dead Simple APIs with OpenAPIDead Simple APIs with OpenAPI
Dead Simple APIs with OpenAPI
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API Platform
 
Amazon API Gateway and AWS Lambda: Better Together
Amazon API Gateway and AWS Lambda: Better TogetherAmazon API Gateway and AWS Lambda: Better Together
Amazon API Gateway and AWS Lambda: Better Together
 
Pyrax talk
Pyrax talkPyrax talk
Pyrax talk
 
Introduction to CloudStack API
Introduction to CloudStack APIIntroduction to CloudStack API
Introduction to CloudStack API
 
Enter the app era with ruby on rails
Enter the app era with ruby on railsEnter the app era with ruby on rails
Enter the app era with ruby on rails
 
API Days Australia - Automatic Testing of (RESTful) API Documentation
API Days Australia  - Automatic Testing of (RESTful) API DocumentationAPI Days Australia  - Automatic Testing of (RESTful) API Documentation
API Days Australia - Automatic Testing of (RESTful) API Documentation
 
ContainerCon 2015 - Be a Microservices Hero
ContainerCon 2015 - Be a Microservices HeroContainerCon 2015 - Be a Microservices Hero
ContainerCon 2015 - Be a Microservices Hero
 
REST with Eve and Python
REST with Eve and PythonREST with Eve and Python
REST with Eve and Python
 
Webinar AWS 201 Delivering apps without servers
Webinar AWS 201 Delivering apps without serversWebinar AWS 201 Delivering apps without servers
Webinar AWS 201 Delivering apps without servers
 
Lies you have been told about REST
Lies you have been told about RESTLies you have been told about REST
Lies you have been told about REST
 
RoR Workshop - Web applications hacking - Ruby on Rails example
RoR Workshop - Web applications hacking - Ruby on Rails exampleRoR Workshop - Web applications hacking - Ruby on Rails example
RoR Workshop - Web applications hacking - Ruby on Rails example
 

Recently uploaded

Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 

Recently uploaded (20)

Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 

KazooCon 2014 - Introduction to Kazoo APIs!

  • 1. PRESENTED BY: Sean & Ricky INTRODUCTION TO KAZOO APIs
  • 4. #kazoocon14 An API as a bolt.
  • 5. #kazoocon14 REST Kazoo APIs are an example of a RESTFul web-service.
  • 6. #kazoocon14 HTTP/HTTPS Kazoo APIs are provided over HTTP/HTTPS
  • 7. #kazoocon14 In most cases Kazoo APIs work just like a website!
  • 8. #kazoocon14 What do the HTTP requests do?
  • 9. #kazoocon14 Resources Resources are just “Things”.
  • 10. #kazoocon14 Collections Collections are just a group of resources of the same type.
  • 11. #kazoocon14 Entities Entities are a single instance of a resource.
  • 12. #kazoocon14 IDs We use IDs to identify entities.
  • 13. #kazoocon14 But how do we tell the server what resources we want to interact with?
  • 14. #kazoocon14 Uniform Resource Identifiers (URIs) http://test.2600hz.com:8000/v1/accounts/C1234/users/U3456
  • 15. #kazoocon14 URI – Uniform Resource Identifier http://test.2600hz.com:8000/v1/accounts/C1234/users/U3456 Base URL = http://test.2600hz.com:8000
  • 16. #kazoocon14 URI – Uniform Resource Identifier http://test.2600hz.com:8000/v1/accounts/C1234/users/U3456 Base URL = http://test.2600hz.com:8000 /v1/
  • 17. #kazoocon14 URI – Uniform Resource Identifier http://test.2600hz.com:8000/v1/accounts/C1234/users/U3456 Base URL = http://test.2600hz.com:8000 /v1/ /v1/accounts/
  • 18. #kazoocon14 URI – Uniform Resource Identifier http://test.2600hz.com:8000/v1/accounts/C1234/users/U3456 Base URL = http://test.2600hz.com:8000 /v1/ /v1/accounts/ /v1/accounts/C1234/
  • 19. #kazoocon14 URI – Uniform Resource Identifier http://test.2600hz.com:8000/v1/accounts/C1234/users/U3456 Base URL = http://test.2600hz.com:8000 /v1/ /v1/accounts/ /v1/accounts/C1234/ /v1/accounts/C1234/users/
  • 20. #kazoocon14 URI – Uniform Resource Identifier http://test.2600hz.com:8000/v1/accounts/C1234/users/U3456 Base URL = http://test.2600hz.com:8000 /v1/ /v1/accounts/ /v1/accounts/C1234/ /v1/accounts/C1234/users/ /v1/accounts/C1234/users/U3456/
  • 21. #kazoocon14 How do we tell the server what to do with the resource we identified?
  • 22. #kazoocon14 HTTP Verbs or Methods GET - /v1/accounts/C1234/users/ PUT - /v1/accounts/C1234/devices/ + data payload POST /v1/accounts/C1234/users/U1112 + data payload DELETE - /v1/accounts/C1234/users/U1112
  • 23. Verbs for interacting with collections #kazoocon14 GET - /v1/accounts/C1234/users/ PUT - /v1/accounts/C1234/users/ + data payload
  • 24. #kazoocon14 Verbs for interacting with entities GET - /v1/accounts/C1234/users/U1112 POST /v1/accounts/C1234/users/U1112 + data payload DELETE /v1/accounts/C1234/users/U1112
  • 25. #kazoocon14 HTTP Response codes 2xx - successful request! 200 - means the request was successful 201 - Entity was created 4xx - you messed up! 401 - unauthorized (check your auth token) 404 - entity or endpoint doesn't exist. 5xx - server messed up! 500 - generic server error
  • 26. #kazoocon14 HTTP headers Headers are used to set parameters used in processing the request. Example: X-Auth-Token: <your auth token> Content-Type: application/json
  • 27. #kazoocon14 What is the payload?
  • 28. #kazoocon14 Payload A payload is the representation of the resource we requested.
  • 29. Kazoo APIs mostly uses the JavaScript Object Notation (JSON) data format for most payloads #kazoocon14 { “key” : “value” }
  • 30. #kazoocon14 Key value pairs “key” : “value”
  • 31. #kazoocon14 Key example: “key” : “value”
  • 32. #kazoocon14 Value examples “key” : “value”
  • 33. #kazoocon14 JSON Data Types: “string_example” : “a string”, “number_example” : 1, “boolean_example” : true, “null_example” : null, “array_example” : [ “a string”, “a number” ], “object_example” : { “some_key” : “some_value”, “other_key” : 1 }
  • 34. #kazoocon14 JSON BASE OBJECT { “key” : “value” }
  • 35. #kazoocon14 Complex nested JSON example: { “level_one_object” : { “level_two_object” : { “level3_key” : “level3_value”, “level3_array” : [ “level4_value” ] }, “level_two_array” : [ “level3_value” ] } }
  • 36. #kazoocon14 In the API, we always have a “data” object which contains the payload. { “data” : { “parameters_for_resource” : “some value” } “metadata_stuff” : … }
  • 37. #kazoocon14 Putting it all together.
  • 43. #kazoocon14 • The URI is a “noun” which Identifies a specific resource. • The HTTP method is a “verb” which defines what type of action we want to take against the resource. • The contents of the payload is a JSON object.
  • 44. #kazoocon14 Ok, let’s play with the Kazoo APIs!!!
  • 45. Tools for exploring Kazoo APIs #kazoocon14 • Kazoo UI, Developer tools • Curl – Command Line Tool • Postman – Browser based. • SDKs (Software Development Kit)
  • 46. Tools for exploring Kazoo APIs #kazoocon14 • Kazoo UI, Developer tools http://kazooui.kazoocon.com • Curl – Command Line Tool • Postman – Browser based. • SDKs (Software Development Kit)
  • 47. #kazoocon14 Authentication Tokens Temporary “Security tokens” used to authenticate clients. How to get one: credentials = an md5 hash of the string username:password echo -n “user:pass” | md5 PUT http://api.sandbox.2600hz.com:8000/v1/user_auth { “data”: { “credentials” : “12345678”, “realm” : “your.realm.com” }} or { “data”: { “credentials” : “12345678”, “account_name” : “account_name”}} PUT http://api.sandbox.2600hz.com:8000/v1/api_auth { “data” : { “api_key” : “YOUR_API_KEY” }} NOTE: you can get API key with GET -/v1/accounts/<Account_ID>/api_key
  • 48. Tools for exploring Kazoo APIs #kazoocon14 • Kazoo UI, Developer tools • Curl – Command Line Tool • Postman – Browser based. • SDKs (Software Development Kit)
  • 49. Tools for exploring Kazoo APIs #kazoocon14 • Kazoo UI, Developer tools • Curl – Command Line Tool • Postman – Browser based. • SDKs (Software Development Kit)
  • 50. Tools for exploring Kazoo APIs #kazoocon14 • Kazoo UI, Developer tools • Curl – Command Line Tool • Postman – Browser based. • SDKs (Software Development Kit)
  • 53. #kazoocon14 PHP SDK example sign-up form.
  • 54. #kazoocon14 Links Github link for PHP SDK: https://github.com/2600hz/kazoo-php-sdk Google Groups: https://groups.google.com/forum/#!forum/2600hz-dev https://groups.google.com/forum/#!forum/2600hz-users Sign-up page: http://userxxx.u.kazoocon.com/sign_up/gobblin/#ajax/sig nup.html

Editor's Notes

  1. Good morning! Welcome to kazoo con! This session we are going to introduce the KAZOO APIs. and show you some easy ways you can explore the APIs 30 seconds
  2. When we talk about APIs, were are talking about an interface provided by a server that is intended for use by applications. This interface provides a predictable and simple method for applications to connect and interact with remote services. Developers can use APIs to leverage external services and add complex functionality to their applications with just a few lines of code.  
  3. An API is like a bolt. You use bolts to build something useful. Your application is like a wrench. A bolt has specific parameters like size and shape that wrenches need to conform to. We provide the standard sizes and shapes of our bolts, You can innovate to build a better wrench as long as you conform to the specification of our bolt.
  4. Kazoo APIs are based on the Rest Architecture. The philosophy behind Kazoo APIs is “what would the web do?”
  5. The protocol which is used to access the API is HTTP/HTTPS. Which means in most cases…
  6. So in this diagram we have a basic client server architecture. The Client of an API is an application. The client sends a request to the server. The server returns a response to the request. The difference between an API and a website is that APIs just return raw data instead of an pretty html page. This request and response dialog is called a transaction.
  7. Requests are just the mechanism for client application to view and interact with specific resource on the server.
  8. Like a device, an account, a phone number, a user. We handle resources in two ways in our API….
  9. The first way is as COLLECTIONS. All accounts, All users under an account…
  10. Individual account, individual user…
  11. Every entity has an ID we can refer to it by.
  12. URIs are just a string which identifies a resource. This string is a “chain” of resources, which combine to determine which specific resource is being referenced. The URI is here to tell the server what THING we want to interact with. So to understand how a URI works, lets break apart this chain and step through it link by link.
  13. The first link in the chain is the base URL. The base URL identifies the location of the server on the internet which provides access to interact with the API.
  14. The next link is the version. V1 just means version 1. This indicates the VERSION of the API we are interacting with.
  15. NEXT IN OUR CHAIN is accounts This is an endpoint. An endpoint is a collection of one the type of resource.
  16. IF WE APPEND AN ID AFTER THE ACCOUNT ENDPOINT WE ARE IDENTIFYING A SPECIFIC ACCOUNT ENTITY.
  17. IF WE ADD USER TO THE CHAIN WE ARE IDENTIFYING a collection of the USERS IN THIS ACCOUNT.
  18. IF we add a USER_ID to the chain we are identifying a specific user on this account.
  19. HTTPs provides methods which determine the types of actions that should be taken against the resource identified in the URI. Rest uses 4 basic verbs in HTTP that are used to determine which specific actions should be taken. Use of verbs is specific to the type of entity being referenced.
  20. GET with the URI of a resource endpoint will get a collection from this endpoint. PUT is used to create a new resource in the collection.
  21. GET - against a URI with a resource ID, will return a full representation of this resource. EG: GET THIS SPECIFIC USER ON THIS ACCOUNT POST is an update VERB which updates the contents of the entity with the data payload included in the request. EG: Update this specific user on this account. DELETE does just what it sounds like it does, it delete the entity.
  22. Responses to these requests from the server contain a response code which tells you the status of the transaction. 2xx is a success response. 4xx is a client side problem (invalid request for example) 5xx means the server encountered an error
  23. HTTP protocol uses headers to describe and define values which determine how the request is formatted. EXAMPLE: You can specify things like the content type which defines the data format of the payload you are sending.
  24. The API abstracts all the resources, so we can retrieve them in an expected format. The actual entity referred to could use any number of ways to store its data, but this will always be delivered by the API in a payload format that is uniform.
  25. Json is an easily readable, widely supported format for storing data in nested structures.
  26. MOST OF THE DATA IN JSON IS REPRESENTED AS KEY VALUE PAIRS
  27. A KEY IS JUST A NAME for the parameter
  28. VALUES CAN BE ANY OF THE AVAILABLE DATA TYPES.
  29. Json lets you encode common datatypes that exist all in mainstream programming languages.
  30. The envelope of a JSON object is contained inside a base object.
  31. You can pretty much represent anything using JSON objects.
  32. Kazoo API payloads will always have a data object which contains the parameters related to a resource. Out side this object we can add some meta data if required by a request/response.
  33. This is an actual GET message. This is submitted with no payload included. You can see a request line which contains the HTTP VERB, a request URI, the HTTP version and a HOST. This request also includes some headers like the X-auth-token and Content-Type
  34. And this is response we get back with the data requested by the get. You can see the 200 OK in the response line indicating successful request. The response headers, and a data payload with the data requested by the Get command.
  35. This is an example of an HTTP put. This type of request includes a payload in JSON format containing the data needed by the server to handle the request. Instead of GET the verb here is PUT, the URI is the user_auth endpoint.
  36. This is the response to the put request. You can see the response code here is 201 which means Put was successful and an auth token was created. The response payload contains the account_id for the auth token as well as the Auth_token returned. So now that have the fundamentals defined…
  37. and if it is a collection or an entity. - The specific VERB you can use is dependent on this URI referencing a resource or a collection.
  38. One of the easiest way to get started, is through the Developers App (must be enabled), here’s how, let’s do a sample query of our own account! From this first example, the URI is :8000/v1/, the re “So we have a few ways to interact with the Apis. The easiest to get started with would be the Developer tools app in Kazoo. This is a Web Based REST client we built for testing and exploring our basic APIs. *OTHER SCREEN, LIVE* Kazoo UI Log into kazoo-ui Turn on Developer App Do simple query of account
  39. One of the easiest way to get started, is through the Developers App (must be enabled), here’s how, let’s do a sample query of our own account! From this first example, the URI is :8000/v1/, the re “So we have a few ways to interact with the Apis. The easiest to get started with would be the Developer tools app in Kazoo. This is a Web Based REST client we built for testing and exploring our basic APIs. *OTHER SCREEN, LIVE* Kazoo UI Log into kazoo-ui Turn on Developer App Do simple query of account
  40. One of the easiest way to get started, is through the Developers App (must be enabled), here’s how, let’s do a sample query of our own account! From this first example, the URI is :8000/v1/, the re “So we have a few ways to interact with the Apis. The easiest to get started with would be the Developer tools app in Kazoo. This is a Web Based REST client we built for testing and exploring our basic APIs. *OTHER SCREEN, LIVE* Kazoo UI Log into kazoo-ui Turn on Developer App Do simple query of account
  41. One of the easiest way to get started, is through the Developers App (must be enabled), here’s how, let’s do a sample query of our own account! From this first example, the URI is :8000/v1/, the re “So we have a few ways to interact with the Apis. The easiest to get started with would be the Developer tools app in Kazoo. This is a Web Based REST client we built for testing and exploring our basic APIs. *OTHER SCREEN, LIVE* Kazoo UI Log into kazoo-ui Turn on Developer App Do simple query of account