SlideShare uma empresa Scribd logo
1 de 17
Baixar para ler offline
REST	
  APIs	
  	
  
for	
  the	
  	
  
Internet	
  Of	
  Things	
  
Michael	
  J	
  Koster	
  
Open	
  Source	
  Internet	
  Of	
  Things	
  
Meetup	
  19	
  March	
  2014	
  
Resource	
  oriented	
  API	
  
•  Resource	
  ==	
  web	
  resource	
  (URI)	
  
•  Resources	
  change	
  state	
  in	
  response	
  to	
  what	
  is	
  
being	
  sensed	
  
•  Actuator	
  changes	
  state	
  in	
  response	
  to	
  web	
  
resource	
  update	
  
•  Abstract	
  data	
  sources	
  and	
  sinks	
  
•  REST	
  API	
  has	
  2	
  important	
  characterisJcs	
  for	
  
IoT	
  use	
  case…	
  
RepresentaJonal	
  State	
  Transfer	
  
•  Resource	
  interacJon	
  through	
  exchange	
  of	
  
representaJon	
  of	
  resource	
  state	
  
•  E.g.	
  a	
  representaJon	
  of	
  the	
  state	
  of	
  a	
  
temperature	
  sensor	
  might	
  be	
  “63.6”	
  	
  
•  Convenient	
  for	
  applicaJon	
  soTware	
  to	
  use	
  
read/write	
  semanJcs	
  to	
  interact	
  with	
  
resources	
  
•  Stateful	
  resource	
  representaJons	
  =>	
  Stateless	
  
applicaJon	
  soTware	
  
Based	
  on	
  Hypermedia	
  
•  Use	
  of	
  web	
  links	
  to	
  locate	
  resources	
  of	
  
interest	
  
•  IoT	
  needs	
  machine-­‐readable	
  links	
  that	
  enable	
  
applicaJon	
  soTware	
  to	
  discover	
  things	
  of	
  
interest	
  
•  Subset	
  of	
  web	
  linking,	
  semanJc	
  web	
  using	
  
relaJon/aribute	
  
•  Links	
  encode	
  metadata	
  about	
  the	
  resource,	
  
e.g.	
  type=‘temperature’,	
  ct=‘applicaJon/json’	
  
Web	
  Linking	
  for	
  IoT	
  
•  Links	
  are	
  managed	
  in	
  2	
  ways	
  
•  Object	
  encapsulaJon:	
  self-­‐describing	
  objects	
  
have	
  links	
  associated	
  with	
  endpoint,	
  e.g.	
  ./
well-­‐known/core	
  
•  Resource	
  Directory:	
  Directories	
  and	
  Catalogs	
  
of	
  links,	
  stored	
  at	
  well-­‐known	
  locaJons,	
  that	
  
point	
  to	
  resources	
  and	
  to	
  other	
  catalogs	
  
Web	
  Linking	
  for	
  IoT	
  
•  Links	
  can	
  be	
  registered	
  with	
  a	
  Resource	
  Directory	
  
when	
  sensors	
  are	
  brought	
  online	
  
•  A	
  crawler	
  can	
  discover	
  links	
  at	
  ./well-­‐known/core	
  
locaJons	
  and	
  populate	
  catalogs	
  
•  ApplicaJon	
  soTware	
  can	
  discover	
  resources	
  by	
  
aribute,	
  e.g.	
  query	
  using	
  type=‘temperature’,	
  
units=‘celsius’,	
  locaJon=‘outdoor’	
  etc.	
  	
  
•  System	
  returns	
  a	
  set	
  of	
  links	
  matching	
  the	
  query	
  
aributes	
  
CoAP	
  
•  Part	
  of	
  IPV6	
  for	
  Constrained	
  Resource	
  
Environments	
  (CoRE)	
  
•  IoT	
  oriented	
  REST	
  API	
  mapped	
  to	
  an	
  efficient	
  
binary	
  protocol	
  
•  End	
  devices	
  can	
  have	
  both	
  client	
  and	
  server	
  
roles,	
  can	
  also	
  communicate	
  directly	
  
•  Resource	
  representaJon	
  e.g.	
  ‘applicaJon/
json’,	
  is	
  negoJated	
  as	
  in	
  hp	
  protocol	
  
CoAP	
  
•  Observe	
  opJon	
  for	
  long-­‐term	
  event	
  stream	
  
response	
  to	
  GET,	
  asynchronous	
  updates	
  
•  Web	
  linking	
  using	
  IETF	
  standard	
  core-­‐link-­‐
format	
  (RFC	
  6690)	
  
•  Resource	
  discovery	
  using	
  ./well-­‐known/core	
  
or	
  external	
  Resource	
  Directory	
  
	
  
HTTP/REST	
  
•  HTTP	
  and	
  REST	
  is	
  useful	
  for	
  most	
  web	
  
applicaJons,	
  services,	
  and	
  gateways	
  
•  Uses	
  web	
  callbacks,	
  websockets,	
  HTTP	
  PUT	
  for	
  
asynchronous	
  updates	
  
•  Links	
  in	
  JSON,	
  Link-­‐format,	
  Hypercat,	
  linked	
  
data	
  
•  Well	
  defined	
  CoAP-­‐to-­‐HTTP	
  proxy	
  paerns,	
  
standard	
  middleware	
  
Hybrid	
  system	
  
•  It’s	
  possible	
  to	
  use	
  REST	
  for	
  resource	
  discovery	
  
and	
  other	
  stateful	
  interacJons,	
  and	
  messaging	
  
e.g.	
  MQTT	
  for	
  asynchronous	
  updates	
  
•  Various	
  methods	
  to	
  bind	
  message	
  endpoints	
  
to	
  REST	
  resources	
  
•  ApplicaJon	
  soTware	
  can	
  easily	
  use	
  both	
  REST	
  
API	
  and	
  event	
  handler	
  interfaces	
  like	
  
onUpdate	
  
•  IoT	
  Toolkit	
  uses	
  observers	
  to	
  bind	
  	
  
Standards	
  and	
  SoTware	
  
•  CoAP	
  	
  
hps://datatracker.iel.org/doc/draT-­‐iel-­‐core-­‐coap/	
  
•  CoRE	
  link-­‐format	
  
hp://tools.iel.org/html/rfc6690	
  
•  CoRE	
  Observe	
  
hps://datatracker.iel.org/doc/draT-­‐iel-­‐core-­‐observe/	
  
•  CoRE	
  Resource	
  Directory	
  
hps://tools.iel.org/html/draT-­‐iel-­‐core-­‐resource-­‐directory-­‐00	
  
•  Hypercat	
  
hp://wiki.1248.io/doku.php?id=hypercat	
  
IoT	
  Toolkit	
  Interoperability	
  Demo	
  
smartobjectservice.com	
  
Node-­‐RED	
  
Node-­‐RED	
  
MQTT	
  Observer	
  
MQTT	
  Broker	
  
REST	
  Endpoint	
  
ObservableProperty	
  
mqObserver	
  
PUT	
   GET	
  
Publish	
  from	
  
data	
  producer	
  
Publish	
  From	
  
REST	
  API	
  
Publish	
  to	
  Other	
  
Subscribers	
  
SUB	
  
Publish	
  to	
  
REST	
  API	
  	
  
Connects	
  REST	
  Resource	
  to	
  MQTT	
  Topic	
  
Publish	
  and	
  Subscribe	
  
MQTT	
  Observer	
  
MQTT	
  Broker	
  
REST	
  Endpoint	
  
ObservableProperty	
  
mqObserver	
  
PUT	
   GET	
  
Publish	
  from	
  
data	
  producer	
  
Publish	
  From	
  
REST	
  API	
  
Publish	
  to	
  Other	
  
Subscribers	
  
SUB	
  
Publish	
  to	
  
REST	
  API	
  	
  
Publisher	
  	
  
Publishes	
  REST	
  Resource	
  updates	
  to	
  the	
  broker	
  
MQTT	
  Observer	
  
MQTT	
  Broker	
  
REST	
  Endpoint	
  
ObservableProperty	
  
mqObserver	
  
PUT	
   GET	
  
Publish	
  from	
  
data	
  producer	
  
Publish	
  From	
  
REST	
  API	
  
Publish	
  to	
  Other	
  
Subscribers	
  
SUB	
  
Publish	
  to	
  
REST	
  API	
  	
  
Subscriber	
  	
  
Makes	
  last	
  published	
  data	
  available	
  at	
  the	
  REST	
  endpoint	
  
MQTT	
  Observer	
  
MQTT	
  Broker	
  
REST	
  Endpoint	
  
ObservableProperty	
  
mqObserver	
  
PUT	
   GET	
  
Publish	
  from	
  
data	
  producer	
  
Publish	
  From	
  
REST	
  API	
  
Publish	
  to	
  Other	
  
Subscribers	
  
SUB	
  
Publish	
  to	
  
REST	
  API	
  	
  
Pub+Sub	
  
Repeats	
  data	
  updates	
  in	
  both	
  direcJons	
  
MQTT	
  Bridge	
  to	
  mulJple	
  REST	
  endpoints	
  	
  
MQTT	
  Broker	
  
REST	
  Endpoint	
  
ObservableProperty	
  
mqObserver	
  
PUT	
   GET	
  
Publish	
  from	
  
data	
  producer	
  
Publish	
  to	
  Other	
  
Subscribers	
  
REST	
  Endpoint	
  
ObservableProperty	
  
mqObserver	
  
PUT	
   GET	
  

Mais conteúdo relacionado

Mais procurados

What is REST API? REST API Concepts and Examples | Edureka
What is REST API? REST API Concepts and Examples | EdurekaWhat is REST API? REST API Concepts and Examples | Edureka
What is REST API? REST API Concepts and Examples | EdurekaEdureka!
 
API Testing with Frisby and Mocha
API Testing with Frisby and MochaAPI Testing with Frisby and Mocha
API Testing with Frisby and MochaLyudmila Anisimova
 
IoT Toolkit and the Smart Object API Tutorial Introduction
IoT Toolkit and the Smart Object API Tutorial IntroductionIoT Toolkit and the Smart Object API Tutorial Introduction
IoT Toolkit and the Smart Object API Tutorial IntroductionMichael Koster
 
Real Life Clean Architecture
Real Life Clean ArchitectureReal Life Clean Architecture
Real Life Clean ArchitectureMattia Battiston
 
Spring boot
Spring bootSpring boot
Spring bootsdeeg
 
REST APIs with Spring
REST APIs with SpringREST APIs with Spring
REST APIs with SpringJoshua Long
 
What is Dependency Injection in Spring Boot | Edureka
What is Dependency Injection in Spring Boot | EdurekaWhat is Dependency Injection in Spring Boot | Edureka
What is Dependency Injection in Spring Boot | EdurekaEdureka!
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring FrameworkHùng Nguyễn Huy
 
Principles of REST API Design
Principles of REST API DesignPrinciples of REST API Design
Principles of REST API DesignTwo Sigma
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework Serhat Can
 
FIWARE Wednesday Webinars - Integrating FIWARE with Blockchain/DLTs
FIWARE Wednesday Webinars - Integrating FIWARE with Blockchain/DLTsFIWARE Wednesday Webinars - Integrating FIWARE with Blockchain/DLTs
FIWARE Wednesday Webinars - Integrating FIWARE with Blockchain/DLTsFIWARE
 
Spring boot introduction
Spring boot introductionSpring boot introduction
Spring boot introductionRasheed Waraich
 

Mais procurados (20)

What is REST API? REST API Concepts and Examples | Edureka
What is REST API? REST API Concepts and Examples | EdurekaWhat is REST API? REST API Concepts and Examples | Edureka
What is REST API? REST API Concepts and Examples | Edureka
 
API Testing with Frisby and Mocha
API Testing with Frisby and MochaAPI Testing with Frisby and Mocha
API Testing with Frisby and Mocha
 
IoT Toolkit and the Smart Object API Tutorial Introduction
IoT Toolkit and the Smart Object API Tutorial IntroductionIoT Toolkit and the Smart Object API Tutorial Introduction
IoT Toolkit and the Smart Object API Tutorial Introduction
 
Real Life Clean Architecture
Real Life Clean ArchitectureReal Life Clean Architecture
Real Life Clean Architecture
 
REST API
REST APIREST API
REST API
 
Spring boot
Spring bootSpring boot
Spring boot
 
EJB .
EJB .EJB .
EJB .
 
Spring Data JPA
Spring Data JPASpring Data JPA
Spring Data JPA
 
REST APIs with Spring
REST APIs with SpringREST APIs with Spring
REST APIs with Spring
 
What is Dependency Injection in Spring Boot | Edureka
What is Dependency Injection in Spring Boot | EdurekaWhat is Dependency Injection in Spring Boot | Edureka
What is Dependency Injection in Spring Boot | Edureka
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
RESTful Web API
RESTful Web APIRESTful Web API
RESTful Web API
 
React JS
React JSReact JS
React JS
 
What is an API?
What is an API?What is an API?
What is an API?
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
Principles of REST API Design
Principles of REST API DesignPrinciples of REST API Design
Principles of REST API Design
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
FIWARE Wednesday Webinars - Integrating FIWARE with Blockchain/DLTs
FIWARE Wednesday Webinars - Integrating FIWARE with Blockchain/DLTsFIWARE Wednesday Webinars - Integrating FIWARE with Blockchain/DLTs
FIWARE Wednesday Webinars - Integrating FIWARE with Blockchain/DLTs
 
Spring boot introduction
Spring boot introductionSpring boot introduction
Spring boot introduction
 
Servlets
ServletsServlets
Servlets
 

Destaque

MQTT - REST Bridge using the Smart Object API
MQTT - REST Bridge using the Smart Object APIMQTT - REST Bridge using the Smart Object API
MQTT - REST Bridge using the Smart Object APIMichael Koster
 
Ietf91 ad hoc-coap-lwm2m-ipso
Ietf91 ad hoc-coap-lwm2m-ipsoIetf91 ad hoc-coap-lwm2m-ipso
Ietf91 ad hoc-coap-lwm2m-ipsoMichael Koster
 
A Modular Open Source Platform for Web Scale IoT Interoperability
A Modular Open Source Platform for Web Scale IoT InteroperabilityA Modular Open Source Platform for Web Scale IoT Interoperability
A Modular Open Source Platform for Web Scale IoT InteroperabilityMichael Koster
 
Hypermedia System Architecture for a Web of Things
Hypermedia System Architecture for a Web of ThingsHypermedia System Architecture for a Web of Things
Hypermedia System Architecture for a Web of ThingsMichael Koster
 
Personal Agency on the IoT
Personal Agency on the IoTPersonal Agency on the IoT
Personal Agency on the IoTMichael Koster
 
Open Horizontal Platform - Web Scale Interoperability for IoT - CCNA 2013
Open Horizontal Platform - Web Scale Interoperability for IoT - CCNA 2013Open Horizontal Platform - Web Scale Interoperability for IoT - CCNA 2013
Open Horizontal Platform - Web Scale Interoperability for IoT - CCNA 2013Michael Koster
 
Research Topics in Machine Hypermedia
Research Topics in Machine HypermediaResearch Topics in Machine Hypermedia
Research Topics in Machine HypermediaMichael Koster
 
MQTT-REST Bridge using the Smart Object API
MQTT-REST Bridge using the Smart Object APIMQTT-REST Bridge using the Smart Object API
MQTT-REST Bridge using the Smart Object APIMichael Koster
 
Tools for the Open Source Internet Of Things
Tools for the Open Source Internet Of ThingsTools for the Open Source Internet Of Things
Tools for the Open Source Internet Of ThingsMichael Koster
 
Restful Asynchronous Notification
Restful Asynchronous NotificationRestful Asynchronous Notification
Restful Asynchronous NotificationMichael Koster
 
IoT Toolkit and the Smart Object API - Architecture for Interoperability
IoT Toolkit and the Smart Object API - Architecture for InteroperabilityIoT Toolkit and the Smart Object API - Architecture for Interoperability
IoT Toolkit and the Smart Object API - Architecture for InteroperabilityMichael Koster
 
IoT Toolkit and Smart Object API Tutorial Introduction
IoT Toolkit and Smart Object API Tutorial IntroductionIoT Toolkit and Smart Object API Tutorial Introduction
IoT Toolkit and Smart Object API Tutorial IntroductionMichael Koster
 
Open Standards for IoT- GSC Workshop on IoT Atlanta 2013
Open Standards for IoT- GSC Workshop on IoT Atlanta 2013Open Standards for IoT- GSC Workshop on IoT Atlanta 2013
Open Standards for IoT- GSC Workshop on IoT Atlanta 2013Michael Koster
 
The Network Effect - Open Source and the Internet Of Things - Helsinki 2013 K...
The Network Effect - Open Source and the Internet Of Things - Helsinki 2013 K...The Network Effect - Open Source and the Internet Of Things - Helsinki 2013 K...
The Network Effect - Open Source and the Internet Of Things - Helsinki 2013 K...Michael Koster
 
Ietf91 ad hoc-coap-lwm2m-ipso
Ietf91 ad hoc-coap-lwm2m-ipsoIetf91 ad hoc-coap-lwm2m-ipso
Ietf91 ad hoc-coap-lwm2m-ipsoMichael Koster
 
M2M Protocol Interoperability using IoT Toolkit
M2M Protocol Interoperability using IoT ToolkitM2M Protocol Interoperability using IoT Toolkit
M2M Protocol Interoperability using IoT ToolkitMichael Koster
 

Destaque (18)

MQTT - REST Bridge using the Smart Object API
MQTT - REST Bridge using the Smart Object APIMQTT - REST Bridge using the Smart Object API
MQTT - REST Bridge using the Smart Object API
 
Ietf91 ad hoc-coap-lwm2m-ipso
Ietf91 ad hoc-coap-lwm2m-ipsoIetf91 ad hoc-coap-lwm2m-ipso
Ietf91 ad hoc-coap-lwm2m-ipso
 
A Modular Open Source Platform for Web Scale IoT Interoperability
A Modular Open Source Platform for Web Scale IoT InteroperabilityA Modular Open Source Platform for Web Scale IoT Interoperability
A Modular Open Source Platform for Web Scale IoT Interoperability
 
Hypermedia System Architecture for a Web of Things
Hypermedia System Architecture for a Web of ThingsHypermedia System Architecture for a Web of Things
Hypermedia System Architecture for a Web of Things
 
Personal Agency on the IoT
Personal Agency on the IoTPersonal Agency on the IoT
Personal Agency on the IoT
 
Open Horizontal Platform - Web Scale Interoperability for IoT - CCNA 2013
Open Horizontal Platform - Web Scale Interoperability for IoT - CCNA 2013Open Horizontal Platform - Web Scale Interoperability for IoT - CCNA 2013
Open Horizontal Platform - Web Scale Interoperability for IoT - CCNA 2013
 
Research Topics in Machine Hypermedia
Research Topics in Machine HypermediaResearch Topics in Machine Hypermedia
Research Topics in Machine Hypermedia
 
MQTT-REST Bridge using the Smart Object API
MQTT-REST Bridge using the Smart Object APIMQTT-REST Bridge using the Smart Object API
MQTT-REST Bridge using the Smart Object API
 
Tools for the Open Source Internet Of Things
Tools for the Open Source Internet Of ThingsTools for the Open Source Internet Of Things
Tools for the Open Source Internet Of Things
 
Restful Asynchronous Notification
Restful Asynchronous NotificationRestful Asynchronous Notification
Restful Asynchronous Notification
 
IoT Toolkit and the Smart Object API - Architecture for Interoperability
IoT Toolkit and the Smart Object API - Architecture for InteroperabilityIoT Toolkit and the Smart Object API - Architecture for Interoperability
IoT Toolkit and the Smart Object API - Architecture for Interoperability
 
IoT Toolkit and Smart Object API Tutorial Introduction
IoT Toolkit and Smart Object API Tutorial IntroductionIoT Toolkit and Smart Object API Tutorial Introduction
IoT Toolkit and Smart Object API Tutorial Introduction
 
Design patternsforiot
Design patternsforiotDesign patternsforiot
Design patternsforiot
 
Open Standards for IoT- GSC Workshop on IoT Atlanta 2013
Open Standards for IoT- GSC Workshop on IoT Atlanta 2013Open Standards for IoT- GSC Workshop on IoT Atlanta 2013
Open Standards for IoT- GSC Workshop on IoT Atlanta 2013
 
RESTful Notification
RESTful NotificationRESTful Notification
RESTful Notification
 
The Network Effect - Open Source and the Internet Of Things - Helsinki 2013 K...
The Network Effect - Open Source and the Internet Of Things - Helsinki 2013 K...The Network Effect - Open Source and the Internet Of Things - Helsinki 2013 K...
The Network Effect - Open Source and the Internet Of Things - Helsinki 2013 K...
 
Ietf91 ad hoc-coap-lwm2m-ipso
Ietf91 ad hoc-coap-lwm2m-ipsoIetf91 ad hoc-coap-lwm2m-ipso
Ietf91 ad hoc-coap-lwm2m-ipso
 
M2M Protocol Interoperability using IoT Toolkit
M2M Protocol Interoperability using IoT ToolkitM2M Protocol Interoperability using IoT Toolkit
M2M Protocol Interoperability using IoT Toolkit
 

Semelhante a REST APIs for Connecting IoT Devices and Web Apps

Hypermedia for Machine APIs
Hypermedia for Machine APIsHypermedia for Machine APIs
Hypermedia for Machine APIsMichael Koster
 
Web of Things to the edge
Web of Things to the edgeWeb of Things to the edge
Web of Things to the edgeMichael Koster
 
Arabidopsis Information Portal, Developer Workshop 2014, Introduction
Arabidopsis Information Portal, Developer Workshop 2014, IntroductionArabidopsis Information Portal, Developer Workshop 2014, Introduction
Arabidopsis Information Portal, Developer Workshop 2014, IntroductionJasonRafeMiller
 
IP based standards for IoT
IP based standards for IoTIP based standards for IoT
IP based standards for IoTMichael Koster
 
RESTful Web Service using Swagger
RESTful Web Service using SwaggerRESTful Web Service using Swagger
RESTful Web Service using SwaggerHong-Jhih Lin
 
Object models for interoperability
Object models for interoperabilityObject models for interoperability
Object models for interoperabilityMichael Koster
 
M2M Protocol Interoperability using IoT Toolkit
M2M Protocol Interoperability using IoT ToolkitM2M Protocol Interoperability using IoT Toolkit
M2M Protocol Interoperability using IoT ToolkitMichael Koster
 
(ATS6-PLAT04) Query service
(ATS6-PLAT04) Query service (ATS6-PLAT04) Query service
(ATS6-PLAT04) Query service BIOVIA
 
Arabidopsis Information Portal overview from Plant Biology Europe 2014
Arabidopsis Information Portal overview from Plant Biology Europe 2014Arabidopsis Information Portal overview from Plant Biology Europe 2014
Arabidopsis Information Portal overview from Plant Biology Europe 2014Matthew Vaughn
 
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiTiago Knoch
 
web connectivity in IoT
web connectivity in IoTweb connectivity in IoT
web connectivity in IoTFabMinds
 
Web of things introduction
Web of things introductionWeb of things introduction
Web of things introduction承翰 蔡
 
Resting on your laurels will get you powned
Resting on your laurels will get you pownedResting on your laurels will get you powned
Resting on your laurels will get you pownedDinis Cruz
 
Together Cheerfully to Walk with Hypermedia
Together Cheerfully to Walk with HypermediaTogether Cheerfully to Walk with Hypermedia
Together Cheerfully to Walk with HypermediaVladimir Tsukur
 
IoT Toolkit and the Smart Object API - Architecture for Interoperability
IoT Toolkit and the Smart Object API - Architecture for InteroperabilityIoT Toolkit and the Smart Object API - Architecture for Interoperability
IoT Toolkit and the Smart Object API - Architecture for InteroperabilityMichael Koster
 
Iot Toolkit and the Smart Object API - Architecture for Interoperability
Iot Toolkit and the Smart Object API - Architecture for InteroperabilityIot Toolkit and the Smart Object API - Architecture for Interoperability
Iot Toolkit and the Smart Object API - Architecture for InteroperabilityMichael Koster
 
Ladies Be Architects - Integration - Multi-Org, Security, JSON, Backup & Restore
Ladies Be Architects - Integration - Multi-Org, Security, JSON, Backup & RestoreLadies Be Architects - Integration - Multi-Org, Security, JSON, Backup & Restore
Ladies Be Architects - Integration - Multi-Org, Security, JSON, Backup & Restoregemziebeth
 

Semelhante a REST APIs for Connecting IoT Devices and Web Apps (20)

Hypermedia for Machine APIs
Hypermedia for Machine APIsHypermedia for Machine APIs
Hypermedia for Machine APIs
 
Web of Things to the edge
Web of Things to the edgeWeb of Things to the edge
Web of Things to the edge
 
Ipso eclipse-summary
Ipso eclipse-summaryIpso eclipse-summary
Ipso eclipse-summary
 
Arabidopsis Information Portal, Developer Workshop 2014, Introduction
Arabidopsis Information Portal, Developer Workshop 2014, IntroductionArabidopsis Information Portal, Developer Workshop 2014, Introduction
Arabidopsis Information Portal, Developer Workshop 2014, Introduction
 
IP based standards for IoT
IP based standards for IoTIP based standards for IoT
IP based standards for IoT
 
RESTful Web Service using Swagger
RESTful Web Service using SwaggerRESTful Web Service using Swagger
RESTful Web Service using Swagger
 
Object models for interoperability
Object models for interoperabilityObject models for interoperability
Object models for interoperability
 
M2M Protocol Interoperability using IoT Toolkit
M2M Protocol Interoperability using IoT ToolkitM2M Protocol Interoperability using IoT Toolkit
M2M Protocol Interoperability using IoT Toolkit
 
(ATS6-PLAT04) Query service
(ATS6-PLAT04) Query service (ATS6-PLAT04) Query service
(ATS6-PLAT04) Query service
 
Arabidopsis Information Portal overview from Plant Biology Europe 2014
Arabidopsis Information Portal overview from Plant Biology Europe 2014Arabidopsis Information Portal overview from Plant Biology Europe 2014
Arabidopsis Information Portal overview from Plant Biology Europe 2014
 
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiASP.NET Mvc 4 web api
ASP.NET Mvc 4 web api
 
web connectivity in IoT
web connectivity in IoTweb connectivity in IoT
web connectivity in IoT
 
Web of things introduction
Web of things introductionWeb of things introduction
Web of things introduction
 
Resting on your laurels will get you powned
Resting on your laurels will get you pownedResting on your laurels will get you powned
Resting on your laurels will get you powned
 
Together Cheerfully to Walk with Hypermedia
Together Cheerfully to Walk with HypermediaTogether Cheerfully to Walk with Hypermedia
Together Cheerfully to Walk with Hypermedia
 
IoT Toolkit and the Smart Object API - Architecture for Interoperability
IoT Toolkit and the Smart Object API - Architecture for InteroperabilityIoT Toolkit and the Smart Object API - Architecture for Interoperability
IoT Toolkit and the Smart Object API - Architecture for Interoperability
 
Iot Toolkit and the Smart Object API - Architecture for Interoperability
Iot Toolkit and the Smart Object API - Architecture for InteroperabilityIot Toolkit and the Smart Object API - Architecture for Interoperability
Iot Toolkit and the Smart Object API - Architecture for Interoperability
 
APITalkMeetupSharable
APITalkMeetupSharableAPITalkMeetupSharable
APITalkMeetupSharable
 
Ladies Be Architects - Integration - Multi-Org, Security, JSON, Backup & Restore
Ladies Be Architects - Integration - Multi-Org, Security, JSON, Backup & RestoreLadies Be Architects - Integration - Multi-Org, Security, JSON, Backup & Restore
Ladies Be Architects - Integration - Multi-Org, Security, JSON, Backup & Restore
 
Coinage
CoinageCoinage
Coinage
 

Último

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 

Último (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

REST APIs for Connecting IoT Devices and Web Apps

  • 1. REST  APIs     for  the     Internet  Of  Things   Michael  J  Koster   Open  Source  Internet  Of  Things   Meetup  19  March  2014  
  • 2. Resource  oriented  API   •  Resource  ==  web  resource  (URI)   •  Resources  change  state  in  response  to  what  is   being  sensed   •  Actuator  changes  state  in  response  to  web   resource  update   •  Abstract  data  sources  and  sinks   •  REST  API  has  2  important  characterisJcs  for   IoT  use  case…  
  • 3. RepresentaJonal  State  Transfer   •  Resource  interacJon  through  exchange  of   representaJon  of  resource  state   •  E.g.  a  representaJon  of  the  state  of  a   temperature  sensor  might  be  “63.6”     •  Convenient  for  applicaJon  soTware  to  use   read/write  semanJcs  to  interact  with   resources   •  Stateful  resource  representaJons  =>  Stateless   applicaJon  soTware  
  • 4. Based  on  Hypermedia   •  Use  of  web  links  to  locate  resources  of   interest   •  IoT  needs  machine-­‐readable  links  that  enable   applicaJon  soTware  to  discover  things  of   interest   •  Subset  of  web  linking,  semanJc  web  using   relaJon/aribute   •  Links  encode  metadata  about  the  resource,   e.g.  type=‘temperature’,  ct=‘applicaJon/json’  
  • 5. Web  Linking  for  IoT   •  Links  are  managed  in  2  ways   •  Object  encapsulaJon:  self-­‐describing  objects   have  links  associated  with  endpoint,  e.g.  ./ well-­‐known/core   •  Resource  Directory:  Directories  and  Catalogs   of  links,  stored  at  well-­‐known  locaJons,  that   point  to  resources  and  to  other  catalogs  
  • 6. Web  Linking  for  IoT   •  Links  can  be  registered  with  a  Resource  Directory   when  sensors  are  brought  online   •  A  crawler  can  discover  links  at  ./well-­‐known/core   locaJons  and  populate  catalogs   •  ApplicaJon  soTware  can  discover  resources  by   aribute,  e.g.  query  using  type=‘temperature’,   units=‘celsius’,  locaJon=‘outdoor’  etc.     •  System  returns  a  set  of  links  matching  the  query   aributes  
  • 7. CoAP   •  Part  of  IPV6  for  Constrained  Resource   Environments  (CoRE)   •  IoT  oriented  REST  API  mapped  to  an  efficient   binary  protocol   •  End  devices  can  have  both  client  and  server   roles,  can  also  communicate  directly   •  Resource  representaJon  e.g.  ‘applicaJon/ json’,  is  negoJated  as  in  hp  protocol  
  • 8. CoAP   •  Observe  opJon  for  long-­‐term  event  stream   response  to  GET,  asynchronous  updates   •  Web  linking  using  IETF  standard  core-­‐link-­‐ format  (RFC  6690)   •  Resource  discovery  using  ./well-­‐known/core   or  external  Resource  Directory    
  • 9. HTTP/REST   •  HTTP  and  REST  is  useful  for  most  web   applicaJons,  services,  and  gateways   •  Uses  web  callbacks,  websockets,  HTTP  PUT  for   asynchronous  updates   •  Links  in  JSON,  Link-­‐format,  Hypercat,  linked   data   •  Well  defined  CoAP-­‐to-­‐HTTP  proxy  paerns,   standard  middleware  
  • 10. Hybrid  system   •  It’s  possible  to  use  REST  for  resource  discovery   and  other  stateful  interacJons,  and  messaging   e.g.  MQTT  for  asynchronous  updates   •  Various  methods  to  bind  message  endpoints   to  REST  resources   •  ApplicaJon  soTware  can  easily  use  both  REST   API  and  event  handler  interfaces  like   onUpdate   •  IoT  Toolkit  uses  observers  to  bind    
  • 11. Standards  and  SoTware   •  CoAP     hps://datatracker.iel.org/doc/draT-­‐iel-­‐core-­‐coap/   •  CoRE  link-­‐format   hp://tools.iel.org/html/rfc6690   •  CoRE  Observe   hps://datatracker.iel.org/doc/draT-­‐iel-­‐core-­‐observe/   •  CoRE  Resource  Directory   hps://tools.iel.org/html/draT-­‐iel-­‐core-­‐resource-­‐directory-­‐00   •  Hypercat   hp://wiki.1248.io/doku.php?id=hypercat  
  • 12. IoT  Toolkit  Interoperability  Demo   smartobjectservice.com   Node-­‐RED   Node-­‐RED  
  • 13. MQTT  Observer   MQTT  Broker   REST  Endpoint   ObservableProperty   mqObserver   PUT   GET   Publish  from   data  producer   Publish  From   REST  API   Publish  to  Other   Subscribers   SUB   Publish  to   REST  API     Connects  REST  Resource  to  MQTT  Topic   Publish  and  Subscribe  
  • 14. MQTT  Observer   MQTT  Broker   REST  Endpoint   ObservableProperty   mqObserver   PUT   GET   Publish  from   data  producer   Publish  From   REST  API   Publish  to  Other   Subscribers   SUB   Publish  to   REST  API     Publisher     Publishes  REST  Resource  updates  to  the  broker  
  • 15. MQTT  Observer   MQTT  Broker   REST  Endpoint   ObservableProperty   mqObserver   PUT   GET   Publish  from   data  producer   Publish  From   REST  API   Publish  to  Other   Subscribers   SUB   Publish  to   REST  API     Subscriber     Makes  last  published  data  available  at  the  REST  endpoint  
  • 16. MQTT  Observer   MQTT  Broker   REST  Endpoint   ObservableProperty   mqObserver   PUT   GET   Publish  from   data  producer   Publish  From   REST  API   Publish  to  Other   Subscribers   SUB   Publish  to   REST  API     Pub+Sub   Repeats  data  updates  in  both  direcJons  
  • 17. MQTT  Bridge  to  mulJple  REST  endpoints     MQTT  Broker   REST  Endpoint   ObservableProperty   mqObserver   PUT   GET   Publish  from   data  producer   Publish  to  Other   Subscribers   REST  Endpoint   ObservableProperty   mqObserver   PUT   GET