blob: bd9fac2ceb3a9fcecc562629ad6654394ccd7533 [file] [log] [blame]
<!DOCTYPE html>
<html lang="1.3" class="js csstransforms3d">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="Hugo 0.81.0" />
<meta name="description" content="A set of micro-services for connecting millions of devices.">
<meta name="author" content="The Eclipse Hono Project">
<link rel="apple-touch-icon" sizes="180x180" href="/hono/docs/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="48x48" href="/hono/docs/favicon/favicon-48x48.png">
<link rel="icon" type="image/png" sizes="32x32" href="/hono/docs/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/hono/docs/favicon/favicon-16x16.png">
<link rel="manifest" href="/hono/docs/favicon/site.webmanifest">
<link rel="mask-icon" href="/hono/docs/favicon/safari-pinned-tab.svg" color="#5bbad5">
<link rel="shortcut icon" href="/hono/docs/favicon/favicon.ico">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-config" content="/hono/docs/favicon/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<title>Tenant API Specification :: Eclipse Hono&trade; Vers.: 1.3</title>
<link href="/hono/docs/css/nucleus.css?1626138729" rel="stylesheet">
<link href="/hono/docs/css/fontawesome-all.min.css?1626138729" rel="stylesheet">
<link href="/hono/docs/css/hybrid.css?1626138729" rel="stylesheet">
<link href="/hono/docs/css/featherlight.min.css?1626138729" rel="stylesheet">
<link href="/hono/docs/css/perfect-scrollbar.min.css?1626138729" rel="stylesheet">
<link href="/hono/docs/css/auto-complete.css?1626138729" rel="stylesheet">
<link href="/hono/docs/css/atom-one-dark-reasonable.css?1626138729" rel="stylesheet">
<link href="/hono/docs/css/theme.css?1626138729" rel="stylesheet">
<link href="/hono/docs/css/hugo-theme.css?1626138729" rel="stylesheet">
<link href="/hono/docs/css/theme-hono.css?1626138729" rel="stylesheet">
<link href="/hono/docs/css/hono.css?1626138729" rel="stylesheet">
<script src="/hono/docs/js/jquery-3.3.1.min.js?1626138729"></script>
<style>
:root #header + #content > #left > #rlblock_left{
display:none !important;
}
:not(pre) > code + span.copy-to-clipboard {
display: none;
}
</style>
<link rel="stylesheet" href="https://www.eclipse.org/eclipse.org-common/themes/solstice/public/stylesheets/vendor/cookieconsent/cookieconsent.min.css">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@EclipseHono">
<meta name="twitter:title" content="Tenant API Specification :: Eclipse Hono&amp;trade; Vers.: 1.3">
<meta name="twitter:image" content="https://www.eclipse.org/hono/docs/images/twitter_image.png">
<meta name="twitter:description" content="A set of micro-services for connecting millions of devices.">
<meta property="og:title" content="Tenant API Specification :: Eclipse Hono&amp;trade; Vers.: 1.3" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://www.eclipse.org/hono/docs/1.3/api/tenant//" />
<meta property="og:image" content="https://www.eclipse.org/hono/docs/images/twitter_image.png" />
</head>
<body class="" data-url="/hono/docs/1.3/api/tenant/">
<nav id="sidebar" class="">
<div id="header-wrapper">
<div id="header">
<a href="https://www.eclipse.org/hono/">
<img src="/hono/docs/images/HONO-Logo_Bild-Wort_quer-w-310x120px.svg" alt="Hono logo" class="logo-img">
</a>
</div>
<div class="searchbox">
<label for="search-by"><i class="fas fa-search"></i></label>
<input data-search-input id="search-by" type="search" placeholder="Search...">
<span data-search-clear=""><i class="fas fa-times"></i></span>
</div>
<script type="text/javascript" src="/hono/docs/js/lunr.min.js?1626138729"></script>
<script type="text/javascript" src="/hono/docs/js/auto-complete.js?1626138729"></script>
<script type="text/javascript">
var baseurl = "https:\/\/www.eclipse.org\/hono\/docs\/\/1.3";
</script>
<script type="text/javascript" src="/hono/docs/js/search.js?1626138729"></script>
</div>
<div class="highlightable">
<ul class="topics">
<li data-nav-id="/hono/docs/1.3/concepts/" title="Concepts" class="dd-item
">
<a href="/hono/docs/1.3/concepts/">
<i class="far fa-lightbulb"></i> Concepts
</a>
<ul>
<li data-nav-id="/hono/docs/1.3/concepts/device-identity/" title="Device Identity" class="dd-item ">
<a href="/hono/docs/1.3/concepts/device-identity/">
Device Identity
</a>
</li>
<li data-nav-id="/hono/docs/1.3/concepts/tenancy/" title="Multi-Tenancy" class="dd-item ">
<a href="/hono/docs/1.3/concepts/tenancy/">
Multi-Tenancy
</a>
</li>
<li data-nav-id="/hono/docs/1.3/concepts/device-provisioning/" title="Device Provisioning" class="dd-item ">
<a href="/hono/docs/1.3/concepts/device-provisioning/">
Device Provisioning
</a>
</li>
<li data-nav-id="/hono/docs/1.3/concepts/connecting-devices/" title="Connecting Devices" class="dd-item ">
<a href="/hono/docs/1.3/concepts/connecting-devices/">
Connecting Devices
</a>
</li>
<li data-nav-id="/hono/docs/1.3/concepts/device-notifications/" title="Device Notifications" class="dd-item ">
<a href="/hono/docs/1.3/concepts/device-notifications/">
Device Notifications
</a>
</li>
<li data-nav-id="/hono/docs/1.3/concepts/command-and-control/" title="Command &amp; Control" class="dd-item ">
<a href="/hono/docs/1.3/concepts/command-and-control/">
Command &amp; Control
</a>
</li>
<li data-nav-id="/hono/docs/1.3/concepts/resource-limits/" title="Resource limits" class="dd-item ">
<a href="/hono/docs/1.3/concepts/resource-limits/">
Resource limits
</a>
</li>
<li data-nav-id="/hono/docs/1.3/concepts/connection-events/" title="Connection Events" class="dd-item ">
<a href="/hono/docs/1.3/concepts/connection-events/">
Connection Events
</a>
</li>
</ul>
</li>
<li data-nav-id="/hono/docs/1.3/user-guide/" title="User Guide" class="dd-item
">
<a href="/hono/docs/1.3/user-guide/">
<i class="fas fa-book-reader"></i> User Guide
</a>
<ul>
<li data-nav-id="/hono/docs/1.3/user-guide/mongodb-based-device-registry/" title="MongoDB Based Device Registry" class="dd-item ">
<a href="/hono/docs/1.3/user-guide/mongodb-based-device-registry/">
MongoDB Based Device Registry
</a>
</li>
<li data-nav-id="/hono/docs/1.3/user-guide/file-based-device-registry/" title="File Based Device Registry" class="dd-item ">
<a href="/hono/docs/1.3/user-guide/file-based-device-registry/">
File Based Device Registry
</a>
</li>
<li data-nav-id="/hono/docs/1.3/user-guide/http-adapter/" title="HTTP Adapter" class="dd-item ">
<a href="/hono/docs/1.3/user-guide/http-adapter/">
HTTP Adapter
</a>
</li>
<li data-nav-id="/hono/docs/1.3/user-guide/mqtt-adapter/" title="MQTT Adapter" class="dd-item ">
<a href="/hono/docs/1.3/user-guide/mqtt-adapter/">
MQTT Adapter
</a>
</li>
<li data-nav-id="/hono/docs/1.3/user-guide/amqp-adapter/" title="AMQP Adapter" class="dd-item ">
<a href="/hono/docs/1.3/user-guide/amqp-adapter/">
AMQP Adapter
</a>
</li>
<li data-nav-id="/hono/docs/1.3/user-guide/coap-adapter/" title="CoAP Adapter" class="dd-item ">
<a href="/hono/docs/1.3/user-guide/coap-adapter/">
CoAP Adapter
</a>
</li>
<li data-nav-id="/hono/docs/1.3/user-guide/kura-adapter/" title="Kura Adapter" class="dd-item ">
<a href="/hono/docs/1.3/user-guide/kura-adapter/">
Kura Adapter
</a>
</li>
<li data-nav-id="/hono/docs/1.3/user-guide/sigfox-adapter/" title="Sigfox Adapter" class="dd-item ">
<a href="/hono/docs/1.3/user-guide/sigfox-adapter/">
Sigfox Adapter
</a>
</li>
<li data-nav-id="/hono/docs/1.3/user-guide/jmeter_load_tests/" title="Load Tests with JMeter" class="dd-item ">
<a href="/hono/docs/1.3/user-guide/jmeter_load_tests/">
Load Tests with JMeter
</a>
</li>
</ul>
</li>
<li data-nav-id="/hono/docs/1.3/admin-guide/" title="Admin Guide" class="dd-item
">
<a href="/hono/docs/1.3/admin-guide/">
<i class="fas fa-sliders-h"></i> Admin Guide
</a>
<ul>
<li data-nav-id="/hono/docs/1.3/admin-guide/common-config/" title="Common Configuration" class="dd-item ">
<a href="/hono/docs/1.3/admin-guide/common-config/">
Common Configuration
</a>
</li>
<li data-nav-id="/hono/docs/1.3/admin-guide/auth-server-config/" title="Auth Server Configuration" class="dd-item ">
<a href="/hono/docs/1.3/admin-guide/auth-server-config/">
Auth Server Configuration
</a>
</li>
<li data-nav-id="/hono/docs/1.3/admin-guide/mongodb-device-registry-config/" title="MongoDB Based Device Registry Configuration" class="dd-item ">
<a href="/hono/docs/1.3/admin-guide/mongodb-device-registry-config/">
MongoDB Based Device Registry Configuration
</a>
</li>
<li data-nav-id="/hono/docs/1.3/admin-guide/file-based-device-registry-config/" title="File Based Device Registry Configuration" class="dd-item ">
<a href="/hono/docs/1.3/admin-guide/file-based-device-registry-config/">
File Based Device Registry Configuration
</a>
</li>
<li data-nav-id="/hono/docs/1.3/admin-guide/device-connection-config/" title="Configuring the Device Connection Service" class="dd-item ">
<a href="/hono/docs/1.3/admin-guide/device-connection-config/">
Device Connection Service Configuration
</a>
</li>
<li data-nav-id="/hono/docs/1.3/admin-guide/http-adapter-config/" title="HTTP Adapter Configuration" class="dd-item ">
<a href="/hono/docs/1.3/admin-guide/http-adapter-config/">
HTTP Adapter Configuration
</a>
</li>
<li data-nav-id="/hono/docs/1.3/admin-guide/mqtt-adapter-config/" title="MQTT Adapter Configuration" class="dd-item ">
<a href="/hono/docs/1.3/admin-guide/mqtt-adapter-config/">
MQTT Adapter Configuration
</a>
</li>
<li data-nav-id="/hono/docs/1.3/admin-guide/amqp-adapter-config/" title="AMQP Adapter Configuration" class="dd-item ">
<a href="/hono/docs/1.3/admin-guide/amqp-adapter-config/">
AMQP Adapter Configuration
</a>
</li>
<li data-nav-id="/hono/docs/1.3/admin-guide/coap-adapter-config/" title="CoAP Adapter Configuration" class="dd-item ">
<a href="/hono/docs/1.3/admin-guide/coap-adapter-config/">
CoAP Adapter Configuration
</a>
</li>
<li data-nav-id="/hono/docs/1.3/admin-guide/kura-adapter-config/" title="Kura Adapter Configuration" class="dd-item ">
<a href="/hono/docs/1.3/admin-guide/kura-adapter-config/">
Kura Adapter Configuration
</a>
</li>
<li data-nav-id="/hono/docs/1.3/admin-guide/hono-client-configuration/" title="Hono Client Configuration" class="dd-item ">
<a href="/hono/docs/1.3/admin-guide/hono-client-configuration/">
Hono Client Configuration
</a>
</li>
<li data-nav-id="/hono/docs/1.3/admin-guide/amqp-network-config/" title="AMQP 1.0 Messaging Network Configuration" class="dd-item ">
<a href="/hono/docs/1.3/admin-guide/amqp-network-config/">
AMQP 1.0 Messaging Network Configuration
</a>
</li>
<li data-nav-id="/hono/docs/1.3/admin-guide/secure_communication/" title="Secure Communication" class="dd-item ">
<a href="/hono/docs/1.3/admin-guide/secure_communication/">
Secure Communication
</a>
</li>
<li data-nav-id="/hono/docs/1.3/admin-guide/monitoring-tracing-config/" title="Monitoring &amp; Tracing" class="dd-item ">
<a href="/hono/docs/1.3/admin-guide/monitoring-tracing-config/">
Monitoring &amp; Tracing
</a>
</li>
</ul>
</li>
<li data-nav-id="/hono/docs/1.3/dev-guide/" title="Developer Guide" class="dd-item
">
<a href="/hono/docs/1.3/dev-guide/">
<i class="fas fa-tools"></i> Developer Guide
</a>
<ul>
<li data-nav-id="/hono/docs/1.3/dev-guide/building_hono/" title="Building from Source" class="dd-item ">
<a href="/hono/docs/1.3/dev-guide/building_hono/">
Building from Source
</a>
</li>
<li data-nav-id="/hono/docs/1.3/dev-guide/amqp_adapter_client/" title="AMQP Adapter Client for Java" class="dd-item ">
<a href="/hono/docs/1.3/dev-guide/amqp_adapter_client/">
AMQP Adapter Client for Java
</a>
</li>
<li data-nav-id="/hono/docs/1.3/dev-guide/java_client_consumer/" title="Consuming Messages from Java" class="dd-item ">
<a href="/hono/docs/1.3/dev-guide/java_client_consumer/">
Consuming Messages from Java
</a>
</li>
<li data-nav-id="/hono/docs/1.3/dev-guide/custom_http_adapter/" title="Implement a Custom Hono HTTP Protocol Adapter" class="dd-item ">
<a href="/hono/docs/1.3/dev-guide/custom_http_adapter/">
Implement a Custom Hono HTTP Protocol Adapter
</a>
</li>
</ul>
</li>
<li data-nav-id="/hono/docs/1.3/api/" title="API" class="dd-item
parent
">
<a href="/hono/docs/1.3/api/">
&nbsp;<i class='fas fa-plug'></i>&nbsp;API
</a>
<ul>
<li data-nav-id="/hono/docs/1.3/api/telemetry/" title="Telemetry API Specification" class="dd-item ">
<a href="/hono/docs/1.3/api/telemetry/">
Telemetry API
</a>
</li>
<li data-nav-id="/hono/docs/1.3/api/event/" title="Event API Specification" class="dd-item ">
<a href="/hono/docs/1.3/api/event/">
Event API
</a>
</li>
<li data-nav-id="/hono/docs/1.3/api/command-and-control/" title="Command &amp; Control API Specification" class="dd-item ">
<a href="/hono/docs/1.3/api/command-and-control/">
Command &amp; Control API
</a>
</li>
<li data-nav-id="/hono/docs/1.3/api/tenant/" title="Tenant API Specification" class="dd-item active">
<a href="/hono/docs/1.3/api/tenant/">
Tenant API
</a>
</li>
<li data-nav-id="/hono/docs/1.3/api/device-connection/" title="Device Connection API Specification" class="dd-item ">
<a href="/hono/docs/1.3/api/device-connection/">
Device Connection API
</a>
</li>
<li data-nav-id="/hono/docs/1.3/api/device-registration/" title="Device Registration API Specification" class="dd-item ">
<a href="/hono/docs/1.3/api/device-registration/">
Device Registration API
</a>
</li>
<li data-nav-id="/hono/docs/1.3/api/credentials/" title="Credentials API Specification" class="dd-item ">
<a href="/hono/docs/1.3/api/credentials/">
Credentials API
</a>
</li>
<li data-nav-id="/hono/docs/1.3/api/authentication/" title="Authentication API Specification" class="dd-item ">
<a href="/hono/docs/1.3/api/authentication/">
Authentication API
</a>
</li>
<li data-nav-id="/hono/docs/1.3/api/management/" title="Device Registry Management API Specification" class="dd-item ">
<a href="/hono/docs/1.3/api/management/">
Device Registry Management API
</a>
</li>
<li data-nav-id="/hono/docs/1.3/api/metrics/" title="Metrics" class="dd-item ">
<a href="/hono/docs/1.3/api/metrics/">
Metrics
</a>
</li>
</ul>
</li>
<li data-nav-id="/hono/docs/1.3/deployment/" title="Deployment" class="dd-item
">
<a href="/hono/docs/1.3/deployment/">
<i class="fas fa-shipping-fast"></i> Deployment
</a>
<ul>
<li data-nav-id="/hono/docs/1.3/deployment/helm-based-deployment/" title="Helm based Deployment" class="dd-item ">
<a href="/hono/docs/1.3/deployment/helm-based-deployment/">
Helm based Deployment
</a>
</li>
<li data-nav-id="/hono/docs/1.3/deployment/openshift/" title="OpenShift / OKD" class="dd-item ">
<a href="/hono/docs/1.3/deployment/openshift/">
OpenShift / OKD
</a>
</li>
<li data-nav-id="/hono/docs/1.3/deployment/create-kubernetes-cluster/" title="Setting up a Kubernetes Cluster" class="dd-item ">
<a href="/hono/docs/1.3/deployment/create-kubernetes-cluster/">
Setting up a Kubernetes Cluster
</a>
</li>
<li data-nav-id="/hono/docs/1.3/deployment/resource-limitation/" title="Limiting Resource Usage" class="dd-item ">
<a href="/hono/docs/1.3/deployment/resource-limitation/">
Limiting Resource Usage
</a>
</li>
</ul>
</li>
<li data-nav-id="/hono/docs/1.3/architecture/" title="Architecture" class="dd-item
">
<a href="/hono/docs/1.3/architecture/">
<i class="fas fa-landmark"></i> Architecture
</a>
<ul>
<li data-nav-id="/hono/docs/1.3/architecture/component-view/" title="Component View" class="dd-item ">
<a href="/hono/docs/1.3/architecture/component-view/">
Component View
</a>
</li>
<li data-nav-id="/hono/docs/1.3/architecture/auth/" title="Authentication/Authorization" class="dd-item ">
<a href="/hono/docs/1.3/architecture/auth/">
Authentication/Authorization
</a>
</li>
</ul>
</li>
</ul>
<section id="shortcuts">
<h3></h3>
<ul>
<li>
<a class="padding" href="https://www.eclipse.org/hono/" title="Hono&#39;s Homepage"><i class='fas fa-home'></i> Hono Home</a>
</li>
<li>
<a class="padding" href="https://www.eclipse.org/hono/getting-started/" title="Getting started with Eclipse Hono"><i class='fas fa-plane-departure'></i> Getting Started</a>
</li>
</ul>
</section>
<section id="prefooter">
<hr/>
<ul>
<li>
<div id="select-box-wrapper">
<div id="select-box">
<a class="padding">
Version:&nbsp;
<div class="select-style">
<select id="select-language" onchange="location = this.value;">
<option id="stable" value="https://www.eclipse.org/hono/docs/api/tenant/">stable (1.8)</option>
<option id="1.8" value="https://www.eclipse.org/hono/docs/1.8/api/tenant/">1.8</option>
<option id="1.7" value="https://www.eclipse.org/hono/docs/1.7/api/tenant/">1.7</option>
<option id="1.6" value="https://www.eclipse.org/hono/docs/1.6/api/tenant/">1.6</option>
<option id="1.5" value="https://www.eclipse.org/hono/docs/1.5/api/tenant/">1.5</option>
<option id="1.4" value="https://www.eclipse.org/hono/docs/1.4/api/tenant/">1.4</option>
<option id="1.3" value="https://www.eclipse.org/hono/docs/1.3/api/tenant/" selected>1.3</option>
<option id="1.2" value="https://www.eclipse.org/hono/docs/1.2/api/tenant/">1.2</option>
<option id="1.1" value="https://www.eclipse.org/hono/docs/1.1/api/tenant/">1.1</option>
<option id="1.0" value="https://www.eclipse.org/hono/docs/1.0/api/tenant/">1.0</option>
<option id="dev" value="https://www.eclipse.org/hono/docs/dev/api/tenant/">dev</option>
</select>
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="255px" height="255px" viewBox="0 0 255 255" style="enable-background:new 0 0 255 255;" xml:space="preserve">
<g>
<g id="arrow-drop-down">
<polygon points="0,63.75 127.5,191.25 255,63.75 " />
</g>
</g>
</svg>
</div>
</a>
</div>
</div>
</li>
</ul>
</section>
<section id="footer">
<p>&copy; 2021 <a href="https://www.eclipse.org/hono/">The Eclipse Hono Project</a></p>
<p>
Documentation built with
<a href="https://gohugo.io/" target="_blank">Hugo</a>
using the
<a href="https://github.com/matcornic/hugo-theme-learn" target="_blank">Learn</a> theme.
</p>
<div class="eclipse-logo">
<a href="https://www.eclipse.org" target="_blank">
<img src="https://www.eclipse.org/hono/docs/images/eclipse_foundation_logo.svg"/>
</a>
</div>
</section>
</div>
</nav>
<section id="body">
<div id="overlay"></div>
<div class="old-version-hint">
<p>This page refers to version <em>1.3</em>.
You might want to use the <a href="https://www.eclipse.org/hono/docs/">current stable</a> version.
</p>
</div>
<div class="padding highlightable">
<div>
<div id="top-bar">
<div id="top-github-link">
<a class="github-link" title='Edit this page' href="https://github.com/eclipse/hono/edit/master/site/documentation/content/api/tenant/index.md" target="blank">
<i class="fas fa-code-branch"></i>
<span id="top-github-link-text">Edit this page</span>
</a>
</div>
<div id="breadcrumbs" itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb">
<span id="sidebar-toggle-span">
<a href="#" id="sidebar-toggle" data-sidebar-toggle="">
<i class="fas fa-bars"></i>
</a>
</span>
<span id="toc-menu"><i class="fas fa-list-alt"></i></span>
<span class="links">
<a href='/hono/docs/1.3/'>Documentation</a> > <a href='/hono/docs/1.3/api/'>API</a> > Tenant API Specification
</span>
</div>
<div class="progress">
<div class="wrapper">
<nav id="TableOfContents">
<ul>
<li><a href="#preconditions-for-invoking-the-tenant-api">Preconditions for invoking the Tenant API</a></li>
<li><a href="#get-tenant-information">Get Tenant Information</a></li>
<li><a href="#tenant-information-format">Tenant Information Format</a>
<ul>
<li><a href="#tracing-format">Tracing Format</a></li>
<li><a href="#trusted-ca-format">Trusted CA Format</a></li>
<li><a href="#adapter-configuration-format">Adapter Configuration Format</a></li>
<li><a href="#resource-limits-configuration-format">Resource Limits Configuration Format</a></li>
<li><a href="#connection-duration-configuration-format">Connection Duration Configuration Format</a></li>
<li><a href="#data-volume-configuration-format">Data Volume Configuration Format</a></li>
<li><a href="#resource-limits-period-configuration-format">Resource Limits Period Configuration Format</a></li>
</ul>
</li>
<li><a href="#delivery-states-used-by-the-tenant-api">Delivery States used by the Tenant API</a></li>
</ul>
</nav>
</div>
</div>
</div>
</div>
<div id="head-tags">
</div>
<div id="body-inner">
<h1>
Tenant API Specification
</h1>
<p>The <em>Tenant API</em> is used by Hono&rsquo;s protocol adapters to retrieve information that affects all devices belonging to a particular tenant.
A tenant is a logical entity, which groups together a set of devices. The information registered for a tenant is used for example to
determine if devices belonging to the tenant are allowed to connect to a certain protocol adapter or if devices are required to authenticate.</p>
<p>This document <em>describes</em> the Tenant API&rsquo;s operations and the payload data format used by them.
Please refer to <a href="/hono/docs/1.3/concepts/tenancy/">Multi Tenancy</a> for details regarding the way Hono supports multiple tenants.</p>
<p>The Tenant API is defined by means of AMQP 1.0 message exchanges, i.e. a client needs to connect to Hono using an AMQP 1.0 client in order to invoke operations of the API as described in the following sections.</p>
<p><a name="preconditions"></a></p>
<h2 id="preconditions-for-invoking-the-tenant-api">Preconditions for invoking the Tenant API</h2>
<ol>
<li>Client has established an AMQP connection with the Tenant service.</li>
<li>Client has established an AMQP link in role <em>sender</em> on the connection using target address <code>tenant</code>. This link is used by the client to send request messages to the Tenant service.</li>
<li>Client has established an AMQP link in role <em>receiver</em> on the connection using source address <code>tenant/${reply-to}</code> where <em>reply-to</em> may be any arbitrary string chosen by the client. This link is used by the client to receive responses to the requests it has sent to the Tenant service. This link&rsquo;s source address is also referred to as the <em>reply-to</em> address for the request messages.</li>
</ol>
<figure>
<img src="preconditions.svg"
alt="A client establishes an AMQP connection and the links required to invoke operations of the Tenant service"/> <figcaption>
<h4>Client connecting to Tenant service</h4>
</figcaption>
</figure>
<h2 id="get-tenant-information">Get Tenant Information</h2>
<p>Clients use this operation to <em>retrieve</em> information about a tenant.</p>
<p><strong>Message Flow</strong></p>
<p>The following sequence diagram illustrates the flow of messages involved in a <em>Client</em> retrieving tenant information.</p>
<figure>
<img src="get_tenant_success.svg"
alt="A client sends a request message for retrieving tenant information and receives a response containing the information"/> <figcaption>
<h4>Client retrieving tenant information</h4>
</figcaption>
</figure>
<p><strong>Request Message Format</strong></p>
<p>The following table provides an overview of the properties a client needs to set on a message to get tenant information:</p>
<table>
<thead>
<tr>
<th style="text-align:left">Name</th>
<th style="text-align:center">Mandatory</th>
<th style="text-align:left">Location</th>
<th style="text-align:left">AMQP Type</th>
<th style="text-align:left">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><em>correlation-id</em></td>
<td style="text-align:center">no</td>
<td style="text-align:left"><em>properties</em></td>
<td style="text-align:left"><em>message-id</em></td>
<td style="text-align:left">MAY contain an ID used to correlate a response message to the original request. If set, it is used as the <em>correlation-id</em> property in the response, otherwise the value of the <em>message-id</em> property is used. Either this or the <em>message-id</em> property MUST be set.</td>
</tr>
<tr>
<td style="text-align:left"><em>message-id</em></td>
<td style="text-align:center">no</td>
<td style="text-align:left"><em>properties</em></td>
<td style="text-align:left"><em>string</em></td>
<td style="text-align:left">MAY contain an identifier that uniquely identifies the message at the sender side. Either this or the <em>correlation-id</em> property MUST be set.</td>
</tr>
<tr>
<td style="text-align:left"><em>reply-to</em></td>
<td style="text-align:center">yes</td>
<td style="text-align:left"><em>properties</em></td>
<td style="text-align:left"><em>string</em></td>
<td style="text-align:left">MUST contain the source address that the client wants to receive response messages from. This address MUST be the same as the source address used for establishing the client&rsquo;s receive link (see <a href="#preconditions-for-invoking-the-tenant-api">Preconditions</a>).</td>
</tr>
<tr>
<td style="text-align:left"><em>subject</em></td>
<td style="text-align:center">yes</td>
<td style="text-align:left"><em>properties</em></td>
<td style="text-align:left"><em>string</em></td>
<td style="text-align:left">MUST be set to <code>get</code>.</td>
</tr>
</tbody>
</table>
<p>The body of the request message MUST consist of a single <em>Data</em> section containing a UTF-8 encoded string representation of a single JSON object.</p>
<p>The JSON object MUST contain <em>exactly one</em> of the following search criteria properties:</p>
<table>
<thead>
<tr>
<th style="text-align:left">Name</th>
<th style="text-align:center">Mandatory</th>
<th style="text-align:left">JSON Type</th>
<th style="text-align:left">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><em>subject-dn</em></td>
<td style="text-align:center"><em>no</em></td>
<td style="text-align:left"><em>string</em></td>
<td style="text-align:left">The subject DN of the trusted certificate authority&rsquo;s public key in the format defined by <a href="https://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a>.</td>
</tr>
<tr>
<td style="text-align:left"><em>tenant-id</em></td>
<td style="text-align:center"><em>no</em></td>
<td style="text-align:left"><em>string</em></td>
<td style="text-align:left">The identifier of the tenant to get.</td>
</tr>
</tbody>
</table>
<p>The following request payload may be used to look up the tenant with identifier <code>ACME Corporation</code>:</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-json" data-lang="json">{
<span style="color:#f92672">&#34;tenant-id&#34;</span>: <span style="color:#e6db74">&#34;ACME Corporation&#34;</span>
}
</code></pre></div><p>The following request payload may be used to look up the tenant for which a trusted certificate authority with subject DN <code>O=ACME Corporation, CN=devices</code> has been configured:</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-json" data-lang="json">{
<span style="color:#f92672">&#34;subject-dn&#34;</span>: <span style="color:#e6db74">&#34;CN=devices,O=ACME Corporation&#34;</span>
}
</code></pre></div><p><strong>Response Message Format</strong></p>
<p>The following table provides an overview of the properties contained in a response message to a <em>get tenant information</em> request:</p>
<table>
<thead>
<tr>
<th style="text-align:left">Name</th>
<th style="text-align:center">Mandatory</th>
<th style="text-align:left">Location</th>
<th style="text-align:left">AMQP Type</th>
<th style="text-align:left">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><em>correlation-id</em></td>
<td style="text-align:center">yes</td>
<td style="text-align:left"><em>properties</em></td>
<td style="text-align:left"><em>message-id</em></td>
<td style="text-align:left">Contains the <em>message-id</em> (or the <em>correlation-id</em>, if specified) of the request message that this message is the response to.</td>
</tr>
<tr>
<td style="text-align:left"><em>content-type</em></td>
<td style="text-align:center">no</td>
<td style="text-align:left"><em>properties</em></td>
<td style="text-align:left"><em>string</em></td>
<td style="text-align:left">MUST be set to <code>application/json</code> if the invocation of the operation was successful and the body of the response message contains payload as described below.</td>
</tr>
<tr>
<td style="text-align:left"><em>status</em></td>
<td style="text-align:center">yes</td>
<td style="text-align:left"><em>application-properties</em></td>
<td style="text-align:left"><em>int</em></td>
<td style="text-align:left">Contains the status code indicating the outcome of the operation. Concrete values and their semantics are defined for each particular operation.</td>
</tr>
<tr>
<td style="text-align:left"><em>cache_control</em></td>
<td style="text-align:center">no</td>
<td style="text-align:left"><em>application-properties</em></td>
<td style="text-align:left"><em>string</em></td>
<td style="text-align:left">Contains an <a href="https://tools.ietf.org/html/rfc2616#section-14.9">RFC 2616</a> compliant <em>cache directive</em>. The directive contained in the property MUST be obeyed by clients that are caching responses.</td>
</tr>
</tbody>
</table>
<p>The response message&rsquo;s <em>status</em> property may contain the following codes:</p>
<table>
<thead>
<tr>
<th style="text-align:left">Code</th>
<th style="text-align:left">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><em>200</em></td>
<td style="text-align:left">OK, The response message body contains the requested tenant information.</td>
</tr>
<tr>
<td style="text-align:left"><em>400</em></td>
<td style="text-align:left">Bad Request, the request message did not contain all mandatory properties.</td>
</tr>
<tr>
<td style="text-align:left"><em>403</em></td>
<td style="text-align:left">Forbidden, the client is not authorized to retrieve information for the given tenant.</td>
</tr>
<tr>
<td style="text-align:left"><em>404</em></td>
<td style="text-align:left">Not Found, there is no tenant matching the given search criteria.</td>
</tr>
</tbody>
</table>
<p>For status codes indicating an error (codes in the <code>400 - 499</code> range) the message body MAY contain a detailed description of the error that occurred. In this case, the response message&rsquo;s <em>content-type</em> property SHOULD be set accordingly.</p>
<p>Otherwise the response message contains the information for the requested tenant as described in the following sections.</p>
<p><a name="payload-format"></a></p>
<h2 id="tenant-information-format">Tenant Information Format</h2>
<p>Tenant information is carried in a single <em>Data</em> section of the response message as a UTF-8 encoded string representation of a single JSON object.
It is an error to include payload that is not of this type.</p>
<p>The table below provides an overview of the standard members defined for the JSON response object:</p>
<table>
<thead>
<tr>
<th style="text-align:left">Name</th>
<th style="text-align:center">Mandatory</th>
<th style="text-align:left">JSON Type</th>
<th style="text-align:left">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><em>adapters</em></td>
<td style="text-align:center"><em>no</em></td>
<td style="text-align:left"><em>array</em></td>
<td style="text-align:left">A list of configuration options valid for certain adapters only. The format of a configuration option is described here <a href="#adapter-configuration-format">Adapter Configuration Format</a>. <strong>NB</strong> If the element is provided then the list MUST NOT be empty. <strong>NB</strong> Only a single entry per <em>type</em> is allowed. If multiple entries for the same <em>type</em> are present it is handled as an error. <strong>NB</strong> If the element is omitted then all adapters are <em>enabled</em> in their default configuration.</td>
</tr>
<tr>
<td style="text-align:left"><em>defaults</em></td>
<td style="text-align:center"><em>no</em></td>
<td style="text-align:left"><em>object</em></td>
<td style="text-align:left">Arbitrary <em>default</em> properties for devices belonging to the tenant. The properties can be used by protocol adapters to augment downstream messages with missing information, e.g. setting a default content type or time-to-live.</td>
</tr>
<tr>
<td style="text-align:left"><em>enabled</em></td>
<td style="text-align:center"><em>yes</em></td>
<td style="text-align:left"><em>boolean</em></td>
<td style="text-align:left">If set to <code>false</code> the tenant is currently disabled. Protocol adapters MUST NOT allow devices of a disabled tenant to connect and MUST NOT accept data published by such devices.</td>
</tr>
<tr>
<td style="text-align:left"><em>minimum-message-size</em></td>
<td style="text-align:center"><em>no</em></td>
<td style="text-align:left"><em>number</em></td>
<td style="text-align:left">The minimum message size in bytes. If it is set then the payload size of the telemetry, event and command messages are calculated in accordance with the configured value and then reported to the metrics. See <a href="/hono/docs/1.3/api/metrics/">Metrics</a> for more details.</td>
</tr>
<tr>
<td style="text-align:left"><em>resource-limits</em></td>
<td style="text-align:center"><em>no</em></td>
<td style="text-align:left"><em>object</em></td>
<td style="text-align:left">Any resource limits that should be enforced for the tenant, e.g. the maximum number of concurrent connections and the maximum data volume for a given period. Refer to <a href="#resource-limits-configuration-format">Resource Limits Configuration Format</a> for details.</td>
</tr>
<tr>
<td style="text-align:left"><em>tenant-id</em></td>
<td style="text-align:center"><em>yes</em></td>
<td style="text-align:left"><em>string</em></td>
<td style="text-align:left">The ID of the tenant.</td>
</tr>
<tr>
<td style="text-align:left"><em>tracing</em></td>
<td style="text-align:center"><em>no</em></td>
<td style="text-align:left"><em>object</em></td>
<td style="text-align:left">A set of options regarding the tracing of messages for the tenant. See <a href="#tracing-format">Tracing Format</a> for a definition of the content model of the object.</td>
</tr>
<tr>
<td style="text-align:left"><em>trusted-ca</em></td>
<td style="text-align:center"><em>no</em></td>
<td style="text-align:left"><em>array</em></td>
<td style="text-align:left">The list of trusted certificate authorities to use for validating certificates presented by devices of the tenant for authentication purposes. See <a href="#trusted-ca-format">Trusted Certificate Authority Format</a> for a definition of the content model of the objects contained in the array. <strong>NB</strong> If the element is provided then the list MUST NOT be empty.</td>
</tr>
</tbody>
</table>
<p>The JSON object MAY contain an arbitrary number of additional members with arbitrary names which can be of a scalar or a complex type.
This allows for future <em>well-known</em> additions and also allows to add further information which might be relevant to a <em>custom</em> adapter only.</p>
<p><strong>Examples</strong></p>
<p>The JSON structure below contains example information for tenant <code>TEST_TENANT</code>. Note that the structure contains some custom properties at both the root level (<em>customer</em>) as well as the adapter configuration level (<em>deployment</em>) and also defines a default TTL for downstream messages.</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-json" data-lang="json">{
<span style="color:#f92672">&#34;tenant-id&#34;</span>: <span style="color:#e6db74">&#34;TEST_TENANT&#34;</span>,
<span style="color:#f92672">&#34;defaults&#34;</span>: {
<span style="color:#f92672">&#34;ttl&#34;</span>: <span style="color:#ae81ff">30</span>
},
<span style="color:#f92672">&#34;enabled&#34;</span>: <span style="color:#66d9ef">true</span>,
<span style="color:#f92672">&#34;customer&#34;</span>: <span style="color:#e6db74">&#34;ACME Inc.&#34;</span>,
<span style="color:#f92672">&#34;resource-limits&#34;</span>: {
<span style="color:#f92672">&#34;max-connections&#34;</span>: <span style="color:#ae81ff">100000</span>,
<span style="color:#f92672">&#34;data-volume&#34;</span>: {
<span style="color:#f92672">&#34;max-bytes&#34;</span>: <span style="color:#ae81ff">2147483648</span>,
<span style="color:#f92672">&#34;period&#34;</span>: {
<span style="color:#f92672">&#34;mode&#34;</span>: <span style="color:#e6db74">&#34;days&#34;</span>,
<span style="color:#f92672">&#34;no-of-days&#34;</span>: <span style="color:#ae81ff">30</span>
},
<span style="color:#f92672">&#34;effective-since&#34;</span>: <span style="color:#e6db74">&#34;2019-07-27T14:30:00Z&#34;</span>
}
},
<span style="color:#f92672">&#34;adapters&#34;</span>: [
{
<span style="color:#f92672">&#34;type&#34;</span>: <span style="color:#e6db74">&#34;hono-mqtt&#34;</span>,
<span style="color:#f92672">&#34;enabled&#34;</span>: <span style="color:#66d9ef">true</span>,
<span style="color:#f92672">&#34;device-authentication-required&#34;</span>: <span style="color:#66d9ef">true</span>
}, {
<span style="color:#f92672">&#34;type&#34;</span>: <span style="color:#e6db74">&#34;hono-http&#34;</span>,
<span style="color:#f92672">&#34;enabled&#34;</span>: <span style="color:#66d9ef">true</span>,
<span style="color:#f92672">&#34;device-authentication-required&#34;</span>: <span style="color:#66d9ef">true</span>,
<span style="color:#f92672">&#34;deployment&#34;</span>: {
<span style="color:#f92672">&#34;maxInstances&#34;</span>: <span style="color:#ae81ff">4</span>
}
}
]
}
</code></pre></div><h3 id="tracing-format">Tracing Format</h3>
<p>The table below provides an overview of the members defined for the <em>tracing</em> JSON object:</p>
<table>
<thead>
<tr>
<th style="text-align:left">Name</th>
<th style="text-align:center">Mandatory</th>
<th style="text-align:left">Type</th>
<th style="text-align:left">Default Value</th>
<th style="text-align:left">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><em>sampling-mode</em></td>
<td style="text-align:center"><em>no</em></td>
<td style="text-align:left"><em>string</em></td>
<td style="text-align:left"><code>default</code></td>
<td style="text-align:left">Defines in how far OpenTracing spans created when processing messages for this tenant shall be recorded (sampled) by the tracing system. The value <code>default</code> lets the default sampling mechanism be used. The value <code>all</code> marks the spans related to this tenant so that they should all be sampled. The value <code>none</code> marks the spans as not to be sampled. The mode defined here may be overridden for a particular auth-id by means of the <code>sampling-mode-per-auth-id</code> property.</td>
</tr>
<tr>
<td style="text-align:left"><em>sampling-mode-per-auth-id</em></td>
<td style="text-align:center"><em>no</em></td>
<td style="text-align:left"><em>object</em></td>
<td style="text-align:left"></td>
<td style="text-align:left">Defines in how far OpenTracing spans created when processing messages for this tenant and a particular auth-id shall be recorded (sampled) by the tracing system. The child properties have the auth-id as name. A child property value of <code>default</code> lets the default sampling mechanism be used. The child property value <code>all</code> marks the spans related to this tenant and the auth-id so that they should all be sampled. The child property value <code>none</code> marks the spans as not to be sampled. The mode defined for a particular auth-id has precedence over the value defined by the <code>sampling-mode</code> property.</td>
</tr>
</tbody>
</table>
<h3 id="trusted-ca-format">Trusted CA Format</h3>
<p>The table below provides an overview of the members of a JSON object representing a trusted CA:</p>
<table>
<thead>
<tr>
<th style="text-align:left">Name</th>
<th style="text-align:center">Mandatory</th>
<th style="text-align:left">Type</th>
<th style="text-align:left">Default Value</th>
<th style="text-align:left">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><em>subject-dn</em></td>
<td style="text-align:center"><em>yes</em></td>
<td style="text-align:left"><em>string</em></td>
<td style="text-align:left"><code>-</code></td>
<td style="text-align:left">The subject DN of the trusted root certificate in the format defined by <a href="https://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a>.</td>
</tr>
<tr>
<td style="text-align:left"><em>public-key</em></td>
<td style="text-align:center"><em>yes</em></td>
<td style="text-align:left"><em>string</em></td>
<td style="text-align:left"><code>-</code></td>
<td style="text-align:left">The Base64 encoded binary DER encoding of the trusted root certificate&rsquo;s public key.</td>
</tr>
<tr>
<td style="text-align:left"><em>algorithm</em></td>
<td style="text-align:center"><em>no</em></td>
<td style="text-align:left"><em>string</em></td>
<td style="text-align:left"><code>RSA</code></td>
<td style="text-align:left">The name of the public key algorithm. Supported values are <code>RSA</code> and <code>EC</code>.</td>
</tr>
<tr>
<td style="text-align:left"><em>auto-provisioning-enabled</em></td>
<td style="text-align:center"><em>no</em></td>
<td style="text-align:left"><em>boolean</em></td>
<td style="text-align:left"><code>false</code></td>
<td style="text-align:left">If set to <code>true</code>, protocol adapters MAY request auto-provisioning of devices that authenticate with a client certificate issued by this CA. Otherwise, protocol adapters MUST NOT request auto-provisioning.</td>
</tr>
</tbody>
</table>
<p><strong>NB</strong> CAs of the <em>same</em> tenant MAY share the same subject DN, e.g. allowing for the definition of overlapping validity periods.
However, CAs of <em>different</em> tenants MUST NOT share the same subject DN in order to allow for the unique look-up of a tenant by
the subject DN of one of its trusted CAs.</p>
<p><strong>Examples</strong></p>
<p>Below is an example payload for a response to a <em>get</em> request for tenant <code>TEST_TENANT</code>.
The tenant is configured with two trusted certificate authorities, each using a different public key algorithm.
Only one of them is configured to be used for auto-provisioning.</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-json" data-lang="json">{
<span style="color:#f92672">&#34;tenant-id&#34;</span> : <span style="color:#e6db74">&#34;TEST_TENANT&#34;</span>,
<span style="color:#f92672">&#34;enabled&#34;</span> : <span style="color:#66d9ef">true</span>,
<span style="color:#f92672">&#34;trusted-ca&#34;</span>: [{
<span style="color:#f92672">&#34;subject-dn&#34;</span>: <span style="color:#e6db74">&#34;CN=ca,OU=Hono,O=Eclipse&#34;</span>,
<span style="color:#f92672">&#34;public-key&#34;</span>: <span style="color:#e6db74">&#34;PublicKey==&#34;</span>,
<span style="color:#f92672">&#34;auto-provisioning-enabled&#34;</span>: <span style="color:#66d9ef">false</span>,
<span style="color:#f92672">&#34;algorithm&#34;</span>: <span style="color:#e6db74">&#34;RSA&#34;</span>
}, {
<span style="color:#f92672">&#34;subject-dn&#34;</span>: <span style="color:#e6db74">&#34;CN=ca,OU=Hono,O=ACME Inc.&#34;</span>,
<span style="color:#f92672">&#34;public-key&#34;</span>: <span style="color:#e6db74">&#34;ECKey==&#34;</span>,
<span style="color:#f92672">&#34;auto-provisioning-enabled&#34;</span>: <span style="color:#66d9ef">true</span>,
<span style="color:#f92672">&#34;algorithm&#34;</span>: <span style="color:#e6db74">&#34;EC&#34;</span>
}]
}
</code></pre></div><h3 id="adapter-configuration-format">Adapter Configuration Format</h3>
<p>The table below contains the properties which are used to configure a <em>Hono protocol adapter</em>:</p>
<table>
<thead>
<tr>
<th style="text-align:left">Name</th>
<th style="text-align:center">Mandatory</th>
<th style="text-align:left">JSON Type</th>
<th style="text-align:left">Default Value</th>
<th style="text-align:left">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><em>type</em></td>
<td style="text-align:center"><em>yes</em></td>
<td style="text-align:left"><em>string</em></td>
<td style="text-align:left"><code>-</code></td>
<td style="text-align:left">The type of the adapter which this configuration belongs to.</td>
</tr>
<tr>
<td style="text-align:left"><em>enabled</em></td>
<td style="text-align:center"><em>no</em></td>
<td style="text-align:left"><em>boolean</em></td>
<td style="text-align:left"><code>false</code></td>
<td style="text-align:left">If set to false the tenant is not allowed to receive / send data utilizing the given adapter.</td>
</tr>
<tr>
<td style="text-align:left"><em>device-authentication-required</em></td>
<td style="text-align:center"><em>no</em></td>
<td style="text-align:left"><em>boolean</em></td>
<td style="text-align:left"><code>true</code></td>
<td style="text-align:left">If set to false, devices are not required to authenticate with the adapter before sending / receiving data.</td>
</tr>
</tbody>
</table>
<p>Protocol adapters SHOULD use the configuration properties set for a tenant when interacting with devices of that tenant, e.g. in order to make authorization decisions etc.</p>
<p>The JSON object MAY contain an arbitrary number of additional members with arbitrary names of either scalar or complex type.
This allows for future <em>well-known</em> additions and also allows to add further information which might be relevant to a <em>custom</em> adapter only.</p>
<h3 id="resource-limits-configuration-format">Resource Limits Configuration Format</h3>
<p>The table below contains the properties which are used to configure a tenant&rsquo;s resource limits:</p>
<table>
<thead>
<tr>
<th style="text-align:left">Name</th>
<th style="text-align:center">Mandatory</th>
<th style="text-align:left">JSON Type</th>
<th style="text-align:left">Default Value</th>
<th style="text-align:left">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><em>max-connections</em></td>
<td style="text-align:center"><em>no</em></td>
<td style="text-align:left"><em>number</em></td>
<td style="text-align:left"><code>-1</code></td>
<td style="text-align:left">The maximum number of concurrent connections allowed from devices of this tenant. The default value <code>-1</code> indicates that no limit is set.</td>
</tr>
<tr>
<td style="text-align:left"><em>max-ttl</em></td>
<td style="text-align:center"><em>no</em></td>
<td style="text-align:left"><em>number</em></td>
<td style="text-align:left"><code>-1</code></td>
<td style="text-align:left">The maximum time-to-live (in seconds) to use for events published by devices of this tenant. Any default TTL value specified at either the tenant or device level will be limited to the max value specified here. If this property is set to a value greater than <code>-1</code> and no default TTL is specified for a device, the max value will be used for events published by the device. A value of <code>-1</code> (the default) indicates that no limit is set. <strong>Note</strong> that this property contains the TTL in <em>seconds</em> whereas the AMQP 1.0 specification defines a message&rsquo;s <em>ttl</em> header to use milliseconds.</td>
</tr>
<tr>
<td style="text-align:left"><em>connection-duration</em></td>
<td style="text-align:center"><em>no</em></td>
<td style="text-align:left"><em>object</em></td>
<td style="text-align:left"><code>-</code></td>
<td style="text-align:left">The maximum connection duration allowed for the given tenant. Refer to <a href="#connection-duration-configuration-format">Connection Duration Configuration Format</a> for details.</td>
</tr>
<tr>
<td style="text-align:left"><em>data-volume</em></td>
<td style="text-align:center"><em>no</em></td>
<td style="text-align:left"><em>object</em></td>
<td style="text-align:left"><code>-</code></td>
<td style="text-align:left">The maximum data volume allowed for the given tenant. Refer to <a href="#data-volume-configuration-format">Data Volume Configuration Format</a> for details.</td>
</tr>
</tbody>
</table>
<p>Protocol adapters SHOULD use the <em>max-connections</em> property to determine if a device&rsquo;s connection request should be accepted or rejected.</p>
<p>Protocol adapters SHOULD use the <em>max-ttl</em> property to determine the <em>effective time-to-live</em> for events published by devices as follows:</p>
<ol>
<li>If a non-default <em>max-ttl</em> is set for the tenant, use that value as the <em>effective ttl</em>, otherwise set <em>effective ttl</em> to <code>-1</code>.</li>
<li>If the event published by the device
<ol>
<li>contains a <em>ttl</em> header and <em>effective ttl</em> is not <code>-1</code> and the <em>ttl</em> value (in seconds) provided by the device is smaller than the
<em>effective ttl</em>, use the device provided <em>ttl</em> value as the new <em>effective ttl</em>.</li>
<li>does not contain a <em>ttl</em> header but a default <em>ttl</em> value is configured for the device (with the device level taking precedence
over the tenant level) and <em>effective ttl</em> is not <code>-1</code> and the default value is smaller than the <em>effective ttl</em>,
use the default <em>ttl</em> value as the new <em>effective ttl</em>.</li>
</ol>
</li>
<li>If <em>effective ttl</em> is not <code>-1</code>, set the downstream event message&rsquo;s <em>ttl</em> header to its value (in milliseconds).</li>
</ol>
<p>The JSON object MAY contain an arbitrary number of additional members with arbitrary names of either scalar or complex type.
This allows for future <em>well-known</em> additions and also allows to add further information which might be relevant to a <em>custom</em> adapter only.</p>
<h3 id="connection-duration-configuration-format">Connection Duration Configuration Format</h3>
<p>The table below contains the properties which are used to configure a tenant&rsquo;s connection duration limit:</p>
<table>
<thead>
<tr>
<th style="text-align:left">Name</th>
<th style="text-align:center">Mandatory</th>
<th style="text-align:left">JSON Type</th>
<th style="text-align:left">Default Value</th>
<th style="text-align:left">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><em>effective-since</em></td>
<td style="text-align:center"><em>yes</em></td>
<td style="text-align:left"><em>string</em></td>
<td style="text-align:left"><code>-</code></td>
<td style="text-align:left">The point in time at which the current settings became effective, i.e. the start of the first accounting period based on these settings. The value MUST be an <a href="https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations">ISO 8601 compliant <em>combined date and time representation in extended format</em></a>.</td>
</tr>
<tr>
<td style="text-align:left"><em>max-minutes</em></td>
<td style="text-align:center"><em>no</em></td>
<td style="text-align:left"><em>number</em></td>
<td style="text-align:left"><code>-1</code></td>
<td style="text-align:left">The maximum connection duration in minutes allowed for the tenant for each accounting period. MUST be an integer. Minus one indicates that no limit is set.</td>
</tr>
<tr>
<td style="text-align:left"><em>period</em></td>
<td style="text-align:center"><em>no</em></td>
<td style="text-align:left"><em>object</em></td>
<td style="text-align:left"><code>-</code></td>
<td style="text-align:left">The mode and length of an accounting period, i.e. the resource usage is calculated based on the defined number of days or on a monthly basis. For more information, please refer to the <a href="#resource-limits-period-configuration-format">resource limits period</a>.</td>
</tr>
</tbody>
</table>
<p>Protocol adapters that maintain <em>connection state</em> SHOULD use this information to determine if a connection request from a device should be accepted or not. For more information, please refer to the <a href="/hono/docs/1.3/concepts/resource-limits/">connection duration limit concept</a>.</p>
<h3 id="data-volume-configuration-format">Data Volume Configuration Format</h3>
<p>The table below contains the properties which are used to configure a tenant&rsquo;s data volume limit:</p>
<table>
<thead>
<tr>
<th style="text-align:left">Name</th>
<th style="text-align:center">Mandatory</th>
<th style="text-align:left">JSON Type</th>
<th style="text-align:left">Default Value</th>
<th style="text-align:left">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><em>effective-since</em></td>
<td style="text-align:center"><em>yes</em></td>
<td style="text-align:left"><em>string</em></td>
<td style="text-align:left"><code>-</code></td>
<td style="text-align:left">The point in time at which the current settings became effective, i.e. the start of the first accounting period based on these settings. The value MUST be an <a href="https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations">ISO 8601 compliant <em>combined date and time representation in extended format</em></a>.</td>
</tr>
<tr>
<td style="text-align:left"><em>max-bytes</em></td>
<td style="text-align:center"><em>no</em></td>
<td style="text-align:left"><em>number</em></td>
<td style="text-align:left"><code>-1</code></td>
<td style="text-align:left">The maximum number of bytes allowed for the tenant for each accounting period. MUST be an integer. A negative value indicates that no limit is set.</td>
</tr>
<tr>
<td style="text-align:left"><em>period</em></td>
<td style="text-align:center"><em>no</em></td>
<td style="text-align:left"><em>object</em></td>
<td style="text-align:left"><code>-</code></td>
<td style="text-align:left">The mode and length of an accounting period, i.e. the data usage can limited based on the defined number of days or on a monthly basis. For more information, please refer to the <a href="#resource-limits-period-configuration-format">resource limits period</a>.</td>
</tr>
</tbody>
</table>
<p>Protocol adapters SHOULD use this information to determine if a message originating from or destined to a device should be accepted for processing.</p>
<h3 id="resource-limits-period-configuration-format">Resource Limits Period Configuration Format</h3>
<p>The table below contains the properties that are used to configure a tenant&rsquo;s resource limits period:</p>
<table>
<thead>
<tr>
<th style="text-align:left">Name</th>
<th style="text-align:center">Mandatory</th>
<th style="text-align:left">JSON Type</th>
<th style="text-align:left">Default Value</th>
<th style="text-align:left">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><em>mode</em></td>
<td style="text-align:center"><em>yes</em></td>
<td style="text-align:left"><em>string</em></td>
<td style="text-align:left"><code>-</code></td>
<td style="text-align:left">The mode of the resource usage calculation. The default implementation supports two modes namely <code>days</code> and <code>monthly</code>.</td>
</tr>
<tr>
<td style="text-align:left"><em>no-of-days</em></td>
<td style="text-align:center"><em>no</em></td>
<td style="text-align:left"><em>number</em></td>
<td style="text-align:left"><code>-</code></td>
<td style="text-align:left">When the mode is set as <code>days</code>, then this value represents the length of an accounting period , i.e. the number of days over which the resource usage is to be limited. MUST be a positive integer.</td>
</tr>
</tbody>
</table>
<h2 id="delivery-states-used-by-the-tenant-api">Delivery States used by the Tenant API</h2>
<p>A Tenant service implementation uses the following AMQP message delivery states when receiving request messages from clients:</p>
<table>
<thead>
<tr>
<th style="text-align:left">Delivery State</th>
<th style="text-align:left">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><em>ACCEPTED</em></td>
<td style="text-align:left">Indicates that the request message has been received and accepted for processing.</td>
</tr>
<tr>
<td style="text-align:left"><em>REJECTED</em></td>
<td style="text-align:left">Indicates that the request message has been received but cannot be processed. The disposition frame&rsquo;s <em>error</em> field contains information regarding the reason why. Clients should not try to re-send the request using the same message properties and payload in this case.</td>
</tr>
</tbody>
</table>
<footer class="footline">
</footer>
</div>
</div>
<div id="navigation">
</div>
</section>
<div style="left: -1000px; overflow: scroll; position: absolute; top: -1000px; border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;">
<div style="border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;"></div>
</div>
<script src="/hono/docs/js/clipboard.min.js?1626138730"></script>
<script src="/hono/docs/js/perfect-scrollbar.min.js?1626138730"></script>
<script src="/hono/docs/js/perfect-scrollbar.jquery.min.js?1626138730"></script>
<script src="/hono/docs/js/jquery.sticky.js?1626138730"></script>
<script src="/hono/docs/js/featherlight.min.js?1626138730"></script>
<script src="/hono/docs/js/highlight.pack.js?1626138730"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script src="/hono/docs/js/modernizr.custom-3.6.0.js?1626138730"></script>
<script src="/hono/docs/js/learn.js?1626138730"></script>
<script src="/hono/docs/js/hugo-learn.js?1626138730"></script>
<link href="/hono/docs/mermaid/mermaid.css?1626138730" rel="stylesheet" />
<script src="/hono/docs/mermaid/mermaid.js?1626138730"></script>
<script>
mermaid.initialize({ startOnLoad: true });
</script>
<script>
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-5WLCZXC');
</script>
<script src="https://www.eclipse.org/eclipse.org-common/themes/solstice/public/javascript/vendor/cookieconsent/default.min.js"></script>
</body>
</html>