Rapid Application Development with SwiftUI and FirebasePeter Friese
Firebase is Google's mobile development platform for Android, iOS, and the web. SwiftUI is Apple's user interface toolkit that lets developers design apps in a declarative way. In this session, we will bring the two together and take a look at how easy it is to develop a new application from scratch.
Slides for my talk at CocoaHeads Berlin (https://www.meetup.com/Cocoaheads-Berlin/events/266764473/)
Sebastian Schmidt, Rachel Myers - How To Go Serverless And Not Violate The GD...Codemotion
As your mobile users get accustomed to advanced features that require Cloud support, it becomes increasingly hard to protect their privacy while staying up to date with data protection regulations such as the GDPR. We would like to show you how you can continue to use cloud-based SDKs and employ Firebase to create an experience that pleases both your users and your newly hired data stewardship team.
Data Synchronization Patterns in Mobile Application DesignEric Maxwell
Data synchronization and offline capabilities are key to creating successful mobile applications and there are many factors to consider.
– What data format should you use?
– How do you manage security?
– How do you efficiently manage syncing data to hundreds of applications independently?
In this session, you’ll learn about various factors that drive answers to these questions. You’ll also learn from live code and interactive demonstrations how to use SSL and OAUTH2 to securely synchronize JSON data with a remote REST service and how to use synchronization tokens to efficiently keep your clients up to date. There will be client examples included for both the iOS and Android platforms, but you’ll be able to apply these concepts to any client, regardless of your platform.
Parse: A Mobile Backend as a Service (MBaaS)Ville Seppänen
Parse is a mobile backend as a service (MBaaS), a subcategory of PaaS. This is a presentation evaluating the service for a post-graduate seminar course.
Learn how to focus on creating a great user experience and forget complex infrastructure. Instantly add a powerful core, push notifications, and analytics to your app with Parse. We will take a deep dive at Parse's native SDKs for Android and see how to build an app that scales to millions of users.
SharePoint Conference 2018 - Build an intelligent application by connecting i...Sébastien Levert
In this session, you will learn how to authenticate your users to the Microsoft Graph from a web perspective while enhancing your application by leveraging multiple endpoints (SharePoint, OneDrive & Exchange) available within this phenomenal API.
You will also learn the basics of playing with the data, and then move to more advanced topics including ways to get notified of changes from webhooks, get subset of results using built-in paging mechanisms and finally how to track the ever-changing data that lives in the Microsoft Graph.
Rapid Application Development with SwiftUI and FirebasePeter Friese
Firebase is Google's mobile development platform for Android, iOS, and the web. SwiftUI is Apple's user interface toolkit that lets developers design apps in a declarative way. In this session, we will bring the two together and take a look at how easy it is to develop a new application from scratch.
Slides for my talk at CocoaHeads Berlin (https://www.meetup.com/Cocoaheads-Berlin/events/266764473/)
Sebastian Schmidt, Rachel Myers - How To Go Serverless And Not Violate The GD...Codemotion
As your mobile users get accustomed to advanced features that require Cloud support, it becomes increasingly hard to protect their privacy while staying up to date with data protection regulations such as the GDPR. We would like to show you how you can continue to use cloud-based SDKs and employ Firebase to create an experience that pleases both your users and your newly hired data stewardship team.
Data Synchronization Patterns in Mobile Application DesignEric Maxwell
Data synchronization and offline capabilities are key to creating successful mobile applications and there are many factors to consider.
– What data format should you use?
– How do you manage security?
– How do you efficiently manage syncing data to hundreds of applications independently?
In this session, you’ll learn about various factors that drive answers to these questions. You’ll also learn from live code and interactive demonstrations how to use SSL and OAUTH2 to securely synchronize JSON data with a remote REST service and how to use synchronization tokens to efficiently keep your clients up to date. There will be client examples included for both the iOS and Android platforms, but you’ll be able to apply these concepts to any client, regardless of your platform.
Parse: A Mobile Backend as a Service (MBaaS)Ville Seppänen
Parse is a mobile backend as a service (MBaaS), a subcategory of PaaS. This is a presentation evaluating the service for a post-graduate seminar course.
Learn how to focus on creating a great user experience and forget complex infrastructure. Instantly add a powerful core, push notifications, and analytics to your app with Parse. We will take a deep dive at Parse's native SDKs for Android and see how to build an app that scales to millions of users.
SharePoint Conference 2018 - Build an intelligent application by connecting i...Sébastien Levert
In this session, you will learn how to authenticate your users to the Microsoft Graph from a web perspective while enhancing your application by leveraging multiple endpoints (SharePoint, OneDrive & Exchange) available within this phenomenal API.
You will also learn the basics of playing with the data, and then move to more advanced topics including ways to get notified of changes from webhooks, get subset of results using built-in paging mechanisms and finally how to track the ever-changing data that lives in the Microsoft Graph.
Firefox OS, HTML5 to the next level - Python Montreal - 2014-05-12Frédéric Harper
If you are like me, your spectrum of interest is large when it comes to technology. You may be a Python developer, but that does not mean you have not any interest in HTML, and it’s a good coincidence as it’s the foundation of my presentation. In this talk, Frédéric Harper will show you how you can use HTML5 with the power of JavaScript to build amazing mobile applications as to brush up what you previously published. Learn about the open web technologies, including WebAPIs, and tools designed to get you started developing HTML apps for Firefox OS, and the web.
Firefox OS, fixing the mobile web - FITC Toronto - 2014-04-28Frédéric Harper
The mobile web got a bad reputation. In reality, it's the platform to bet on if you care about reach, and sustainability of your product. In this talk, Frédéric Harper will show you how you can use HTML5, CSS3, and JavaScript to build amazing mobile applications as to brush up what you previously published. Learn about the open web technologies, including WebAPIs, and tools designed to get you started developing HTML apps for Firefox OS, and the web.
Marketing Automation with dotCMS Presentation from BootCamp 2014
DotCMS + Content + REST + Workflows + OSGI + Actionlets = Very flexible marketing automation tool. Will Ezell shares how to use the out of the box features in dotCMS to deliver customized marketing experiences, enable ecommerce and Salesforce integration. This session will give you insight into how dotCMS can be leveraged as one very powerful and ultra-flexible marketing automation machine.
Designing an API for the Internet of ThingsKevin Swiber
In the near future, everything will be connected: cities, enterprises, human beings, and more. This reality is just over the horizon, and it brings one of the largest challenges in building distributed systems. Today, developers often look to RESTful Web APIs to solve these problems. Are current trends in API design really prepared to handle the demands of the future? What’s missing from the equation? Learn new patterns for modeling Web APIs using state machines, hypermedia, and reactive streams to meet tomorrow’s challenges and make a solid attempt at standing the test of time.
Implementing and Visualizing Clickstream data with MongoDBMongoDB
Having recently implemented a new framework for the real-time collection, aggregation and visualization of web and mobile generated Clickstream traffic (realizing daily click-stream volumes of 1M+ events), this walkthrough is about the motivations, throughout-process and key decisions made, as well as an in depth look at the implementation of how to buildout a data-collection, analytics and visualization framework using MongoDB. Technologies covered in this presentation (as well as MongoDB) are Java, Spring, Django and Pymongo.
HTML for the Mobile Web, Firefox OS - All Things Open - 2014-10-22Frédéric Harper
Firefox OS is a new operating system for mobile phones to bring web connectivity to those who can not get top-of-the-line smartphones. By harvesting the principles of what made the web great and giving developers access to the hardware directly through web standards it will be the step we need to make a real open and affordable mobile web a reality. In this talk, Frédéric Harper from Mozilla will show how Firefox OS works, how to build apps for it and how end users will benefit from this open alternative to other platforms.
This is a part of the slide set used at the MakerSpace Noida (India) launch event, Pi Maker Workshop. This slide set is designed to help people get started with the Raspberry Pi and also serves as a collection of innovative projects and some core basic concepts that can aid anybody with their first few steps into the world of DIY electronics or maybe serve as a refresher for the experienced.
Feel free to refer and share but please don't alter the watermarks :)
Redundancy and high availability are the basis for all production deployments. With MongoDB high availability is achieved with replica sets which provides automatic fail-over in case the Primary goes down. In this session we will review multiple maintenance scenarios that will include the proper steps for keeping the high availability while we perform the maintenance steps without causing downtime.
This session will cover Database upgrades, OS server patching, Hardware upgrades, Network maintenance and more.
How MongoDB HA works
Replica sets components/deployment typologies
Database upgrades
System patching/upgrade
Network maintenance
Add/Remove members to the replica set
Reconfiguring replica set members
Building indexes
Backups and restores
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
More Related Content
Similar to Watson IoT Action Manager Concepts & API Overview
Firefox OS, HTML5 to the next level - Python Montreal - 2014-05-12Frédéric Harper
If you are like me, your spectrum of interest is large when it comes to technology. You may be a Python developer, but that does not mean you have not any interest in HTML, and it’s a good coincidence as it’s the foundation of my presentation. In this talk, Frédéric Harper will show you how you can use HTML5 with the power of JavaScript to build amazing mobile applications as to brush up what you previously published. Learn about the open web technologies, including WebAPIs, and tools designed to get you started developing HTML apps for Firefox OS, and the web.
Firefox OS, fixing the mobile web - FITC Toronto - 2014-04-28Frédéric Harper
The mobile web got a bad reputation. In reality, it's the platform to bet on if you care about reach, and sustainability of your product. In this talk, Frédéric Harper will show you how you can use HTML5, CSS3, and JavaScript to build amazing mobile applications as to brush up what you previously published. Learn about the open web technologies, including WebAPIs, and tools designed to get you started developing HTML apps for Firefox OS, and the web.
Marketing Automation with dotCMS Presentation from BootCamp 2014
DotCMS + Content + REST + Workflows + OSGI + Actionlets = Very flexible marketing automation tool. Will Ezell shares how to use the out of the box features in dotCMS to deliver customized marketing experiences, enable ecommerce and Salesforce integration. This session will give you insight into how dotCMS can be leveraged as one very powerful and ultra-flexible marketing automation machine.
Designing an API for the Internet of ThingsKevin Swiber
In the near future, everything will be connected: cities, enterprises, human beings, and more. This reality is just over the horizon, and it brings one of the largest challenges in building distributed systems. Today, developers often look to RESTful Web APIs to solve these problems. Are current trends in API design really prepared to handle the demands of the future? What’s missing from the equation? Learn new patterns for modeling Web APIs using state machines, hypermedia, and reactive streams to meet tomorrow’s challenges and make a solid attempt at standing the test of time.
Implementing and Visualizing Clickstream data with MongoDBMongoDB
Having recently implemented a new framework for the real-time collection, aggregation and visualization of web and mobile generated Clickstream traffic (realizing daily click-stream volumes of 1M+ events), this walkthrough is about the motivations, throughout-process and key decisions made, as well as an in depth look at the implementation of how to buildout a data-collection, analytics and visualization framework using MongoDB. Technologies covered in this presentation (as well as MongoDB) are Java, Spring, Django and Pymongo.
HTML for the Mobile Web, Firefox OS - All Things Open - 2014-10-22Frédéric Harper
Firefox OS is a new operating system for mobile phones to bring web connectivity to those who can not get top-of-the-line smartphones. By harvesting the principles of what made the web great and giving developers access to the hardware directly through web standards it will be the step we need to make a real open and affordable mobile web a reality. In this talk, Frédéric Harper from Mozilla will show how Firefox OS works, how to build apps for it and how end users will benefit from this open alternative to other platforms.
This is a part of the slide set used at the MakerSpace Noida (India) launch event, Pi Maker Workshop. This slide set is designed to help people get started with the Raspberry Pi and also serves as a collection of innovative projects and some core basic concepts that can aid anybody with their first few steps into the world of DIY electronics or maybe serve as a refresher for the experienced.
Feel free to refer and share but please don't alter the watermarks :)
Redundancy and high availability are the basis for all production deployments. With MongoDB high availability is achieved with replica sets which provides automatic fail-over in case the Primary goes down. In this session we will review multiple maintenance scenarios that will include the proper steps for keeping the high availability while we perform the maintenance steps without causing downtime.
This session will cover Database upgrades, OS server patching, Hardware upgrades, Network maintenance and more.
How MongoDB HA works
Replica sets components/deployment typologies
Database upgrades
System patching/upgrade
Network maintenance
Add/Remove members to the replica set
Reconfiguring replica set members
Building indexes
Backups and restores
Similar to Watson IoT Action Manager Concepts & API Overview (20)
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Watson IoT Action Manager Concepts & API Overview
1. IBM Watson Internet of Things
IBM Watson IoT Platform
Action Manager Concepts &
API Overview
Version 1.0
2. IBM Watson Internet of Things
Agenda
•Overview
•Resources
– Actions
– Triggers
•Actions API Overview
•Triggers API Overview
•Processing Walkthrough
3. IBM Watson Internet of Things
Overview
•The Action Manager is a general purpose component that can invoke actions when
events occur within the platform
•Examples of events that could trigger actions:
– Embedded rule fires
– Device/Thing State update (future)
– Configuration change (future)
•Examples of the types of Action that could be supported:
– Webhook
– Email (future)
– MQTT (future)
– etc…
4. IBM Watson Internet of Things
Agenda
•Overview
•Resources
– Actions
– Triggers
•Actions API Overview
•Triggers API Overview
•Processing Walkthrough
5. IBM Watson Internet of Things
Resources – Actions
• An action represents the action to be performed, i.e.:
– Invoke a webhook
– Send an email
– Publish an MQTT event
– Etc..
• The Action resource:
– Encapsulates all of the metadata required to perform the
action
– Is intended to be agnostic of how it is invoked
v Allows different triggers to be defined for the same action
– Defines a common set of metadata
v Name
v Id
v Description
v Type
v Configuration
v Enabled
v Etc…
Action
{
"id": "5848040f6522050001db0e20",
"name" : "My Webhook Action",
"description" : "An example webhook action",
"type": "webhook",
"enabled": true,
"configuration": {
…
},
"adminDisabled": false,
"adminDisabledReason": null,
"created": "2018-01-30T13:00:00Z",
"createdBy": "john.doe@us.ibm.com",
"updated": "2018-01-30T14:00:00Z",
"updatedBy": "fred.bloggs@uk.ibm.com",
"refs": {
"triggers": " /api/v0002/actions/5848040f6522050001db0e20/triggers"
}
}
6. IBM Watson Internet of Things
Resources – Actions
•The Action resource is polymorphic
Action
{
"id": "5848040f6522050001db0e20",
"name" : "My Webhook Action",
"description" : "An example webhook action",
"type": "webhook",
"enabled": true,
"configuration": {
…
},
"adminDisabled": false,
"adminDisabledReason": null,
"created": "2018-01-30T13:00:00Z",
"createdBy": "john.doe@us.ibm.com",
"updated": "2018-01-30T14:00:00Z",
"updatedBy": "fred.bloggs@uk.ibm.com",
"refs": {
"triggers": " /api/v0002/actions/5848040f6522050001db0e20/triggers"
}
}
7. IBM Watson Internet of Things
Resources – Actions
•The Action resource is polymorphic
•The type of the action is defined by the type
property
Action
{
"id": "5848040f6522050001db0e20",
"name" : "My Webhook Action",
"description" : "An example webhook action",
"type": "webhook",
"enabled": true,
"configuration": {
…
},
"adminDisabled": false,
"adminDisabledReason": null,
"created": "2018-01-30T13:00:00Z",
"createdBy": "john.doe@us.ibm.com",
"updated": "2018-01-30T14:00:00Z",
"updatedBy": "fred.bloggs@uk.ibm.com",
"refs": {
"triggers": " /api/v0002/actions/5848040f6522050001db0e20/triggers"
}
}
8. IBM Watson Internet of Things
Resources – Actions
•The Action resource is polymorphic
•The type of the action is defined by the type
property
•The value of the configuration property varies
depending on the type of the action
Action
{
"id": "5848040f6522050001db0e20",
"name" : "My Webhook Action",
"description" : "An example webhook action",
"type": "webhook",
"enabled": true,
"configuration": {
…
},
"adminDisabled": false,
"adminDisabledReason": null,
"created": "2018-01-30T13:00:00Z",
"createdBy": "john.doe@us.ibm.com",
"updated": "2018-01-30T14:00:00Z",
"updatedBy": "fred.bloggs@uk.ibm.com",
"refs": {
"triggers": " /api/v0002/actions/5848040f6522050001db0e20/triggers"
}
}
9. IBM Watson Internet of Things
Resources – Webhook Actions
•A Webhook Action is used to invoke a webhook
Action
{
"id": "5848040f6522050001db0e20",
"name" : "My Webhook Action",
"description" : "An example webhook action",
"type": "webhook",
"enabled": true,
"configuration": {
"targetUrl": "http://webhook-sim/abcdef/senddata",
"method": "POST",
"contentType": "application/json",
"username": "john.doe@us.ibm.com",
"password": "passw0rd",
"headers": [
{
"name": "mycustomheader",
"value": "{{somevalue}}"
}
],
"body": "{"id" : {{theId}}, "data": "{{theData}}"}"
},
"adminDisabled": false,
"adminDisabledReason": null,
"created": "2018-01-30T13:00:00Z",
"createdBy": "john.doe@us.ibm.com",
"updated": "2018-01-30T14:00:00Z",
"updatedBy": "fred.bloggs@uk.ibm.com",
"refs": {
"triggers": " /api/v0002/actions/5848040f6522050001db0e20/triggers"
}
}
Webhook
Action
10. IBM Watson Internet of Things
Resources – Webhook Actions
•A Webhook Action is used to invoke a webhook
•The configuration property must define the
following properties:
– targetUrl
Action
{
"id": "5848040f6522050001db0e20",
"name" : "My Webhook Action",
"description" : "An example webhook action",
"type": "webhook",
"enabled": true,
"configuration": {
"targetUrl": "http://webhook-sim/abcdef/senddata",
"method": "POST",
"contentType": "application/json",
"username": "john.doe@us.ibm.com",
"password": "passw0rd",
"headers": [
{
"name": "mycustomheader",
"value": "{{somevalue}}"
}
],
"body": "{"id" : {{theId}}, "data": "{{theData}}"}"
},
"adminDisabled": false,
"adminDisabledReason": null,
"created": "2018-01-30T13:00:00Z",
"createdBy": "john.doe@us.ibm.com",
"updated": "2018-01-30T14:00:00Z",
"updatedBy": "fred.bloggs@uk.ibm.com",
"refs": {
"triggers": " /api/v0002/actions/5848040f6522050001db0e20/triggers"
}
}
Webhook
Action
11. IBM Watson Internet of Things
Resources – Webhook Actions
•A Webhook Action is used to invoke a webhook
•The configuration property must define the
following properties:
– targetUrl
•It can also define the following optional
properties:
– method (defaults to POST)
– contentType (defaults to application/json)
– username
– password
– headers (defaults to empty array)
– body (defaults to empty string)
Action
{
"id": "5848040f6522050001db0e20",
"name" : "My Webhook Action",
"description" : "An example webhook action",
"type": "webhook",
"enabled": true,
"configuration": {
"targetUrl": "http://webhook-sim/abcdef/senddata",
"method": "POST",
"contentType": "application/json",
"username": "john.doe@us.ibm.com",
"password": "passw0rd",
"headers": [
{
"name": "mycustomheader",
"value": "{{somevalue}}"
}
],
"body": "{"id" : {{theId}}, "data": "{{theData}}"}"
},
"adminDisabled": false,
"adminDisabledReason": null,
"created": "2018-01-30T13:00:00Z",
"createdBy": "john.doe@us.ibm.com",
"updated": "2018-01-30T14:00:00Z",
"updatedBy": "fred.bloggs@uk.ibm.com",
"refs": {
"triggers": " /api/v0002/actions/5848040f6522050001db0e20/triggers"
}
}
Webhook
Action
12. IBM Watson Internet of Things
Resources – EMail Actions (future)
•An EMail Action is used to send an email
Action
{
"id": "5848040f6522050001db0e20",
"name" : "My Webhook Action",
"description" : "An example webhook action",
"type": "email",
"enabled": true,
"configuration": {
"host": "smtp.gmail.com",
"port": 587,
"username": "john.doe@us.ibm.com",
"password": "passw0rd",
"to": [
"jane.doe@us.ibm.com",
],
"cc": [],
"bcc": [],
"subject": "{{alertType}} alert from the WIoTP Platform"
"content": "The state has changed {{state}}",
},
"adminDisabled": false,
"adminDisabledReason": null,
"created": "2018-01-30T13:00:00Z",
"createdBy": "john.doe@us.ibm.com",
"updated": "2018-01-30T14:00:00Z",
"updatedBy": "fred.bloggs@uk.ibm.com",
"refs": {
"triggers": " /api/v0002/actions/5848040f6522050001db0e20/triggers"
}
}
Email
Action
13. IBM Watson Internet of Things
Resources – EMail Actions (future)
•An EMail Action is used to send an email
•The configuration property must define the
following properties:
– host
– port
– username
– password
– to
Action
{
"id": "5848040f6522050001db0e20",
"name" : "My Webhook Action",
"description" : "An example webhook action",
"type": "email",
"enabled": true,
"configuration": {
"host": "smtp.gmail.com",
"port": 587,
"username": "john.doe@us.ibm.com",
"password": "passw0rd",
"to": [
"jane.doe@us.ibm.com",
],
"cc": [],
"bcc": [],
"subject": "{{alertType}} alert from the WIoTP Platform"
"content": "The state has changed {{state}}",
},
"adminDisabled": false,
"adminDisabledReason": null,
"created": "2018-01-30T13:00:00Z",
"createdBy": "john.doe@us.ibm.com",
"updated": "2018-01-30T14:00:00Z",
"updatedBy": "fred.bloggs@uk.ibm.com",
"refs": {
"triggers": " /api/v0002/actions/5848040f6522050001db0e20/triggers"
}
}
Email
Action
14. IBM Watson Internet of Things
Resources – EMail Actions (future)
•An EMail Action is used to send an email
•The configuration property must define the
following properties:
– host
– port
– username
– password
– to
•It can also define the following optional
properties:
– subject (defaults to empty string)
– content (defaults to empty string)
– cc (defaults to empty array)
– bcc (defaults to empty array)
Action
{
"id": "5848040f6522050001db0e20",
"name" : "My Webhook Action",
"description" : "An example webhook action",
"type": "email",
"enabled": true,
"configuration": {
"host": "smtp.gmail.com",
"port": 587,
"username": "john.doe@us.ibm.com",
"password": "passw0rd",
"to": [
"jane.doe@us.ibm.com",
],
"cc": [],
"bcc": [],
"subject": "{{alertType}} alert from the WIoTP Platform"
"content": "The state has changed {{state}}",
},
"adminDisabled": false,
"adminDisabledReason": null,
"created": "2018-01-30T13:00:00Z",
"createdBy": "john.doe@us.ibm.com",
"updated": "2018-01-30T14:00:00Z",
"updatedBy": "fred.bloggs@uk.ibm.com",
"refs": {
"triggers": " /api/v0002/actions/5848040f6522050001db0e20/triggers"
}
}
Email
Action
15. IBM Watson Internet of Things
Resources – Action Variables
•The properties defined on the configuration
object can also include variables
Action
{
"id": "5848040f6522050001db0e20",
"name" : "My Webhook Action",
"description" : "An example webhook action",
"type": "webhook",
"enabled": true,
"configuration": {
"targetUrl": "http://webhook-sim/abcdef/senddata",
"method": "POST",
"contentType": "application/json",
"username": "john.doe@us.ibm.com",
"password": "passw0rd",
"headers": [
{
"name": "mycustomheader",
"value": "{{somevalue}}"
}
],
"body": "{"id" : {{theId}}, "data": "{{theData}}"}"
},
"adminDisabled": false,
"adminDisabledReason": null,
"created": "2018-01-30T13:00:00Z",
"createdBy": "john.doe@us.ibm.com",
"updated": "2018-01-30T14:00:00Z",
"updatedBy": "fred.bloggs@uk.ibm.com",
"refs": {
"triggers": " /api/v0002/actions/5848040f6522050001db0e20/triggers"
}
}
16. IBM Watson Internet of Things
Resources – Action Variables
•The properties defined on the configuration
object can also include variables
•Variables are defined using Mustache syntax
http://mustache.github.io/mustache.5.html
Action
{
"id": "5848040f6522050001db0e20",
"name" : "My Webhook Action",
"description" : "An example webhook action",
"type": "webhook",
"enabled": true,
"configuration": {
"targetUrl": "http://webhook-sim/abcdef/senddata",
"method": "POST",
"contentType": "application/json",
"username": "john.doe@us.ibm.com",
"password": "passw0rd",
"headers": [
{
"name": "mycustomheader",
"value": "{{somevalue}}"
}
],
"body": "{"id" : {{theId}}, "data": "{{theData}}"}"
},
"adminDisabled": false,
"adminDisabledReason": null,
"created": "2018-01-30T13:00:00Z",
"createdBy": "john.doe@us.ibm.com",
"updated": "2018-01-30T14:00:00Z",
"updatedBy": "fred.bloggs@uk.ibm.com",
"refs": {
"triggers": " /api/v0002/actions/5848040f6522050001db0e20/triggers"
}
}
17. IBM Watson Internet of Things
Resources – Action Variables
•The properties defined on the configuration
object can also include variables
•Variables are defined using Mustache syntax
http://mustache.github.io/mustache.5.html
•An action can define a maximum of 32 unique
variables
•The values of the variables are defined by the
triggers for the action (more on this later)
Action
{
"id": "5848040f6522050001db0e20",
"name" : "My Webhook Action",
"description" : "An example webhook action",
"type": "webhook",
"enabled": true,
"configuration": {
"targetUrl": "http://webhook-sim/abcdef/senddata",
"method": "POST",
"contentType": "application/json",
"username": "john.doe@us.ibm.com",
"password": "passw0rd",
"headers": [
{
"name": "mycustomheader",
"value": "{{somevalue}}"
}
],
"body": "{"id" : {{theId}}, "data": "{{theData}}"}"
},
"adminDisabled": false,
"adminDisabledReason": null,
"created": "2018-01-30T13:00:00Z",
"createdBy": "john.doe@us.ibm.com",
"updated": "2018-01-30T14:00:00Z",
"updatedBy": "fred.bloggs@uk.ibm.com",
"refs": {
"triggers": " /api/v0002/actions/5848040f6522050001db0e20/triggers"
}
}
18. IBM Watson Internet of Things
Resources – Action Variables
•The following features of Mustache are
supported:
– Variables
{{myVariable}}
– Sections
{{#mySection}}
Hello {{name}}
{{/mySection}}
– Inverted Sections
{{^myInvertedSection}}
No name specified!!!
{{/myInvertedSection}}
– Comments
{{! A Comment}}
Action
{
"id": "5848040f6522050001db0e20",
"name" : "My Webhook Action",
"description" : "An example webhook action",
"type": "webhook",
"enabled": true,
"configuration": {
"targetUrl": "http://webhook-sim/abcdef/senddata",
"method": "POST",
"contentType": "application/json",
"username": "john.doe@us.ibm.com",
"password": "passw0rd",
"headers": [
{
"name": "mycustomheader",
"value": "{{somevalue}}"
}
],
"body": "{"id" : {{theId}}, "data": "{{theData}}"}"
},
"adminDisabled": false,
"adminDisabledReason": null,
"created": "2018-01-30T13:00:00Z",
"createdBy": "john.doe@us.ibm.com",
"updated": "2018-01-30T14:00:00Z",
"updatedBy": "fred.bloggs@uk.ibm.com",
"refs": {
"triggers": " /api/v0002/actions/5848040f6522050001db0e20/triggers"
}
}
19. IBM Watson Internet of Things
Resources – Action Variables
•The following features of Mustache are not
supported:
– Partials
{{> myPartial}}
– Lambdas
– Setting delimiters
{{=<% %>=}}
<% erb_style_tags %>
<%={{ }}=%>
Action
{
"id": "5848040f6522050001db0e20",
"name" : "My Webhook Action",
"description" : "An example webhook action",
"type": "webhook",
"enabled": true,
"configuration": {
"targetUrl": "http://webhook-sim/abcdef/senddata",
"method": "POST",
"contentType": "application/json",
"username": "john.doe@us.ibm.com",
"password": "passw0rd",
"headers": [
{
"name": "mycustomheader",
"value": "{{somevalue}}"
}
],
"body": "{"id" : {{theId}}, "data": "{{theData}}"}"
},
"adminDisabled": false,
"adminDisabledReason": null,
"created": "2018-01-30T13:00:00Z",
"createdBy": "john.doe@us.ibm.com",
"updated": "2018-01-30T14:00:00Z",
"updatedBy": "fred.bloggs@uk.ibm.com",
"refs": {
"triggers": " /api/v0002/actions/5848040f6522050001db0e20/triggers"
}
}
20. IBM Watson Internet of Things
Agenda
•Overview
•Resources
– Actions
– Triggers
•Actions API Overview
•Triggers API Overview
•Processing Walkthrough
21. IBM Watson Internet of Things
Resources – Triggers
•In order for an action to be invoked, you need to
define at least one trigger for the action
– Triggers are a sub-resource of an Action in the REST
resource hierarchy
•A trigger:
– Maps an internal event within the platform onto
the target action
– Defines a common set of metadata
v Name
v Id
v Description
v Type
v VariableMappings
v Configuration
v Enabled
v Etc…
Trigger
{
"id": "5848040f6522050001db0e20",
"name" : "My Rule Trigger",
"description" : "An example rule trigger",
"type": "rule",
"enabled": true,
"variableMappings": {
"someValue": "myHeaderValue",
"theId": "$event.state.equipmentId",
"theData": "$event.state.temperatureReading"
},
"configuration": {
…
},
"adminDisabled": false,
"adminDisabledReason": null,
"created": "2018-01-30T13:00:00Z",
"createdBy": "john.doe@us.ibm.com",
"updated": "2018-01-30T14:00:00Z",
"updatedBy": "fred.bloggs@uk.ibm.com"
}
22. IBM Watson Internet of Things
Resources – Triggers
•The Trigger resource is polymorphic
Trigger
{
"id": "5848040f6522050001db0e20",
"name" : "My Rule Trigger",
"description" : "An example rule trigger",
"type": "rule",
"enabled": true,
"variableMappings": {
"someValue": "myHeaderValue",
"theId": "$event.state.equipmentId",
"theData": "$event.state.temperatureReading"
},
"configuration": {
…
},
"adminDisabled": false,
"adminDisabledReason": null,
"created": "2018-01-30T13:00:00Z",
"createdBy": "john.doe@us.ibm.com",
"updated": "2018-01-30T14:00:00Z",
"updatedBy": "fred.bloggs@uk.ibm.com"
}
23. IBM Watson Internet of Things
Resources – Triggers
•The Trigger resource is polymorphic
•The type of the trigger is defined by the type
property
Trigger
{
"id": "5848040f6522050001db0e20",
"name" : "My Rule Trigger",
"description" : "An example rule trigger",
"type": "rule",
"enabled": true,
"variableMappings": {
"someValue": "myHeaderValue",
"theId": "$event.state.equipmentId",
"theData": "$event.state.temperatureReading"
},
"configuration": {
…
},
"adminDisabled": false,
"adminDisabledReason": null,
"created": "2018-01-30T13:00:00Z",
"createdBy": "john.doe@us.ibm.com",
"updated": "2018-01-30T14:00:00Z",
"updatedBy": "fred.bloggs@uk.ibm.com"
}
24. IBM Watson Internet of Things
Resources – Triggers
•The Trigger resource is polymorphic
•The type of the trigger is defined by the type
property
•The value of the configuration property varies
depending on the type of the trigger
Trigger
{
"id": "5848040f6522050001db0e20",
"name" : "My Rule Trigger",
"description" : "An example rule trigger",
"type": "rule",
"enabled": true,
"variableMappings": {
"someValue": "myHeaderValue",
"theId": "$event.state.equipmentId",
"theData": "$event.state.temperatureReading"
},
"configuration": {
…
},
"adminDisabled": false,
"adminDisabledReason": null,
"created": "2018-01-30T13:00:00Z",
"createdBy": "john.doe@us.ibm.com",
"updated": "2018-01-30T14:00:00Z",
"updatedBy": "fred.bloggs@uk.ibm.com"
}
25. IBM Watson Internet of Things
Resources – Rule Triggers
•A Rule Trigger invokes an Action when an
embedded rule fires
Trigger
{
"id": "5848040f6522050001db0e20",
"name" : "My Rule Trigger",
"description" : "An example rule trigger",
"type": "rule",
"enabled": true,
"variableMappings": {
"someValue": "myHeaderValue",
"theId": "$event.state.equipmentId",
"theData": "$event.state.temperatureReading"
},
"configuration": {
"logicalInterfaceId": "123456789012345678901234",
"ruleId": "098765432109876543210987",
"type": "device",
"typeId": "TempSensor",
"instanceId": "ts001"
},
"adminDisabled": false,
"adminDisabledReason": null,
"created": "2018-01-30T13:00:00Z",
"createdBy": "john.doe@us.ibm.com",
"updated": "2018-01-30T14:00:00Z",
"updatedBy": "fred.bloggs@uk.ibm.com"
}
Rule
Trigger
26. IBM Watson Internet of Things
Resources – Rule Triggers
•A Rule Trigger invokes an Action when an
embedded rule fires
•The configuration property must define the
following properties:
– logicalInterfaceId
– ruleId
v A wildcard (*) can be specified for the ruleId property
v Specifies that the action will be invoked if any of the
rule on the logical interface fire
– type
v One of device, thing or *
– typeId
v The id of the device or thing type or *
– instanceId
v The id of the device or thing or *
Trigger
{
"id": "5848040f6522050001db0e20",
"name" : "My Rule Trigger",
"description" : "An example rule trigger",
"type": "rule",
"enabled": true,
"variableMappings": {
"someValue": "myHeaderValue",
"theId": "$event.state.equipmentId",
"theData": "$event.state.temperatureReading"
},
"configuration": {
"logicalInterfaceId": "123456789012345678901234",
"ruleId": "098765432109876543210987",
"type": "device",
"typeId": "TempSensor",
"instanceId": "ts001"
},
"adminDisabled": false,
"adminDisabledReason": null,
"created": "2018-01-30T13:00:00Z",
"createdBy": "john.doe@us.ibm.com",
"updated": "2018-01-30T14:00:00Z",
"updatedBy": "fred.bloggs@uk.ibm.com"
}
Rule
Trigger
27. IBM Watson Internet of Things
Resources – State Triggers (future)
•A State Trigger invokes an Action when the state
of a Device/Thing changes
Trigger
{
"id": "5848040f6522050001db0e20",
"name" : "My Rule Trigger",
"description" : "An example rule trigger",
"type": "state",
"enabled": true,
"variableMappings": {
"someValue": "myHeaderValue",
"theId": "$event.state.equipmentId",
"theData": "$event.state.temperatureReading"
},
"configuration": {
"logicalInterfaceId": "123456789012345678901234",
"type": "device",
"typeId": "TempSensor",
"instanceId": "ts001"
},
"adminDisabled": false,
"adminDisabledReason": null,
"created": "2018-01-30T13:00:00Z",
"createdBy": "john.doe@us.ibm.com",
"updated": "2018-01-30T14:00:00Z",
"updatedBy": "fred.bloggs@uk.ibm.com"
}
State
Trigger
28. IBM Watson Internet of Things
Resources – State Triggers (future)
•A State Trigger invokes an Action when the state
of a Device/Thing changes
•The configuration property must define the
following properties:
– logicalInterfaceId
– type
v One of device, thing or *
– typeId
v The id of the device or thing type or *
– instanceId
v The id of the device or thing or *
Trigger
{
"id": "5848040f6522050001db0e20",
"name" : "My Rule Trigger",
"description" : "An example rule trigger",
"type": "state",
"enabled": true,
"variableMappings": {
"someValue": "myHeaderValue",
"theId": "$event.state.equipmentId",
"theData": "$event.state.temperatureReading"
},
"configuration": {
"logicalInterfaceId": "123456789012345678901234",
"type": "device",
"typeId": "TempSensor",
"instanceId": "ts001"
},
"adminDisabled": false,
"adminDisabledReason": null,
"created": "2018-01-30T13:00:00Z",
"createdBy": "john.doe@us.ibm.com",
"updated": "2018-01-30T14:00:00Z",
"updatedBy": "fred.bloggs@uk.ibm.com"
}
State
Trigger
29. IBM Watson Internet of Things
Resources – Trigger Variable Mappings
•The variable mappings defined by a Trigger specify
how to map data from the platform event to the
variables required by the action
Trigger
{
"id": "5848040f6522050001db0e20",
"name" : "My Rule Trigger",
"description" : "An example rule trigger",
"type": "rule",
"enabled": true,
"variableMappings": {
"someValue": "myHeaderValue",
"theId": "$event.state.equipmentId",
"theData": "$event.state.temperatureReading"
},
"configuration": {
…
},
"adminDisabled": false,
"adminDisabledReason": null,
"created": "2018-01-30T13:00:00Z",
"createdBy": "john.doe@us.ibm.com",
"updated": "2018-01-30T14:00:00Z",
"updatedBy": "fred.bloggs@uk.ibm.com"
}
30. IBM Watson Internet of Things
Resources – Trigger Variable Mappings
•The variable mappings defined by a Trigger specify
how to map data from the platform event to the
variables required by the action
•The keys are the names of the variables defined in
the action configuration
Trigger
{
"id": "5848040f6522050001db0e20",
"name" : "My Rule Trigger",
"description" : "An example rule trigger",
"type": "rule",
"enabled": true,
"variableMappings": {
"someValue": "myHeaderValue",
"theId": "$event.state.equipmentId",
"theData": "$event.state.temperatureReading"
},
"configuration": {
…
},
"adminDisabled": false,
"adminDisabledReason": null,
"created": "2018-01-30T13:00:00Z",
"createdBy": "john.doe@us.ibm.com",
"updated": "2018-01-30T14:00:00Z",
"updatedBy": "fred.bloggs@uk.ibm.com"
}
31. IBM Watson Internet of Things
Resources – Trigger Variable Mappings
•The variable mappings defined by a Trigger specify
how to map data from the platform event to the
variables required by the action
•The keys are the names of the variables defined in
the action configuration
•The values are JSONata expressions
Trigger
{
"id": "5848040f6522050001db0e20",
"name" : "My Rule Trigger",
"description" : "An example rule trigger",
"type": "rule",
"enabled": true,
"variableMappings": {
"someValue": "myHeaderValue",
"theId": "$event.state.equipmentId",
"theData": "$event.state.temperatureReading"
},
"configuration": {
…
},
"adminDisabled": false,
"adminDisabledReason": null,
"created": "2018-01-30T13:00:00Z",
"createdBy": "john.doe@us.ibm.com",
"updated": "2018-01-30T14:00:00Z",
"updatedBy": "fred.bloggs@uk.ibm.com"
}
32. IBM Watson Internet of Things
Agenda
•Overview
•Resources
– Actions
– Triggers
•Actions API Overview
•Triggers API Overview
•Processing Walkthrough
33. IBM Watson Internet of Things
Actions API Overview
•CRUD operations can be performed against the actions resource using the
APIs shown below
•NOTE: The actions resource does not follow the draft/active model used by
other IM resources. You do not need to activate changes in order for them
to be effective.
POST /actions
PUT /actions/{actionId}
DELETE /actions/{actionId}
GET /actions
GET /actions/{actionId}
PATCH /actions/{actionId}
34. IBM Watson Internet of Things
Creating an Action Resource
• In order to create an action you need to perform a HTTP
POST against the /actions resource, as shown below:
• NOTE:
For security reasons, the username and password properties
are obfuscated in the responses to the REST API calls
Action
POST /actions
{
"name" : "My Webhook Action",
"description" : "An example webhook action",
"type": "webhook",
"enabled": true,
"configuration": {
"targetUrl": "http://webhook-sim/abcdef/senddata",
"method": "POST",
"contentType": "application/json",
"username": "john.doe@us.ibm.com",
"password": "passw0rd",
"headers": [ {"name": "mycustomheader", "value": "{{somevalue}}"} ],
"body": "{"id" : {{theId}}, "data": "{{theData}}"}"
}
}
35. IBM Watson Internet of Things
Agenda
•Overview
•Resources
– Actions
– Triggers
•Actions API Overview
•Triggers API Overview
•Processing Walkthrough
36. IBM Watson Internet of Things
Triggers API Overview
•CRUD operations can be performed against the triggers resource using the
APIs shown below
•NOTE: The triggers resource does not follow the draft/active model used by
other IM resources. You do not need to activate changes in order for them
to be effective.
POST /triggers
PUT /triggers/{triggerId}
DELETE /triggers/{triggerId}
GET /triggers
GET /triggers/{triggerId}
37. IBM Watson Internet of Things
Creating a Trigger Resource
• Once an action has been created in the Platform, the
next step is to create a trigger resource
– Triggers are a sub-resource of an action in the REST
resource hierarchy
• In order to create a trigger you need to perform a HTTP
POST against the /actions/{actionId}/triggers resource,
as shown below:
Action
POST /actions/{actionId}/triggers
{
"name" : "My Rule Trigger",
"description" : "An example rule trigger",
"type": "rule",
"enabled": true,
"variableMappings": {
"someValue": "myHeaderValue",
"theId": "$event.state.equipmentId",
"theData": "$event.state.temperatureReading"
},
"configuration": {
"logicalInterfaceId": "123456789012345678901234",
"ruleId": "098765432109876543210987",
"type": "device",
"typeId": "TempSensor",
"instanceId": "ts001"
}
}
Trigger
38. IBM Watson Internet of Things
Agenda
•Overview
•Resources
– Actions
– Triggers
•Actions API Overview
•Triggers API Overview
•Processing Walkthrough
39. IBM Watson Internet of Things
Action-Mgr Service Processing Walkthrough
{
"id": "5848040f6522050001db0e20",
"name" : "My Rule Trigger",
"description" : "An example rule trigger",
"type": "rule",
"enabled": true,
"variableMappings": {
"someValue": "myHeaderValue",
"theId": "$event.state.equipmentId",
"theData": "$event.state.temperatureReading"
},
"configuration": {
"logicalInterfaceId": "123456789012345678901234",
"ruleId": "098765432109876543210987",
"type": "device",
"typeId": "TempSensor",
"instanceId": "ts001"
},
"adminDisabled": false,
"adminDisabledReason": null,
"created": "2018-01-30T13:00:00Z",
"createdBy": "john.doe@us.ibm.com",
"updated": "2018-01-30T14:00:00Z",
"updatedBy": "fred.bloggs@uk.ibm.com"
}
{
"id": "5848040f6522050001db0e20",
"name" : "My Webhook Action",
"description" : "An example webhook action",
"type": "webhook",
"enabled": true,
"configuration": {
"targetUrl": "http://webhook-sim/abcdef/senddata",
"method": "POST",
"contentType": "application/json",
"username": "john.doe@us.ibm.com",
"password": "passw0rd",
"headers": [
{
"name": "mycustomheader",
"value": "{{somevalue}}"
}
],
"body": "{"id" : {{theId}}, "data": "{{theData}}"}"
},
…
}
Rule Trigger Webhook Action
•A rule trigger and webhook action have been created within the platform
50. IBM Watson Internet of Things
Resources – Actions
• Retrieve the list of actions that have been defined for an organization in the Watson IoT
Platform
• The following query parameters are supported:
– _bookmark, _limit, _sort, name, type and enabled
{
"results": [ {
"id": "5848040f6522050001db0e20",
"name" : "My Webhook Action",
"description" : "An example webhook action",
"type": "webhook",
"enabled": true,
"configuration": {
"targetUrl": "http://webhook-sim/abcdef/senddata",
"method": "POST",
"contentType": "application/json",
"username": "john.doe@us.ibm.com",
"password": "passw0rd",
"headers": [ {"name": "mycustomheader", "value": "{{somevalue}}"} ],
"body": "{"id" : {{theId}}, "data": "{{theData}}"}"
},
"adminDisabled": false,
"adminDisabledReason": null,
"created": "2018-01-30T13:00:00Z",
"createdBy": "john.doe@us.ibm.com",
"updated": "2018-01-30T14:00:00Z",
"updatedBy": "fred.bloggs@uk.ibm.com",
"refs": {
"triggers": " /api/v0002/actions/5848040f6522050001db0e20/triggers"
}
} ],
"meta": {
"facets":{},
"total_rows": 1
}
}
GET /actions
51. IBM Watson Internet of Things
Resources – Actions
POST /actions
• Creates a new action for an organization in the Watson IoT Platform
• Example POST:
{
"name" : "My Webhook Action",
"description" : "An example webhook action",
"type": "webhook",
"enabled": true,
"configuration": {
"targetUrl": "http://webhook-sim/abcdef/senddata",
"method": "POST",
"contentType": "application/json",
"username": "john.doe@us.ibm.com",
"password": "passw0rd",
"headers": [ {"name": "mycustomheader", "value": "{{somevalue}}"} ],
"body": "{"id" : {{theId}}, "data": "{{theData}}"}"
}
}
52. IBM Watson Internet of Things
Resources – Actions
POST /actions
• Example response body:
{
"id": "5848040f6522050001db0e20",
"name" : "My Webhook Action",
"description" : "An example webhook action",
"type": "webhook",
"enabled": true,
"configuration": {
"targetUrl": "http://webhook-sim/abcdef/senddata",
"method": "POST",
"contentType": "application/json",
"username": "john.doe@us.ibm.com",
"password": "passw0rd",
"headers": [ {"name": "mycustomheader", "value": "{{somevalue}}"} ],
"body": "{"id" : {{theId}}, "data": "{{theData}}"}"
},
"adminDisabled": false,
"adminDisabledReason": null,
"created": "2018-01-30T13:00:00Z",
"createdBy": "john.doe@us.ibm.com",
"updated": "2018-01-30T14:00:00Z",
"updatedBy": "fred.bloggs@uk.ibm.com",
"refs": {
"triggers": " /api/v0002/actions/5848040f6522050001db0e20/triggers"
}
}
53. IBM Watson Internet of Things
Resources – Actions
• Retrieve the metadata for a specific action
• Example response body:
GET /actions/{actionId}
{
"id": "5848040f6522050001db0e20",
"name" : "My Webhook Action",
"description" : "An example webhook action",
"type": "webhook",
"enabled": true,
"configuration": {
"targetUrl": "http://webhook-sim/abcdef/senddata",
"method": "POST",
"contentType": "application/json",
"username": "john.doe@us.ibm.com",
"password": "passw0rd",
"headers": [ {"name": "mycustomheader", "value": "{{somevalue}}"} ],
"body": "{"id" : {{theId}}, "data": "{{theData}}"}"
},
"adminDisabled": false,
"adminDisabledReason": null,
"created": "2018-01-30T13:00:00Z",
"createdBy": "john.doe@us.ibm.com",
"updated": "2018-01-30T14:00:00Z",
"updatedBy": "fred.bloggs@uk.ibm.com",
"refs": {
"triggers": " /api/v0002/actions/5848040f6522050001db0e20/triggers"
}
}
54. IBM Watson Internet of Things
Resources – Actions
• Perform an operation against the specified action
• Current supported operations are:
– invoke-action
• Example PATCH:
PATCH /actions/{actionId}
{
"operation": "invoke-action"
"variables": {
"someValue": "myHeaderValue",
"theId": "12345",
"theData": "45"
}
}
55. IBM Watson Internet of Things
Resources – Actions
• Example response body:
PATCH /actions/{actionId}
{
"message": "CUDAM0900I: The action 'Invoke Webhook Sim Action' was successfully invoked.",
"details": {
"id": "CUDAM0900I",
"properties": ["Invoke Webhook Sim Action"]
},
"result": {
"actionId": "5c52ec190ec83c004d8e02f1",
"successful": true,
"type": "webhook",
"status": 200,
"headers": {
"connection": "keep-alive",
"content-type": "text/html; charset=utf-8",
"Content-Length": "20",
"Date": "Thu, 31 Jan 2019 12:37:46 GMT",
"X-Powered-By": "Express"
},
"contentType": "text/html; charset=utf-8",
"body": "{ "success" : true }"
}
}
56. IBM Watson Internet of Things
Resources – Actions
• Update the metadata for an action
• The following metadata properties can be updated
– name
– description
– configuration
– enabled
PUT /actions/{actionId}
• Delete an action
DELETE /actions/{actionId}
57. IBM Watson Internet of Things
Resources – Triggers
• Retrieve the list of triggers that have been defined for an action
• The following query parameters are supported:
– _bookmark, _limit, _sort, name, type and enabled
{
"results": [ {
"id": "5848040f6522050001db0e20",
"name" : "My Rule Trigger",
"description" : "An example rule trigger",
"type": "rule",
"enabled": true,
"variableMappings": {
"someValue": "myHeaderValue",
"theId": "$event.state.equipmentId",
"theData": "$event.state.temperatureReading"
},
"configuration": {
"logicalInterfaceId": "123456789012345678901234",
"ruleId": "098765432109876543210987",
"type": "device",
"typeId": "TempSensor",
"instanceId": "ts001"
},
"adminDisabled": false,
"adminDisabledReason": null,
"created": "2018-01-30T13:00:00Z",
"createdBy": "john.doe@us.ibm.com",
"updated": "2018-01-30T14:00:00Z",
"updatedBy": "fred.bloggs@uk.ibm.com"
} ],
"meta": {
"facets": {},
"total_rows": 1
}
}
GET /actions/{actionId}/triggers
58. IBM Watson Internet of Things
Resources – Triggers
POST /actions/{actionId}/triggers
• Creates a new trigger for an action
• Example POST:
{
"name" : "My Rule Trigger",
"description" : "An example rule trigger",
"type": "rule",
"enabled": true,
"variableMappings": {
"someValue": "myHeaderValue",
"theId": "$event.state.equipmentId",
"theData": "$event.state.temperatureReading"
},
"configuration": {
"logicalInterfaceId": "123456789012345678901234",
"ruleId": "098765432109876543210987",
"type": "device",
"typeId": "TempSensor",
"instanceId": "ts001"
}
}
59. IBM Watson Internet of Things
Resources – Triggers
POST /actions/{actionId}/triggers
• Example response body:
{
"id": "5848040f6522050001db0e20",
"name" : "My Rule Trigger",
"description" : "An example rule trigger",
"type": "rule",
"enabled": true,
"variableMappings": {
"someValue": "myHeaderValue",
"theId": "$event.state.equipmentId",
"theData": "$event.state.temperatureReading"
},
"configuration": {
"logicalInterfaceId": "123456789012345678901234",
"ruleId": "098765432109876543210987",
"type": "device",
"typeId": "TempSensor",
"instanceId": "ts001"
},
"adminDisabled": false,
"adminDisabledReason": null,
"created": "2018-01-30T13:00:00Z",
"createdBy": "john.doe@us.ibm.com",
"updated": "2018-01-30T14:00:00Z",
"updatedBy": "fred.bloggs@uk.ibm.com"
}
60. IBM Watson Internet of Things
Resources – Triggers
• Retrieve the metadata for a specific trigger
• Example response body:
GET /actions/{actionId}/triggers/{triggerId}
{
"id": "5848040f6522050001db0e20",
"name" : "My Rule Trigger",
"description" : "An example rule trigger",
"type": "rule",
"enabled": true,
"variableMappings": {
"someValue": "myHeaderValue",
"theId": "$event.state.equipmentId",
"theData": "$event.state.temperatureReading"
},
"configuration": {
"logicalInterfaceId": "123456789012345678901234",
"ruleId": "098765432109876543210987",
"type": "device",
"typeId": "TempSensor",
"instanceId": "ts001"
},
"adminDisabled": false,
"adminDisabledReason": null,
"created": "2018-01-30T13:00:00Z",
"createdBy": "john.doe@us.ibm.com",
"updated": "2018-01-30T14:00:00Z",
"updatedBy": "fred.bloggs@uk.ibm.com"
}
61. IBM Watson Internet of Things
Resources – Triggers
• Update the metadata for a trigger
• The following metadata properties can be updated
– name
– description
– configuration
– variableMappings
– enabled
PUT /actions/{actionId}/triggers/{triggerId}
• Delete a trigger
DELETE /actions/{actionId}/triggers/{triggerId}