blob: 5c1866a5073f632819011cae94fc626d57a1ef23 [file] [log] [blame]
<!DOCTYPE html>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="keywords" content="blog, ">
<title> Example demonstrating REST and WebSocket API </title>
<link rel="stylesheet" href="css/syntax.css">
<link rel="stylesheet" type="text/css" href="//" crossorigin="anonymous">
<link rel="stylesheet" href="css/modern-business.css">
<link rel="stylesheet" href="//" crossorigin="anonymous">
<link rel="stylesheet" href="css/customstyles.css">
<link rel="stylesheet" href="css/boxshadowproperties.css">
<link rel="stylesheet" href="css/theme-ditto.css">
<link rel="stylesheet" href=",700|Source+Code+Pro:300,600|Titillium+Web:400,600,700">
<script src="//" crossorigin="anonymous"></script>
<script src="//" crossorigin="anonymous"></script>
<script src="//" crossorigin="anonymous"></script>
<script src="js/toc.js"></script>
<script src="js/customscripts.js"></script>
<script type="application/ld+json">
"@context": "",
"@type": "Organization",
"url": "",
"logo": ""
<link rel="icon" type="image/png" href="images/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="images/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="images/favicon-96x96.png" sizes="96x96">
<link rel="alternate" type="application/rss+xml" title="Eclipse Ditto Blog" href="">
<!-- Eclipse Foundation cookie consent: -->
<link rel="stylesheet" type="text/css" href="//" />
<script src="//"></script>
$(document).ready(function() {
$("#tg-sb-link").click(function() {
new Date().getTime(),event:'gtm.js'});
var f=d.getElementsByTagName(s)[0],
<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container topnavlinks">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<a class="navbar-ditto-home" href="index.html">&nbsp;<img src="images/ditto_allwhite_symbolonly.svg" class="ditto-navbar-symbol" alt="Home"> <img src="images/ditto_allwhite_textonly.svg" class="ditto-navbar-symbol-text" alt="Ditto"></a>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<!-- toggle sidebar button -->
<!--<li><a id="tg-sb-link" href="#"><i id="tg-sb-icon" class="fa fa-toggle-on"></i> Nav</a></li>-->
<!-- entries without drop-downs appear here -->
<li><a href="blog.html">Blog</a></li>
<li><a href="intro-overview.html">Documentation</a></li>
<li><a href="http-api-doc.html">HTTP API</a></li>
<li><a href="sandbox.html">Sandbox</a></li>
<li><a href="" target="_blank">GitHub</a></li>
<li><a href="" target="_blank">GitHub examples</a></li>
<!-- entries with drop-downs appear here -->
<!-- conditional logic to control which topnav appears for the audience defined in the configuration file.-->
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Links<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="" target="_blank">Eclipse Ditto Project</a></li>
<li><a href="" target="_blank">Forum</a></li>
<li><a href="" target="_blank">Jenkins</a></li>
<li><a href="" target="_blank">Mailing list archives</a></li>
<li><a href="" target="_blank"> chat</a></li>
<!--comment out this block if you want to hide search-->
<!--start search-->
<div id="search-demo-container">
<input type="text" id="search-input" placeholder="search...">
<ul id="results-container"></ul>
<script src="//" type="text/javascript"></script>
<script type="text/javascript">
searchInput: document.getElementById('search-input'),
resultsContainer: document.getElementById('results-container'),
dataSource: 'search.json',
searchResultTemplate: '<li><a href="{url}" title="Example demonstrating REST and WebSocket API">{title}</a></li>',
noResultsText: 'No results found.',
limit: 10,
fuzzy: true,
<!--end search-->
<!-- /.container -->
<!-- Page Content -->
<div class="container">
<div id="main">
<!-- Content Row -->
<div class="row">
<!-- Content Column -->
<div class="col-md-12" id="tg-sb-content">
<!-- Look the author details up from the site config. -->
<!-- Output author details if some exist. -->
<!-- Output author details if some exist. -->
<!--&lt;!&ndash; Mugshot. &ndash;&gt;-->
<!--<img src="" alt="A photo of Florian Fendt" />-->
<!--&lt;!&ndash; Personal Info. &ndash;&gt;-->
<!--Written by <a href="" target="_blank">Florian Fendt</a>-->
<article class="post" itemscope itemtype="">
<header class="post-header">
<h1 class="post-title" itemprop="name headline">Example demonstrating REST and WebSocket API</h1>
<p class="post-meta">Published by <img src="" alt="A photo of Florian Fendt" style="width:50px;border-radius:50%;display:inline-block;margin-right:5px;" /><span itemprop="author" itemscope itemtype=""><span itemprop="name"><a href="" target="_blank">Florian Fendt</a> </span></span> on <time datetime="2018-01-15T00:00:00+00:00" itemprop="datePublished">Jan 15, 2018</time> - Tags:
<a href="tag_blog.html">blog</a>
<div class="post-content" itemprop="articleBody">
<p>There’s a new example showing how to combine the REST and WebSocket API
over at the <a href="">Eclipse Ditto examples repository</a>.
Right from the project’s description:</p>
<p>This example shows how to leverage the powers of combining the REST and
WebSocket Messages API of <a href="">Eclipse Ditto</a>.
It demonstrates how to send direct Messages to a <em>live</em> Thing, as well as
updating the <em>twin</em> representation of a Thing inside Ditto.
<br />
<br />
The Thing in this case is a smart coffee machine (“SmartCoffee”) that has
some basic functionality. It accepts Messages that allow to start or stop
the heating of the water tank. Moreover you can request the coffee
machine to brew coffee, so you don’t have to wait for your dose of caffeine.<br />
But before starting to brew a coffee, SmartCoffee will send a captcha
that has to be solved.</p>
<figure><img class="docimage" src="" alt="Eclipse Ditto REST to WebSocket example gif" style="max-width: 800px" /><figcaption>Source:</figcaption></figure>
<p>If you have any wishes, improvements, are missing something
or just want to get in touch with us, you can use one of
our <a href="">feedback channels</a>.</p>
<figure><img class="docimage" src="images/ditto.svg" alt="Ditto" style="max-width: 500px" /></figure>
<p><br />
The Eclipse Ditto team</p>
<hr class="shaded"/>
<div class="row">
<div class="col-lg-12 footer">
<div class="logo">
<a href=""><img src="images/eclipse_foundation_logo.svg" alt="Eclipse logo"/></a>
<p class="notice">
&copy;2020 Eclipse Ditto.
Site last generated: Dec 9, 2020 <br />
<div class="quickLinks">
<a href="" target="_blank">
&gt; Privacy Policy
<a href="" target="_blank">
&gt; Terms of Use
<a href="" target="_blank">
&gt; Copyright Agent
<a href="" target="_blank">
&gt; Legal
<a href="" target="_blank">
&gt; License
<a href="" target="_blank">
&gt; Report a Vulnerability
<!-- /.row -->
<!-- /.container -->
<!-- /#main -->