SlideShare a Scribd company logo
1 of 34
Download to read offline
OGC SensorThings API
Tutorial #3 - RESTful Pattern for IoT API
0.23 litre/minute
0.25 litre/minute
0.27 litre/minuteRH: 85 %
Temp: 18 Celsius
Dr. Steve Liang
Chair, OGC SensorThings API Standard Working Group
Founder and CEO, SensorUp Inc.
Associate Professor, University of Calgary
sensorup.com@sensorup
Agenda
• Recap: OGC SensorThings Data Model
• IoT API RESTful Pattern
• Many Examples
sensorup.com@sensorup
About Dr. Steve Liang
• Associate Professor, Geomatics Engineering, Uni. Calgary
• AITF-Microsoft Industry Chair on Open Sensor Web
• Chair OGC SensorThings API Standard Working Group
• Co-Chair OGC Sensor Web Enablement Domain Working Group
• N.A. Chair, OGC University Domain Working Group
• Rapporteur, ITU-T SG12/11 on Internet of Things Test Specifications
• Founder and CEO, SensorUp Inc, a University of Calgary startup
(http://www.sensorup.com)
sensorup.com@sensorup
About SensorUp
• We are a world leader in OGC Sensor Web and IoT
• We are leading several international IoT standard
development efforts (OGC and ITU-T)
• We developed world’s first OGC SensorThings API
implementation
5
Data Model
Prerequisites
• Basic knowledge of REST (REpresentational State Transfer)
• https://en.wikipedia.org/wiki/Representational_state_transfer
• Basic knowledge of JSON (JavaScript Object Notation)
• http://www.json.org/
Before We Start
• It’s all about LINKS!
• great discoverability
• great for dynamic use cases
• efficient and great developer experiences
• big data analytics friendly
• Uniform and Consistent Pattern
SensorThings Entities
Common Control Information
8
Annotation Definition Data type Multiplicity
@iot.id system generated identifier Any 1
@iot.selfLink absolute URL of an entity URL 1
@iot.navigationLink link leading to related entities URL 1…*
Common Control Information
9
IoT API URL Patterns
based on SensorThings
10
URI
version
11
#1 Root URL
12
#2 Address to an entity set
13
one of the eight
entities, e.g.,
Things,
Datastreams
#3 Address to an individual entity
14
#4 Address to a property of an entity
15
#5 Address to the value of a property
of an entity
16
#6 Address to a navigation property
(navigationLink)
17
#7 Address to an association link
18
#8 Nested Resource Path
19
Query Options
20
Evaluating System Query Options
21
• Prior to applying any server-driven paging:
• $filter
• $orderby
• $skip
• $top
• After applying any server-driven paging:
• $expand
• $select
The $expand system query option indicates the related entities to
be represented inline.
Über flexibility!
Example 1:
http://example.org/v1.0/Things?$expand=Datastreams
returns the entity set of Things as well as each of the Datastreams
associated with each Thing entity
$expand
E x a m p l e 2 : http://example.org/v1.0/Things?
$expand=Datastreams/ObservedProperty returns the
collection of Things, the Datastreams associated with each
Thing, and the ObservedProperty associated with each
Datastream.
Example 3: http://example.org/v1.0/Datastreams(1)?
$expand=Observations,ObservedProperty returns the
Datastream whose id is 1 as well as the Observations and
ObservedProperty associated with this Datastream.
The $select system query option requests that the service to return
only the properties explicitly requested by the client.
E x a m p l e 1 : http://example.org/v1.0/Observations?
$select=result,resultTime
$select
Great for performance! Reduce
response time and data size.
E x a m p l e 1 : http://example.org/v1.0/Observations?
$resultFormat=dataArray
$resultFormat=dataArray
Great for performance! Reduce
response time and data size.
$orderby
• Example 1: http://examples.com/v1.0/
Observations?$orderby=result returns all
Observations ordered by the result property in
ascending order.
Example 1: http://example.org/v1.0/Things?$top=5 returns
only the first five entities in the Things collection.
Example 2: http://example.org/v1.0/Observations?$top=5&
$orderby=phenomenonTime desc returns the first five
Observation entries after sorted by the phenomenonTime property in
descending order.
Note: if the $top value exceeds the service-driven pagination limitation
(i.e., the largest number of entities the service can return in a single
response), the $top query option should be discarded and the
pagination limitation shall be imposed.
$top
The $skip system query option specifies a non-negative integer n that
excludes the first n items of the queried collection from the result. The
service returns items starting at position n+1.


Example 1: http://example.org/v1.0/Things?$skip=5 returns
Thing entities starting with the sixth Thing entity in the Things
collection.
Where $top and $skip are used together, $skip SHALL be applied
before $top, regardless of the order in which they appear in the
request.
If no unique ordering is imposed through an $orderby query option,
the service SHALL impose a stable ordering across requests that include
$skip.
$skip
A URI with a $filter query option identifies a subset of the
entries from the collection of entries identified by the resource path
of the URI. The subset is determined by selecting only the entries
that satisfy the predicate expression specified by the $filter.
The value of the $filter option is a Boolean expression.
The expression language that is used in $filter operators
supports references to properties and literals. The literal values
can be strings enclosed in single quotes, numbers and boolean
values (true or false) or datetime values represented as ISO 8601
time string.
$filter
Service-driven Paging
• @iot.nextLink
Connect Your Arduino
• Instruction and Source Code:
• https://sensorup.atlassian.net/wiki/display/SPS/
2015/12/02/SensorThings+API+-+Arduino+101
Useful Resources
• SensorThings API Playground
• http://pg.sensorup.com
• API Documentation
• http://www.sensorup.com/docs
sensorup.com@sensorup
Any Questions?
See You Next Week!

More Related Content

What's hot

A Standardized Encoding to Exchange Citizen Science Data - ESCA 2015
A Standardized Encoding to Exchange Citizen Science Data - ESCA 2015A Standardized Encoding to Exchange Citizen Science Data - ESCA 2015
A Standardized Encoding to Exchange Citizen Science Data - ESCA 2015COBWEB Project
 
MCE^3 - Ágnes Vásárhelyi - ReactiveCocoa Reloaded
MCE^3 - Ágnes Vásárhelyi - ReactiveCocoa ReloadedMCE^3 - Ágnes Vásárhelyi - ReactiveCocoa Reloaded
MCE^3 - Ágnes Vásárhelyi - ReactiveCocoa ReloadedPROIDEA
 
Cutting-Edge Continuous Delivery: Automated Canary Analysis Through Spring-Ba...
Cutting-Edge Continuous Delivery: Automated Canary Analysis Through Spring-Ba...Cutting-Edge Continuous Delivery: Automated Canary Analysis Through Spring-Ba...
Cutting-Edge Continuous Delivery: Automated Canary Analysis Through Spring-Ba...VMware Tanzu
 
The Impact of Tangled Code Changes
The Impact of Tangled Code ChangesThe Impact of Tangled Code Changes
The Impact of Tangled Code ChangesKim Herzig
 
Less is More: Building Selective Anomaly Ensembles with Application to Event...
Less is More: Building Selective Anomaly Ensembles  with Application to Event...Less is More: Building Selective Anomaly Ensembles  with Application to Event...
Less is More: Building Selective Anomaly Ensembles with Application to Event...Shebuti Rayana
 
Research workflow - 4 June 2018
Research workflow - 4 June 2018Research workflow - 4 June 2018
Research workflow - 4 June 2018Zachary Labe
 

What's hot (7)

A Standardized Encoding to Exchange Citizen Science Data - ESCA 2015
A Standardized Encoding to Exchange Citizen Science Data - ESCA 2015A Standardized Encoding to Exchange Citizen Science Data - ESCA 2015
A Standardized Encoding to Exchange Citizen Science Data - ESCA 2015
 
MCE^3 - Ágnes Vásárhelyi - ReactiveCocoa Reloaded
MCE^3 - Ágnes Vásárhelyi - ReactiveCocoa ReloadedMCE^3 - Ágnes Vásárhelyi - ReactiveCocoa Reloaded
MCE^3 - Ágnes Vásárhelyi - ReactiveCocoa Reloaded
 
Cutting-Edge Continuous Delivery: Automated Canary Analysis Through Spring-Ba...
Cutting-Edge Continuous Delivery: Automated Canary Analysis Through Spring-Ba...Cutting-Edge Continuous Delivery: Automated Canary Analysis Through Spring-Ba...
Cutting-Edge Continuous Delivery: Automated Canary Analysis Through Spring-Ba...
 
The Impact of Tangled Code Changes
The Impact of Tangled Code ChangesThe Impact of Tangled Code Changes
The Impact of Tangled Code Changes
 
Less is More: Building Selective Anomaly Ensembles with Application to Event...
Less is More: Building Selective Anomaly Ensembles  with Application to Event...Less is More: Building Selective Anomaly Ensembles  with Application to Event...
Less is More: Building Selective Anomaly Ensembles with Application to Event...
 
Uk presentation
Uk presentationUk presentation
Uk presentation
 
Research workflow - 4 June 2018
Research workflow - 4 June 2018Research workflow - 4 June 2018
Research workflow - 4 June 2018
 

Viewers also liked

Open IoT Made Easy - Introduction to OGC SensorThings API
Open IoT Made Easy - Introduction to OGC SensorThings APIOpen IoT Made Easy - Introduction to OGC SensorThings API
Open IoT Made Easy - Introduction to OGC SensorThings APISensorUp
 
IoT Meets Geo
IoT Meets GeoIoT Meets Geo
IoT Meets GeoRaj Singh
 
The SenseBox project & Internet of Things standardization recommendations for...
The SenseBox project & Internet of Things standardization recommendations for...The SenseBox project & Internet of Things standardization recommendations for...
The SenseBox project & Internet of Things standardization recommendations for...Arne Bröring
 
Citizen Sensing with the SenosrThings API
Citizen Sensing with the SenosrThings APICitizen Sensing with the SenosrThings API
Citizen Sensing with the SenosrThings APISensorUp
 
MQTT and SensorThings API MQTT Extension
MQTT and SensorThings API MQTT ExtensionMQTT and SensorThings API MQTT Extension
MQTT and SensorThings API MQTT ExtensionSensorUp
 
Visualize Your Smart City: Build a Real-Time Smart City Dashboard for SensorT...
Visualize Your Smart City: Build a Real-Time Smart City Dashboard for SensorT...Visualize Your Smart City: Build a Real-Time Smart City Dashboard for SensorT...
Visualize Your Smart City: Build a Real-Time Smart City Dashboard for SensorT...SensorUp
 
OM-JSON - a JSON implementation of O&M
OM-JSON - a JSON implementation of O&MOM-JSON - a JSON implementation of O&M
OM-JSON - a JSON implementation of O&MSimon Cox
 

Viewers also liked (7)

Open IoT Made Easy - Introduction to OGC SensorThings API
Open IoT Made Easy - Introduction to OGC SensorThings APIOpen IoT Made Easy - Introduction to OGC SensorThings API
Open IoT Made Easy - Introduction to OGC SensorThings API
 
IoT Meets Geo
IoT Meets GeoIoT Meets Geo
IoT Meets Geo
 
The SenseBox project & Internet of Things standardization recommendations for...
The SenseBox project & Internet of Things standardization recommendations for...The SenseBox project & Internet of Things standardization recommendations for...
The SenseBox project & Internet of Things standardization recommendations for...
 
Citizen Sensing with the SenosrThings API
Citizen Sensing with the SenosrThings APICitizen Sensing with the SenosrThings API
Citizen Sensing with the SenosrThings API
 
MQTT and SensorThings API MQTT Extension
MQTT and SensorThings API MQTT ExtensionMQTT and SensorThings API MQTT Extension
MQTT and SensorThings API MQTT Extension
 
Visualize Your Smart City: Build a Real-Time Smart City Dashboard for SensorT...
Visualize Your Smart City: Build a Real-Time Smart City Dashboard for SensorT...Visualize Your Smart City: Build a Real-Time Smart City Dashboard for SensorT...
Visualize Your Smart City: Build a Real-Time Smart City Dashboard for SensorT...
 
OM-JSON - a JSON implementation of O&M
OM-JSON - a JSON implementation of O&MOM-JSON - a JSON implementation of O&M
OM-JSON - a JSON implementation of O&M
 

Similar to OGC SensorThings API Tutorial #3 - RESTful Pattern for IoT API

SAP ODATA Overview & Guidelines
SAP ODATA Overview & GuidelinesSAP ODATA Overview & Guidelines
SAP ODATA Overview & GuidelinesAshish Saxena
 
Great APIs - Future of Your Progress App
Great APIs - Future of Your Progress AppGreat APIs - Future of Your Progress App
Great APIs - Future of Your Progress AppGabriel Lucaciu
 
Working Of Search Engine
Working Of Search EngineWorking Of Search Engine
Working Of Search EngineNIKHIL NAIR
 
Intro to Web Services - 2015 STC Summit talk
Intro to Web Services - 2015 STC Summit talkIntro to Web Services - 2015 STC Summit talk
Intro to Web Services - 2015 STC Summit talkEd Marshall
 
OData and SharePoint
OData and SharePointOData and SharePoint
OData and SharePointSanjay Patel
 
Rethinking Syncing at AltConf 2019
Rethinking Syncing at AltConf 2019Rethinking Syncing at AltConf 2019
Rethinking Syncing at AltConf 2019Joe Keeley
 
aip-workshop1-dev-tutorial
aip-workshop1-dev-tutorialaip-workshop1-dev-tutorial
aip-workshop1-dev-tutorialMatthew Vaughn
 
Belfast JUG 23-10-2013
Belfast JUG 23-10-2013Belfast JUG 23-10-2013
Belfast JUG 23-10-2013eamonnlong
 
Wcf data services
Wcf data servicesWcf data services
Wcf data servicesEyal Vardi
 
Search Quality Evaluation: a Developer Perspective
Search Quality Evaluation: a Developer PerspectiveSearch Quality Evaluation: a Developer Perspective
Search Quality Evaluation: a Developer PerspectiveSease
 
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...Jitendra Bafna
 
(ATS6-PLAT04) Query service
(ATS6-PLAT04) Query service (ATS6-PLAT04) Query service
(ATS6-PLAT04) Query service BIOVIA
 
WEB-MODULE 4.pdf
WEB-MODULE 4.pdfWEB-MODULE 4.pdf
WEB-MODULE 4.pdfDeepika A B
 
Arabidopsis Information Portal: A Community-Extensible Platform for Open Data
Arabidopsis Information Portal: A Community-Extensible Platform for Open DataArabidopsis Information Portal: A Community-Extensible Platform for Open Data
Arabidopsis Information Portal: A Community-Extensible Platform for Open DataMatthew Vaughn
 
Search Quality Evaluation: a Developer Perspective
Search Quality Evaluation: a Developer PerspectiveSearch Quality Evaluation: a Developer Perspective
Search Quality Evaluation: a Developer PerspectiveAndrea Gazzarini
 
Ratpack Web Framework
Ratpack Web FrameworkRatpack Web Framework
Ratpack Web FrameworkDaniel Woods
 
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
 
Designing RESTful APIs
Designing RESTful APIsDesigning RESTful APIs
Designing RESTful APIsanandology
 
HTTP Parameter Pollution Vulnerabilities in Web Applications (Black Hat EU 2011)
HTTP Parameter Pollution Vulnerabilities in Web Applications (Black Hat EU 2011)HTTP Parameter Pollution Vulnerabilities in Web Applications (Black Hat EU 2011)
HTTP Parameter Pollution Vulnerabilities in Web Applications (Black Hat EU 2011)Marco Balduzzi
 

Similar to OGC SensorThings API Tutorial #3 - RESTful Pattern for IoT API (20)

SAP ODATA Overview & Guidelines
SAP ODATA Overview & GuidelinesSAP ODATA Overview & Guidelines
SAP ODATA Overview & Guidelines
 
OpenML Tutorial ECMLPKDD 2015
OpenML Tutorial ECMLPKDD 2015OpenML Tutorial ECMLPKDD 2015
OpenML Tutorial ECMLPKDD 2015
 
Great APIs - Future of Your Progress App
Great APIs - Future of Your Progress AppGreat APIs - Future of Your Progress App
Great APIs - Future of Your Progress App
 
Working Of Search Engine
Working Of Search EngineWorking Of Search Engine
Working Of Search Engine
 
Intro to Web Services - 2015 STC Summit talk
Intro to Web Services - 2015 STC Summit talkIntro to Web Services - 2015 STC Summit talk
Intro to Web Services - 2015 STC Summit talk
 
OData and SharePoint
OData and SharePointOData and SharePoint
OData and SharePoint
 
Rethinking Syncing at AltConf 2019
Rethinking Syncing at AltConf 2019Rethinking Syncing at AltConf 2019
Rethinking Syncing at AltConf 2019
 
aip-workshop1-dev-tutorial
aip-workshop1-dev-tutorialaip-workshop1-dev-tutorial
aip-workshop1-dev-tutorial
 
Belfast JUG 23-10-2013
Belfast JUG 23-10-2013Belfast JUG 23-10-2013
Belfast JUG 23-10-2013
 
Wcf data services
Wcf data servicesWcf data services
Wcf data services
 
Search Quality Evaluation: a Developer Perspective
Search Quality Evaluation: a Developer PerspectiveSearch Quality Evaluation: a Developer Perspective
Search Quality Evaluation: a Developer Perspective
 
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...
 
(ATS6-PLAT04) Query service
(ATS6-PLAT04) Query service (ATS6-PLAT04) Query service
(ATS6-PLAT04) Query service
 
WEB-MODULE 4.pdf
WEB-MODULE 4.pdfWEB-MODULE 4.pdf
WEB-MODULE 4.pdf
 
Arabidopsis Information Portal: A Community-Extensible Platform for Open Data
Arabidopsis Information Portal: A Community-Extensible Platform for Open DataArabidopsis Information Portal: A Community-Extensible Platform for Open Data
Arabidopsis Information Portal: A Community-Extensible Platform for Open Data
 
Search Quality Evaluation: a Developer Perspective
Search Quality Evaluation: a Developer PerspectiveSearch Quality Evaluation: a Developer Perspective
Search Quality Evaluation: a Developer Perspective
 
Ratpack Web Framework
Ratpack Web FrameworkRatpack Web Framework
Ratpack Web Framework
 
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
 
Designing RESTful APIs
Designing RESTful APIsDesigning RESTful APIs
Designing RESTful APIs
 
HTTP Parameter Pollution Vulnerabilities in Web Applications (Black Hat EU 2011)
HTTP Parameter Pollution Vulnerabilities in Web Applications (Black Hat EU 2011)HTTP Parameter Pollution Vulnerabilities in Web Applications (Black Hat EU 2011)
HTTP Parameter Pollution Vulnerabilities in Web Applications (Black Hat EU 2011)
 

More from SensorUp

Edge Computing and OGC SensorThings API
Edge Computing and OGC SensorThings APIEdge Computing and OGC SensorThings API
Edge Computing and OGC SensorThings APISensorUp
 
Actionable Insights from Multi-sensor IoT Systems using the OGC SensorThings ...
Actionable Insights from Multi-sensor IoT Systems using the OGC SensorThings ...Actionable Insights from Multi-sensor IoT Systems using the OGC SensorThings ...
Actionable Insights from Multi-sensor IoT Systems using the OGC SensorThings ...SensorUp
 
Discussion materials for the Internet of Things and Blockchain
Discussion materials for the Internet of Things and BlockchainDiscussion materials for the Internet of Things and Blockchain
Discussion materials for the Internet of Things and BlockchainSensorUp
 
OGC SensorThings API for Location Aware Sensing System (LASS) 2017 User Confe...
OGC SensorThings API for Location Aware Sensing System (LASS) 2017 User Confe...OGC SensorThings API for Location Aware Sensing System (LASS) 2017 User Confe...
OGC SensorThings API for Location Aware Sensing System (LASS) 2017 User Confe...SensorUp
 
Open Standard Internet of Things for Smart Cities
Open Standard Internet of Things for Smart CitiesOpen Standard Internet of Things for Smart Cities
Open Standard Internet of Things for Smart CitiesSensorUp
 
OGC SensorThings API - a very short introduction for ITU-T
OGC SensorThings API - a very short introduction for ITU-TOGC SensorThings API - a very short introduction for ITU-T
OGC SensorThings API - a very short introduction for ITU-TSensorUp
 
Smart Citizen Workshop - Cybera Summit 2016, Banff, Canada
Smart Citizen Workshop - Cybera Summit 2016, Banff, CanadaSmart Citizen Workshop - Cybera Summit 2016, Banff, Canada
Smart Citizen Workshop - Cybera Summit 2016, Banff, CanadaSensorUp
 
Discussion materials for Internet of Things and Smart Cities - Vespucci 2016 ...
Discussion materials for Internet of Things and Smart Cities - Vespucci 2016 ...Discussion materials for Internet of Things and Smart Cities - Vespucci 2016 ...
Discussion materials for Internet of Things and Smart Cities - Vespucci 2016 ...SensorUp
 
Challenges and Opportunities of the IoT Data and Service Interoperability
Challenges and Opportunities of the IoT Data and Service InteroperabilityChallenges and Opportunities of the IoT Data and Service Interoperability
Challenges and Opportunities of the IoT Data and Service InteroperabilitySensorUp
 

More from SensorUp (9)

Edge Computing and OGC SensorThings API
Edge Computing and OGC SensorThings APIEdge Computing and OGC SensorThings API
Edge Computing and OGC SensorThings API
 
Actionable Insights from Multi-sensor IoT Systems using the OGC SensorThings ...
Actionable Insights from Multi-sensor IoT Systems using the OGC SensorThings ...Actionable Insights from Multi-sensor IoT Systems using the OGC SensorThings ...
Actionable Insights from Multi-sensor IoT Systems using the OGC SensorThings ...
 
Discussion materials for the Internet of Things and Blockchain
Discussion materials for the Internet of Things and BlockchainDiscussion materials for the Internet of Things and Blockchain
Discussion materials for the Internet of Things and Blockchain
 
OGC SensorThings API for Location Aware Sensing System (LASS) 2017 User Confe...
OGC SensorThings API for Location Aware Sensing System (LASS) 2017 User Confe...OGC SensorThings API for Location Aware Sensing System (LASS) 2017 User Confe...
OGC SensorThings API for Location Aware Sensing System (LASS) 2017 User Confe...
 
Open Standard Internet of Things for Smart Cities
Open Standard Internet of Things for Smart CitiesOpen Standard Internet of Things for Smart Cities
Open Standard Internet of Things for Smart Cities
 
OGC SensorThings API - a very short introduction for ITU-T
OGC SensorThings API - a very short introduction for ITU-TOGC SensorThings API - a very short introduction for ITU-T
OGC SensorThings API - a very short introduction for ITU-T
 
Smart Citizen Workshop - Cybera Summit 2016, Banff, Canada
Smart Citizen Workshop - Cybera Summit 2016, Banff, CanadaSmart Citizen Workshop - Cybera Summit 2016, Banff, Canada
Smart Citizen Workshop - Cybera Summit 2016, Banff, Canada
 
Discussion materials for Internet of Things and Smart Cities - Vespucci 2016 ...
Discussion materials for Internet of Things and Smart Cities - Vespucci 2016 ...Discussion materials for Internet of Things and Smart Cities - Vespucci 2016 ...
Discussion materials for Internet of Things and Smart Cities - Vespucci 2016 ...
 
Challenges and Opportunities of the IoT Data and Service Interoperability
Challenges and Opportunities of the IoT Data and Service InteroperabilityChallenges and Opportunities of the IoT Data and Service Interoperability
Challenges and Opportunities of the IoT Data and Service Interoperability
 

Recently uploaded

Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on DeliveryCall Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Deliverybabeytanya
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...Diya Sharma
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)Damian Radcliffe
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsThierry TROUIN ☁
 
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya Shirtrahman018755
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGAPNIC
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts servicevipmodelshub1
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxellan12
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024APNIC
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607dollysharma2066
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Servicesexy call girls service in goa
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...APNIC
 
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girlsstephieert
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With RoomVIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Roomgirls4nights
 
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$kojalkojal131
 

Recently uploaded (20)

Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on DeliveryCall Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with Flows
 
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOG
 
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
 
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
 
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With RoomVIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
 
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
 

OGC SensorThings API Tutorial #3 - RESTful Pattern for IoT API

  • 1. OGC SensorThings API Tutorial #3 - RESTful Pattern for IoT API 0.23 litre/minute 0.25 litre/minute 0.27 litre/minuteRH: 85 % Temp: 18 Celsius Dr. Steve Liang Chair, OGC SensorThings API Standard Working Group Founder and CEO, SensorUp Inc. Associate Professor, University of Calgary
  • 2. sensorup.com@sensorup Agenda • Recap: OGC SensorThings Data Model • IoT API RESTful Pattern • Many Examples
  • 3. sensorup.com@sensorup About Dr. Steve Liang • Associate Professor, Geomatics Engineering, Uni. Calgary • AITF-Microsoft Industry Chair on Open Sensor Web • Chair OGC SensorThings API Standard Working Group • Co-Chair OGC Sensor Web Enablement Domain Working Group • N.A. Chair, OGC University Domain Working Group • Rapporteur, ITU-T SG12/11 on Internet of Things Test Specifications • Founder and CEO, SensorUp Inc, a University of Calgary startup (http://www.sensorup.com)
  • 4. sensorup.com@sensorup About SensorUp • We are a world leader in OGC Sensor Web and IoT • We are leading several international IoT standard development efforts (OGC and ITU-T) • We developed world’s first OGC SensorThings API implementation
  • 6. Prerequisites • Basic knowledge of REST (REpresentational State Transfer) • https://en.wikipedia.org/wiki/Representational_state_transfer • Basic knowledge of JSON (JavaScript Object Notation) • http://www.json.org/
  • 7. Before We Start • It’s all about LINKS! • great discoverability • great for dynamic use cases • efficient and great developer experiences • big data analytics friendly • Uniform and Consistent Pattern
  • 8. SensorThings Entities Common Control Information 8 Annotation Definition Data type Multiplicity @iot.id system generated identifier Any 1 @iot.selfLink absolute URL of an entity URL 1 @iot.navigationLink link leading to related entities URL 1…*
  • 10. IoT API URL Patterns based on SensorThings 10
  • 13. #2 Address to an entity set 13 one of the eight entities, e.g., Things, Datastreams
  • 14. #3 Address to an individual entity 14
  • 15. #4 Address to a property of an entity 15
  • 16. #5 Address to the value of a property of an entity 16
  • 17. #6 Address to a navigation property (navigationLink) 17
  • 18. #7 Address to an association link 18
  • 21. Evaluating System Query Options 21 • Prior to applying any server-driven paging: • $filter • $orderby • $skip • $top • After applying any server-driven paging: • $expand • $select
  • 22. The $expand system query option indicates the related entities to be represented inline. Über flexibility! Example 1: http://example.org/v1.0/Things?$expand=Datastreams returns the entity set of Things as well as each of the Datastreams associated with each Thing entity $expand
  • 23. E x a m p l e 2 : http://example.org/v1.0/Things? $expand=Datastreams/ObservedProperty returns the collection of Things, the Datastreams associated with each Thing, and the ObservedProperty associated with each Datastream. Example 3: http://example.org/v1.0/Datastreams(1)? $expand=Observations,ObservedProperty returns the Datastream whose id is 1 as well as the Observations and ObservedProperty associated with this Datastream.
  • 24. The $select system query option requests that the service to return only the properties explicitly requested by the client. E x a m p l e 1 : http://example.org/v1.0/Observations? $select=result,resultTime $select Great for performance! Reduce response time and data size.
  • 25. E x a m p l e 1 : http://example.org/v1.0/Observations? $resultFormat=dataArray $resultFormat=dataArray Great for performance! Reduce response time and data size.
  • 26. $orderby • Example 1: http://examples.com/v1.0/ Observations?$orderby=result returns all Observations ordered by the result property in ascending order.
  • 27. Example 1: http://example.org/v1.0/Things?$top=5 returns only the first five entities in the Things collection. Example 2: http://example.org/v1.0/Observations?$top=5& $orderby=phenomenonTime desc returns the first five Observation entries after sorted by the phenomenonTime property in descending order. Note: if the $top value exceeds the service-driven pagination limitation (i.e., the largest number of entities the service can return in a single response), the $top query option should be discarded and the pagination limitation shall be imposed. $top
  • 28. The $skip system query option specifies a non-negative integer n that excludes the first n items of the queried collection from the result. The service returns items starting at position n+1. 
 Example 1: http://example.org/v1.0/Things?$skip=5 returns Thing entities starting with the sixth Thing entity in the Things collection. Where $top and $skip are used together, $skip SHALL be applied before $top, regardless of the order in which they appear in the request. If no unique ordering is imposed through an $orderby query option, the service SHALL impose a stable ordering across requests that include $skip. $skip
  • 29. A URI with a $filter query option identifies a subset of the entries from the collection of entries identified by the resource path of the URI. The subset is determined by selecting only the entries that satisfy the predicate expression specified by the $filter. The value of the $filter option is a Boolean expression. The expression language that is used in $filter operators supports references to properties and literals. The literal values can be strings enclosed in single quotes, numbers and boolean values (true or false) or datetime values represented as ISO 8601 time string. $filter
  • 30.
  • 32. Connect Your Arduino • Instruction and Source Code: • https://sensorup.atlassian.net/wiki/display/SPS/ 2015/12/02/SensorThings+API+-+Arduino+101
  • 33. Useful Resources • SensorThings API Playground • http://pg.sensorup.com • API Documentation • http://www.sensorup.com/docs