| <!DOCTYPE html> |
| <html lang="1.0" 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>Device Registry :: Eclipse Hono™ Vers.: 1.0</title> |
| |
| |
| <link href="/hono/docs/css/nucleus.css?1625793046" rel="stylesheet"> |
| <link href="/hono/docs/css/fontawesome-all.min.css?1625793046" rel="stylesheet"> |
| <link href="/hono/docs/css/hybrid.css?1625793046" rel="stylesheet"> |
| <link href="/hono/docs/css/featherlight.min.css?1625793046" rel="stylesheet"> |
| <link href="/hono/docs/css/perfect-scrollbar.min.css?1625793046" rel="stylesheet"> |
| <link href="/hono/docs/css/auto-complete.css?1625793046" rel="stylesheet"> |
| <link href="/hono/docs/css/atom-one-dark-reasonable.css?1625793046" rel="stylesheet"> |
| <link href="/hono/docs/css/theme.css?1625793046" rel="stylesheet"> |
| <link href="/hono/docs/css/hugo-theme.css?1625793046" rel="stylesheet"> |
| |
| <link href="/hono/docs/css/theme-hono.css?1625793046" rel="stylesheet"> |
| |
| <link href="/hono/docs/css/hono.css?1625793046" rel="stylesheet"> |
| |
| <script src="/hono/docs/js/jquery-3.3.1.min.js?1625793046"></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="Device Registry :: Eclipse Hono&trade; Vers.: 1.0"> |
| <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="Device Registry :: Eclipse Hono&trade; Vers.: 1.0" /> |
| <meta property="og:type" content="website" /> |
| <meta property="og:url" content="https://www.eclipse.org/hono/docs/1.0/user-guide/device-registry//" /> |
| <meta property="og:image" content="https://www.eclipse.org/hono/docs/images/twitter_image.png" /> |
| |
| </head> |
| <body class="" data-url="/hono/docs/1.0/user-guide/device-registry/"> |
| <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?1625793046"></script> |
| <script type="text/javascript" src="/hono/docs/js/auto-complete.js?1625793046"></script> |
| <script type="text/javascript"> |
| |
| var baseurl = "https:\/\/www.eclipse.org\/hono\/docs\/\/1.0"; |
| |
| </script> |
| <script type="text/javascript" src="/hono/docs/js/search.js?1625793046"></script> |
| |
| |
| </div> |
| |
| <div class="highlightable"> |
| <ul class="topics"> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/concepts/" title="Concepts" class="dd-item |
| |
| |
| |
| "> |
| <a href="/hono/docs/1.0/concepts/"> |
| <i class="far fa-lightbulb"></i> Concepts |
| |
| </a> |
| |
| |
| <ul> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/concepts/device-identity/" title="Device Identity" class="dd-item "> |
| <a href="/hono/docs/1.0/concepts/device-identity/"> |
| Device Identity |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/concepts/tenancy/" title="Multi-Tenancy" class="dd-item "> |
| <a href="/hono/docs/1.0/concepts/tenancy/"> |
| Multi-Tenancy |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/concepts/device-notifications/" title="Device Notifications" class="dd-item "> |
| <a href="/hono/docs/1.0/concepts/device-notifications/"> |
| Device Notifications |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/concepts/command-and-control/" title="Command & Control" class="dd-item "> |
| <a href="/hono/docs/1.0/concepts/command-and-control/"> |
| Command & Control |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/concepts/resource-limits/" title="Resource limits" class="dd-item "> |
| <a href="/hono/docs/1.0/concepts/resource-limits/"> |
| Resource limits |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/concepts/connection-events/" title="Connection Events" class="dd-item "> |
| <a href="/hono/docs/1.0/concepts/connection-events/"> |
| Connection Events |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| </ul> |
| |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/user-guide/" title="User Guide" class="dd-item |
| parent |
| |
| |
| "> |
| <a href="/hono/docs/1.0/user-guide/"> |
| <i class="fas fa-book-reader"></i> User Guide |
| |
| </a> |
| |
| |
| <ul> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/user-guide/device-registry/" title="Device Registry" class="dd-item active"> |
| <a href="/hono/docs/1.0/user-guide/device-registry/"> |
| Device Registry |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/user-guide/http-adapter/" title="HTTP Adapter" class="dd-item "> |
| <a href="/hono/docs/1.0/user-guide/http-adapter/"> |
| HTTP Adapter |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/user-guide/mqtt-adapter/" title="MQTT Adapter" class="dd-item "> |
| <a href="/hono/docs/1.0/user-guide/mqtt-adapter/"> |
| MQTT Adapter |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/user-guide/amqp-adapter/" title="AMQP Adapter" class="dd-item "> |
| <a href="/hono/docs/1.0/user-guide/amqp-adapter/"> |
| AMQP Adapter |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/user-guide/kura-adapter/" title="Kura Adapter" class="dd-item "> |
| <a href="/hono/docs/1.0/user-guide/kura-adapter/"> |
| Kura Adapter |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/user-guide/sigfox-adapter/" title="Sigfox Adapter" class="dd-item "> |
| <a href="/hono/docs/1.0/user-guide/sigfox-adapter/"> |
| Sigfox Adapter |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/user-guide/jmeter_load_tests/" title="Load Tests with JMeter" class="dd-item "> |
| <a href="/hono/docs/1.0/user-guide/jmeter_load_tests/"> |
| Load Tests with JMeter |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| </ul> |
| |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/admin-guide/" title="Admin Guide" class="dd-item |
| |
| |
| |
| "> |
| <a href="/hono/docs/1.0/admin-guide/"> |
| <i class="fas fa-sliders-h"></i> Admin Guide |
| |
| </a> |
| |
| |
| <ul> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/admin-guide/common-config/" title="Common Configuration" class="dd-item "> |
| <a href="/hono/docs/1.0/admin-guide/common-config/"> |
| Common Configuration |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/admin-guide/auth-server-config/" title="Auth Server Configuration" class="dd-item "> |
| <a href="/hono/docs/1.0/admin-guide/auth-server-config/"> |
| Auth Server Configuration |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/admin-guide/device-registry-config/" title="Device Registry Configuration" class="dd-item "> |
| <a href="/hono/docs/1.0/admin-guide/device-registry-config/"> |
| Device Registry Configuration |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/admin-guide/device-connection-config/" title="Configuring the Device Connection Service" class="dd-item "> |
| <a href="/hono/docs/1.0/admin-guide/device-connection-config/"> |
| Device Connection Service Configuration |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/admin-guide/http-adapter-config/" title="HTTP Adapter Configuration" class="dd-item "> |
| <a href="/hono/docs/1.0/admin-guide/http-adapter-config/"> |
| HTTP Adapter Configuration |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/admin-guide/amqp-adapter-config/" title="AMQP Adapter Configuration" class="dd-item "> |
| <a href="/hono/docs/1.0/admin-guide/amqp-adapter-config/"> |
| AMQP Adapter Configuration |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/admin-guide/mqtt-adapter-config/" title="MQTT Adapter Configuration" class="dd-item "> |
| <a href="/hono/docs/1.0/admin-guide/mqtt-adapter-config/"> |
| MQTT Adapter Configuration |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/admin-guide/kura-adapter-config/" title="Kura Adapter Configuration" class="dd-item "> |
| <a href="/hono/docs/1.0/admin-guide/kura-adapter-config/"> |
| Kura Adapter Configuration |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/admin-guide/hono-client-configuration/" title="Hono Client Configuration" class="dd-item "> |
| <a href="/hono/docs/1.0/admin-guide/hono-client-configuration/"> |
| Hono Client Configuration |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/admin-guide/amqp-network-config/" title="AMQP 1.0 Messaging Network Configuration" class="dd-item "> |
| <a href="/hono/docs/1.0/admin-guide/amqp-network-config/"> |
| AMQP 1.0 Messaging Network Configuration |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/admin-guide/secure_communication/" title="Secure Communication" class="dd-item "> |
| <a href="/hono/docs/1.0/admin-guide/secure_communication/"> |
| Secure Communication |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/admin-guide/monitoring-tracing-config/" title="Monitoring & Tracing" class="dd-item "> |
| <a href="/hono/docs/1.0/admin-guide/monitoring-tracing-config/"> |
| Monitoring & Tracing |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| </ul> |
| |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/dev-guide/" title="Developer Guide" class="dd-item |
| |
| |
| |
| "> |
| <a href="/hono/docs/1.0/dev-guide/"> |
| <i class="fas fa-tools"></i> Developer Guide |
| |
| </a> |
| |
| |
| <ul> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/dev-guide/building_hono/" title="Building from Source" class="dd-item "> |
| <a href="/hono/docs/1.0/dev-guide/building_hono/"> |
| Building from Source |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/dev-guide/java_client_consumer/" title="Consuming Messages from Java" class="dd-item "> |
| <a href="/hono/docs/1.0/dev-guide/java_client_consumer/"> |
| Consuming Messages from Java |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/dev-guide/custom_http_adapter/" title="Implement a Custom Hono HTTP Protocol Adapter" class="dd-item "> |
| <a href="/hono/docs/1.0/dev-guide/custom_http_adapter/"> |
| Implement a Custom Hono HTTP Protocol Adapter |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| </ul> |
| |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/api/" title="API" class="dd-item |
| |
| |
| |
| "> |
| <a href="/hono/docs/1.0/api/"> |
| <i class='fas fa-plug'></i> API |
| |
| </a> |
| |
| |
| <ul> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/api/telemetry/" title="Telemetry API Specification" class="dd-item "> |
| <a href="/hono/docs/1.0/api/telemetry/"> |
| Telemetry API |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/api/event/" title="Event API Specification" class="dd-item "> |
| <a href="/hono/docs/1.0/api/event/"> |
| Event API |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/api/command-and-control/" title="Command & Control API Specification" class="dd-item "> |
| <a href="/hono/docs/1.0/api/command-and-control/"> |
| Command & Control API |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/api/tenant/" title="Tenant API Specification" class="dd-item "> |
| <a href="/hono/docs/1.0/api/tenant/"> |
| Tenant API |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/api/device-connection/" title="Device Connection API Specification" class="dd-item "> |
| <a href="/hono/docs/1.0/api/device-connection/"> |
| Device Connection API |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/api/device-registration/" title="Device Registration API Specification" class="dd-item "> |
| <a href="/hono/docs/1.0/api/device-registration/"> |
| Device Registration API |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/api/credentials/" title="Credentials API Specification" class="dd-item "> |
| <a href="/hono/docs/1.0/api/credentials/"> |
| Credentials API |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/api/authentication/" title="Authentication API Specification" class="dd-item "> |
| <a href="/hono/docs/1.0/api/authentication/"> |
| Authentication API |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/api/management/" title="Device Registry Management API Specification" class="dd-item "> |
| <a href="/hono/docs/1.0/api/management/"> |
| Device Registry Management API |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/api/metrics/" title="Metrics" class="dd-item "> |
| <a href="/hono/docs/1.0/api/metrics/"> |
| Metrics |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| </ul> |
| |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/deployment/" title="Deployment" class="dd-item |
| |
| |
| |
| "> |
| <a href="/hono/docs/1.0/deployment/"> |
| <i class="fas fa-shipping-fast"></i> Deployment |
| |
| </a> |
| |
| |
| <ul> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/deployment/helm-based-deployment/" title="Helm based Deployment" class="dd-item "> |
| <a href="/hono/docs/1.0/deployment/helm-based-deployment/"> |
| Helm based Deployment |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/deployment/openshift/" title="OpenShift / OKD" class="dd-item "> |
| <a href="/hono/docs/1.0/deployment/openshift/"> |
| OpenShift / OKD |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/deployment/create-kubernetes-cluster/" title="Setting up a Kubernetes Cluster" class="dd-item "> |
| <a href="/hono/docs/1.0/deployment/create-kubernetes-cluster/"> |
| Setting up a Kubernetes Cluster |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/deployment/resource-limitation/" title="Limiting Resource Usage" class="dd-item "> |
| <a href="/hono/docs/1.0/deployment/resource-limitation/"> |
| Limiting Resource Usage |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| </ul> |
| |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/architecture/" title="Architecture" class="dd-item |
| |
| |
| |
| "> |
| <a href="/hono/docs/1.0/architecture/"> |
| <i class="fas fa-landmark"></i> Architecture |
| |
| </a> |
| |
| |
| <ul> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/architecture/component-view/" title="Component View" class="dd-item "> |
| <a href="/hono/docs/1.0/architecture/component-view/"> |
| Component View |
| |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li data-nav-id="/hono/docs/1.0/architecture/auth/" title="Authentication/Authorization" class="dd-item "> |
| <a href="/hono/docs/1.0/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'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: |
| <div class="select-style"> |
| <select id="select-language" onchange="location = this.value;"> |
| |
| |
| |
| |
| |
| |
| |
| |
| <option id="stable" value="https://www.eclipse.org/hono/docs/user-guide/device-registry/">stable (1.8)</option> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <option id="1.8" value="https://www.eclipse.org/hono/docs/1.8/user-guide/device-registry/">1.8</option> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <option id="1.7" value="https://www.eclipse.org/hono/docs/1.7/user-guide/device-registry/">1.7</option> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <option id="1.6" value="https://www.eclipse.org/hono/docs/1.6/user-guide/device-registry/">1.6</option> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <option id="1.5" value="https://www.eclipse.org/hono/docs/1.5/user-guide/device-registry/">1.5</option> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <option id="1.4" value="https://www.eclipse.org/hono/docs/1.4/user-guide/device-registry/">1.4</option> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <option id="1.3" value="https://www.eclipse.org/hono/docs/1.3/user-guide/device-registry/">1.3</option> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <option id="1.2" value="https://www.eclipse.org/hono/docs/1.2/user-guide/device-registry/">1.2</option> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <option id="1.1" value="https://www.eclipse.org/hono/docs/1.1/user-guide/device-registry/">1.1</option> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <option id="1.0" value="https://www.eclipse.org/hono/docs/1.0/user-guide/device-registry/" selected>1.0</option> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <option id="dev" value="https://www.eclipse.org/hono/docs/dev/user-guide/device-registry/">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>© 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.0</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/user-guide/device-registry.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.0/'>Documentation</a> > <a href='/hono/docs/1.0/user-guide/'>User Guide</a> > Device Registry |
| |
| |
| |
| |
| |
| |
| |
| </span> |
| </div> |
| |
| <div class="progress"> |
| <div class="wrapper"> |
| <nav id="TableOfContents"> |
| <ul> |
| <li><a href="#managing-tenants">Managing Tenants</a> |
| <ul> |
| <li><a href="#add-a-tenant">Add a Tenant</a></li> |
| <li><a href="#get-configuration-details-of-a-tenant">Get configuration details of a Tenant</a></li> |
| <li><a href="#update-tenant">Update Tenant</a></li> |
| <li><a href="#delete-tenant">Delete Tenant</a></li> |
| </ul> |
| </li> |
| <li><a href="#managing-device-registration-information">Managing Device Registration Information</a> |
| <ul> |
| <li><a href="#register-device">Register Device</a></li> |
| <li><a href="#read-device">Read Device</a></li> |
| <li><a href="#update-device">Update Device</a></li> |
| <li><a href="#delete-device">Delete Device</a></li> |
| </ul> |
| </li> |
| <li><a href="#managing-credentials">Managing Credentials</a> |
| <ul> |
| <li><a href="#update-credentials-for-a-device">Update Credentials for a Device</a></li> |
| <li><a href="#get-all-credentials-for-a-device">Get all Credentials for a Device</a></li> |
| </ul> |
| </li> |
| </ul> |
| </nav> |
| </div> |
| </div> |
| |
| |
| </div> |
| </div> |
| |
| <div id="head-tags"> |
| |
| </div> |
| |
| <div id="body-inner"> |
| |
| <h1> |
| |
| Device Registry |
| </h1> |
| |
| |
| |
| |
| |
| <p>The Device Registry component provides exemplary implementations of Hono’s <a href="/hono/docs/1.0/api/tenant/">Tenant API</a>, <a href="/hono/docs/1.0/api/device-registration/">Device Registration API</a> and <a href="/hono/docs/1.0/api/credentials/">Credentials API</a>.</p> |
| <p>As such it exposes AMQP 1.0 based endpoints for retrieving the relevant information and persists data in the local filesystem.</p> |
| <p>In addition, the Device Registry also exposes HTTP resources for managing the contents of the registry according to the <a href="/hono/docs/1.0/api/management/">Device Registry HTTP API</a>.</p> |
| <div class="alert alert-warning"> |
| <h4 class="alert-heading"><i class="fas fa-exclamation-triangle"></i> Warning</h4> |
| <div><p>The Device Registry is not intended to be used in production environments. In particular, access to the HTTP resources described below is not restricted to authorized clients only.</p> |
| <p>The resources have been designed to provide convenient access to the registry’s content using command line tools like <em>curl</em> or <em>HTTPie</em>.</p> |
| </div> |
| </div> |
| <h2 id="managing-tenants">Managing Tenants</h2> |
| <p>The following sections describe the resources representing the operations of the Tenant API and how they can be used to manage tenants. |
| Please refer to the <a href="/hono/docs/1.0/api/management/">Device Registry HTTP API</a> for the specific elements that are explained in detail there.</p> |
| <h3 id="add-a-tenant">Add a Tenant</h3> |
| <ul> |
| <li>URI: <code>/v1/tenants/${tenantId}</code></li> |
| <li>Method: <code>POST</code></li> |
| <li>Request Headers: |
| <ul> |
| <li>(required) <code>Content-Type</code>: <code>application/json</code> (no other type supported)</li> |
| </ul> |
| </li> |
| <li>Request Body: |
| <ul> |
| <li>(required) A JSON object as specified by <a href="/hono/docs/1.0/api/management/">Tenant schema</a> of the HTTP API specification.</li> |
| </ul> |
| </li> |
| <li>Status Codes: |
| <ul> |
| <li>201 (Created): Tenant has been added successfully under the resource indicated by <code>Location</code> header.</li> |
| <li>400 (Bad Request): The tenant has not been created because the request was malformed, e .g. because the payload was malformed. The response body may contain hints regarding the cause of the problem.</li> |
| <li>409 (Conflict): A tenant with the given <code>tenantId</code> already exists. The request has not been processed.</li> |
| </ul> |
| </li> |
| <li>Response Headers: |
| <ul> |
| <li><code>Location</code>: The URI under which the newly created resource can be accessed.</li> |
| <li><code>ETag</code>: Version of the resource</li> |
| </ul> |
| </li> |
| </ul> |
| <p><strong>Example</strong></p> |
| <p>The following commands add some tenants with different adapter configurations:</p> |
| <p>Add a tenant that has all adapters set to enabled:</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-sh" data-lang="sh">curl -i -X POST -H <span style="color:#e6db74">'Content-Type: application/json'</span> http://localhost:28080/v1/tenants/tenantAllAdapters |
| |
| HTTP/1.1 <span style="color:#ae81ff">201</span> Created |
| ETag: becc93d7-ab0f-48ec-ad26-debdf339cbf4 |
| Location: /v1/tenants/tenantAllAdapters |
| Content-Type: application/json; charset<span style="color:#f92672">=</span>utf-8 |
| |
| <span style="color:#f92672">{</span><span style="color:#e6db74">"id"</span>: <span style="color:#e6db74">"tenantAllAdapters"</span><span style="color:#f92672">}</span> |
| </code></pre></div><p>Add a tenant that can only use the MQTT adapter:</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-sh" data-lang="sh">curl -i -X POST -H <span style="color:#e6db74">'Content-Type: application/json'</span> --data-binary <span style="color:#e6db74">'{ |
| </span><span style="color:#e6db74"> "adapters": [ { |
| </span><span style="color:#e6db74"> "type": "hono-mqtt", |
| </span><span style="color:#e6db74"> "enabled": true |
| </span><span style="color:#e6db74"> } ] |
| </span><span style="color:#e6db74"> }'</span> http://localhost:28080/v1/tenants/tenantMqttAdapter |
| |
| HTTP/1.1 <span style="color:#ae81ff">201</span> Created |
| ETag: becc93d7-ab0f-48ec-ad26-debdf339cbf4 |
| Location: /v1/tenants/tenantMqttAdapter |
| Content-Type: application/json; charset<span style="color:#f92672">=</span>utf-8 |
| |
| <span style="color:#f92672">{</span><span style="color:#e6db74">"id"</span>: <span style="color:#e6db74">"tenantMqttAdapter"</span><span style="color:#f92672">}</span> |
| </code></pre></div><h3 id="get-configuration-details-of-a-tenant">Get configuration details of a Tenant</h3> |
| <ul> |
| <li>URI: <code>/v1/tenants/${tenantId}</code></li> |
| <li>Method: <code>GET</code></li> |
| <li>Status Codes: |
| <ul> |
| <li>200 (OK): A tenant with the given identifier has been found. The response body contains the tenant data as specified by <a href="/hono/docs/1.0/api/management/">Tenant schema</a> of the HTTP API specification.</li> |
| <li>404 (Not Found): No tenant with the given identifier is registered.</li> |
| </ul> |
| </li> |
| </ul> |
| <p><strong>Example</strong></p> |
| <p>The following command retrieves the details for the tenant <code>tenantMqttAdapter</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-sh" data-lang="sh">curl -i http://localhost:28080/v1/tenants/tenantMqttAdapter |
| |
| HTTP/1.1 <span style="color:#ae81ff">200</span> OK |
| ETag: becc93d7-ab0f-48ec-ad26-debdf339cbf4 |
| Content-Type: application/json; charset<span style="color:#f92672">=</span>utf-8 |
| |
| <span style="color:#f92672">{</span> |
| <span style="color:#e6db74">"enabled"</span>: true, |
| <span style="color:#e6db74">"adapters"</span>: <span style="color:#f92672">[</span> <span style="color:#f92672">{</span> |
| <span style="color:#e6db74">"type"</span>: <span style="color:#e6db74">"hono-mqtt"</span>, |
| <span style="color:#e6db74">"enabled"</span>: true |
| <span style="color:#f92672">}</span> <span style="color:#f92672">]</span> |
| <span style="color:#f92672">}</span> |
| </code></pre></div><h3 id="update-tenant">Update Tenant</h3> |
| <ul> |
| <li>URI: <code>/v1/tenants/${tenantId}</code></li> |
| <li>Method: <code>PUT</code></li> |
| <li>Request Headers: |
| <ul> |
| <li>(required) <code>Content-Type</code>: <code>application/json</code> (no other type supported)</li> |
| </ul> |
| </li> |
| <li>Request Body: |
| <ul> |
| <li>(required) A JSON object as specified by <a href="/hono/docs/1.0/api/management/">Tenant schema</a> of the HTTP API specification.</li> |
| </ul> |
| </li> |
| <li>Status Codes: |
| <ul> |
| <li>204 (No Content): The tenant has been updated successfully.</li> |
| <li>400 (Bad Request): The tenant has not been updated because the request was malformed, e .g. because the payload was malformed. The response body may contain hints regarding the cause of the problem.</li> |
| <li>404 (Not Found): The request could not be processed because no tenant with the given identifier exists.</li> |
| </ul> |
| </li> |
| </ul> |
| <p>This resource can be used to change the configuration of a particular tenant.</p> |
| <p><strong>Example</strong></p> |
| <p>The following command disables the MQTT adapter for devices that belong to the tenant <code>tenantMqttAdapter</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-sh" data-lang="sh">curl -i -X PUT -H <span style="color:#e6db74">'Content-Type: application/json'</span> --data-binary <span style="color:#e6db74">'{ |
| </span><span style="color:#e6db74"> "adapters": [ { |
| </span><span style="color:#e6db74"> "type": "hono-mqtt", |
| </span><span style="color:#e6db74"> "enabled": true |
| </span><span style="color:#e6db74"> } ] |
| </span><span style="color:#e6db74"> }'</span> http://localhost:28080/v1/tenants/tenantMqttAdapter |
| |
| HTTP/1.1 <span style="color:#ae81ff">204</span> No Content |
| ETag: 8919c736-30aa-40ce-a45a-830b90c4cd42 |
| Content-Length: <span style="color:#ae81ff">0</span> |
| </code></pre></div><h3 id="delete-tenant">Delete Tenant</h3> |
| <ul> |
| <li>URI: <code>/v1/tenants/${tenantId}</code></li> |
| <li>Method: <code>DELETE</code></li> |
| <li>Status Codes: |
| <ul> |
| <li>204 (No Content): The tenant with the given identifier has been deleted.</li> |
| <li>404 (Not Found): The request could not be processed because no tenant with the given identifier exists.</li> |
| </ul> |
| </li> |
| </ul> |
| <p><strong>Example</strong></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-sh" data-lang="sh">curl -i -X DELETE http://localhost:28080/v1/tenants/tenantMqttAdapter |
| |
| HTTP/1.1 <span style="color:#ae81ff">204</span> No Content |
| Content-Length: <span style="color:#ae81ff">0</span> |
| </code></pre></div><h2 id="managing-device-registration-information">Managing Device Registration Information</h2> |
| <p>The following sections describe the resources representing the operations of the <a href="/hono/docs/1.0/api/device-registration/">Device Registration API</a> and how they can be used to manage device registration information. |
| Please refer to the <a href="/hono/docs/1.0/api/management/">Device Registry HTTP API</a> for the specific elements that are explained in detail there.</p> |
| <h3 id="register-device">Register Device</h3> |
| <ul> |
| <li>URI: <code>/v1/devices/${tenantId}/${deviceId}</code></li> |
| <li>Method: <code>POST</code></li> |
| <li>Headers: |
| <ul> |
| <li>(required) <code>Content-Type</code>: <code>application/json</code></li> |
| </ul> |
| </li> |
| <li>Request Body: |
| <ul> |
| <li>(required) A JSON object as specified by <a href="/hono/docs/1.0/api/management/">Device schema</a> of the HTTP API specification.</li> |
| </ul> |
| </li> |
| <li>Status Codes: |
| <ul> |
| <li>201 (Created): Device has been registered successfully under resource indicated by <code>Location</code> header.</li> |
| <li>400 (Bad Request): Device has not been registered because the request was malformed, e .g. a required header is missing (the body may contain hints regarding the problem).</li> |
| <li>409 (Conflict): There already exists a device with the given ID. The request has not been processed.</li> |
| </ul> |
| </li> |
| </ul> |
| <p><strong>Example</strong></p> |
| <p>The following command registers a device with ID <code>4711</code> for tenant <code>DEFAULT_TENANT</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-sh" data-lang="sh">curl -i -X POST -H <span style="color:#e6db74">'Content-Type: application/json'</span> --data-binary <span style="color:#e6db74">'{ |
| </span><span style="color:#e6db74"> "ext": { |
| </span><span style="color:#e6db74"> "ep": "IMEI4711" |
| </span><span style="color:#e6db74"> } |
| </span><span style="color:#e6db74">}'</span> http://localhost:28080/v1/devices/DEFAULT_TENANT/4711 |
| </code></pre></div><p>The response will contain a <code>Location</code> header containing the resource path created for the device. In this example it will look |
| like this:</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-sh" data-lang="sh">HTTP/1.1 <span style="color:#ae81ff">201</span> Created |
| Location: /v1/devices/DEFAULT_TENANT/4711 |
| ETag: becc93d7-ab0f-48ec-ad26-debdf339cbf4 |
| Content-Type: application/json; charset<span style="color:#f92672">=</span>utf-8 |
| |
| <span style="color:#f92672">{</span><span style="color:#e6db74">"id"</span>: <span style="color:#e6db74">"4711"</span><span style="color:#f92672">}</span> |
| </code></pre></div><h3 id="read-device">Read Device</h3> |
| <ul> |
| <li>URI: <code>/v1/devices/${tenantId}/${deviceId}</code></li> |
| <li>Method: <code>GET</code></li> |
| <li>Status Codes: |
| <ul> |
| <li>200 (OK): A device with the given identifier has been found. The response body contains the registration information as specified by <a href="/hono/docs/1.0/api/management/">Device schema</a> of the HTTP API specification.</li> |
| <li>404 (Not Found): No device with the given identifier is registered for the given tenant.</li> |
| </ul> |
| </li> |
| </ul> |
| <p><strong>Example</strong></p> |
| <p>The following command retrieves registration data for device <code>4711</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-sh" data-lang="sh">curl -i http://localhost:28080/v1/devices/DEFAULT_TENANT/4711 |
| |
| HTTP/1.1 <span style="color:#ae81ff">200</span> OK |
| Content-Type: application/json; charset<span style="color:#f92672">=</span>utf-8 |
| |
| <span style="color:#f92672">{</span> |
| <span style="color:#e6db74">"enabled"</span>: true, |
| <span style="color:#e6db74">"ext"</span>: <span style="color:#f92672">{</span> |
| <span style="color:#e6db74">"ep"</span>: <span style="color:#e6db74">"IMEI4711"</span> |
| <span style="color:#f92672">}</span> |
| <span style="color:#f92672">}</span> |
| </code></pre></div><h3 id="update-device">Update Device</h3> |
| <ul> |
| <li>URI: <code>/devices/v1/${tenantId}/${deviceId}</code></li> |
| <li>Method: <code>PUT</code></li> |
| <li>Headers: |
| <ul> |
| <li>(required) <code>Content-Type</code>: <code>application/json</code></li> |
| </ul> |
| </li> |
| <li>Parameters (encoded as a JSON object in the request body):</li> |
| <li>Request Body: |
| <ul> |
| <li>(required) A JSON object as specified by <a href="/hono/docs/1.0/api/management/">Device schema</a> of the HTTP API specification. All existing registration information will be replaced by the data provided in the object.</li> |
| </ul> |
| </li> |
| <li>Status Codes: |
| <ul> |
| <li>204 (No Content): Device registration data has been updated.</li> |
| <li>400 (Bad Request): Device registration has not been updated because the request was malformed, e .g. a required header is missing (the body may contain hints regarding the problem).</li> |
| <li>404 (Not Found): No device with the given identifier is registered for the given tenant.</li> |
| </ul> |
| </li> |
| </ul> |
| <p><strong>Example</strong></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-sh" data-lang="sh">curl -i -X PUT -H <span style="color:#e6db74">'Content-Type: application/json'</span> --data-binary <span style="color:#e6db74">'{ |
| </span><span style="color:#e6db74"> "ext": { |
| </span><span style="color:#e6db74"> "ep": "IMEI4711", |
| </span><span style="color:#e6db74"> "psk-id": "psk4711" |
| </span><span style="color:#e6db74"> } |
| </span><span style="color:#e6db74">}'</span> http://localhost:28080/v1/devices/DEFAULT_TENANT/4711 |
| |
| HTTP/1.1 <span style="color:#ae81ff">204</span> No Content |
| Content-Length: <span style="color:#ae81ff">0</span> |
| </code></pre></div><h3 id="delete-device">Delete Device</h3> |
| <ul> |
| <li>URI: <code>/v1/devices/${tenantId}/${deviceId}</code></li> |
| <li>Method: <code>DELETE</code></li> |
| <li>Status Codes: |
| <ul> |
| <li>204 (No Content): Device registration has been deleted.</li> |
| <li>404 (Not Found): No device with the given identifier is registered for the given tenant.</li> |
| </ul> |
| </li> |
| </ul> |
| <p><strong>Example</strong></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-sh" data-lang="sh">curl -i -X DELETE http://localhost:28080/v1/devices/DEFAULT_TENANT/4711 |
| |
| HTTP/1.1 <span style="color:#ae81ff">204</span> No Content |
| Content-Length: <span style="color:#ae81ff">0</span> |
| </code></pre></div><h2 id="managing-credentials">Managing Credentials</h2> |
| <p>The following sections describe the resources representing the operations of the Credentials API and how they can be used to manage credentials for devices. |
| Please refer to the <a href="/hono/docs/1.0/api/management/">Device Registry HTTP API</a> for the specific elements that are explained in detail there.</p> |
| <h3 id="update-credentials-for-a-device">Update Credentials for a Device</h3> |
| <ul> |
| <li>URI: <code>/v1/credentials/${tenantId}/${deviceId}</code></li> |
| <li>Method: <code>PUT</code></li> |
| <li>Request Headers: |
| <ul> |
| <li>(required) <code>Content-Type</code>: <code>application/json</code> (no other type supported)</li> |
| </ul> |
| </li> |
| <li>Request Body: |
| <ul> |
| <li>(required) A JSON object as specified by <a href="/hono/docs/1.0/api/management/">Credentials schema</a> of the HTTP API specification.</li> |
| </ul> |
| </li> |
| <li>Status Codes: |
| <ul> |
| <li>204 (No Content): Credentials have been updated successfully.</li> |
| <li>400 (Bad Request): The credentials have not been added because the request was malformed, e .g. because the payload did not contain required values. The response body may contain hints regarding the cause of the problem.</li> |
| </ul> |
| </li> |
| <li>Response Headers: |
| <ul> |
| <li><code>ETag</code>: Version of the resource</li> |
| </ul> |
| </li> |
| </ul> |
| <p><strong>Example</strong></p> |
| <p>The following command adds some <code>hashed-password</code> credentials from a given plain text password for device <code>4710</code> using authentication identifier <code>sensor10</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-sh" data-lang="sh">curl -i -X PUT -H <span style="color:#e6db74">'Content-Type: application/json'</span> --data-binary <span style="color:#e6db74">'[{ |
| </span><span style="color:#e6db74"> "type": "hashed-password", |
| </span><span style="color:#e6db74"> "auth-id": "sensor10", |
| </span><span style="color:#e6db74"> "secrets": [{ |
| </span><span style="color:#e6db74"> "pwd-plain": "mylittlesecret" |
| </span><span style="color:#e6db74"> }] |
| </span><span style="color:#e6db74">}]'</span> http://localhost:28080/v1/credentials/DEFAULT_TENANT/4710 |
| |
| HTTP/1.1 <span style="color:#ae81ff">204</span> No Content |
| ETag: becc93d7-ab0f-48ec-ad26-debdf339cbf4x |
| </code></pre></div><p>This uses a convenient option which lets the Device Registry do the hashing of the password. The following command retrieves the credentials that are stored by the Device Registry as a result of the command above:</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-sh" data-lang="sh">curl -i http://localhost:28080/v1/credentials/DEFAULT_TENANT/4710 |
| |
| HTTP/1.1 <span style="color:#ae81ff">200</span> OK |
| Content-Type: application/json; charset<span style="color:#f92672">=</span>utf-8 |
| ETag: becc93d7-ab0f-48ec-ad26-debdf339cbf4x |
| |
| <span style="color:#f92672">[{</span> |
| <span style="color:#e6db74">"type"</span>: <span style="color:#e6db74">"hashed-password"</span>, |
| <span style="color:#e6db74">"auth-id"</span>: <span style="color:#e6db74">"sensor10"</span>, |
| <span style="color:#e6db74">"enabled"</span>: true, |
| <span style="color:#e6db74">"secrets"</span>: <span style="color:#f92672">[</span> |
| <span style="color:#f92672">{</span> |
| <span style="color:#e6db74">"pwd-hash"</span>: <span style="color:#e6db74">"</span>$2<span style="color:#e6db74">a</span>$10$uc<span style="color:#e6db74">.qVDwXeDRE1DWa1sM9iOaY9wuevjfALGMtXmHKP.SJDEqg0q7M6"</span>, |
| <span style="color:#e6db74">"hash-function"</span>: <span style="color:#e6db74">"bcrypt"</span> |
| <span style="color:#f92672">}</span> |
| <span style="color:#f92672">]</span> |
| <span style="color:#f92672">}]</span> |
| </code></pre></div><p>The following commands add some <code>hashed-password</code> credentials for device <code>4720</code> using authentication identifier <code>sensor20</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-sh" data-lang="sh">PWD_HASH<span style="color:#f92672">=</span><span style="color:#66d9ef">$(</span>echo -n <span style="color:#e6db74">"mylittlesecret"</span> | openssl dgst -binary -sha512 | base64 -w 0<span style="color:#66d9ef">)</span> |
| curl -i -X PUT -H <span style="color:#e6db74">'Content-Type: application/json'</span> --data-binary <span style="color:#e6db74">'[{ |
| </span><span style="color:#e6db74"> "type": "hashed-password", |
| </span><span style="color:#e6db74"> "auth-id": "sensor20", |
| </span><span style="color:#e6db74"> "secrets": [{ |
| </span><span style="color:#e6db74"> "hash-function": "sha-512", |
| </span><span style="color:#e6db74"> "pwd-hash": "'</span>$PWD_HASH<span style="color:#e6db74">'" |
| </span><span style="color:#e6db74"> }] |
| </span><span style="color:#e6db74"> }]'</span> http://localhost:28080/v1/credentials/DEFAULT_TENANT/4720 |
| |
| HTTP/1.1 <span style="color:#ae81ff">204</span> No Content |
| ETag: 02c99fb5-af8c-409f-8520-b405e224b27f |
| </code></pre></div><p>The following command adds an expiration date to the <code>hashed-password</code> credentials for authentication identifier <code>sensor20</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-sh" data-lang="sh">PWD_HASH<span style="color:#f92672">=</span><span style="color:#66d9ef">$(</span>echo -n <span style="color:#e6db74">"mylittlesecret"</span> | openssl dgst -binary -sha512 | base64 -w 0<span style="color:#66d9ef">)</span> |
| curl -i -X PUT -H <span style="color:#e6db74">'Content-Type: application/json'</span> --data-binary <span style="color:#e6db74">'{ |
| </span><span style="color:#e6db74"> "device-id": "4720", |
| </span><span style="color:#e6db74"> "type": "hashed-password", |
| </span><span style="color:#e6db74"> "auth-id": "sensor20", |
| </span><span style="color:#e6db74"> "secrets": [{ |
| </span><span style="color:#e6db74"> "hash-function": "sha-512", |
| </span><span style="color:#e6db74"> "pwd-hash": "'</span>$PWD_HASH<span style="color:#e6db74">'", |
| </span><span style="color:#e6db74"> "not-after": "2018-01-01T00:00:00+01:00" |
| </span><span style="color:#e6db74"> }] |
| </span><span style="color:#e6db74">}'</span> http://localhost:28080/v1/credentials/DEFAULT_TENANT/4720 |
| |
| HTTP/1.1 <span style="color:#ae81ff">204</span> No Content |
| ETag: becc93d7-ab0f-48ec-ad26-debdf339cbf4x |
| </code></pre></div><p>Multiple credentials of different type can be registered for the same authentication identifier. |
| The following commands add <code>psk</code> credentials for the same device <code>4720</code> using authentication identifier <code>sensor20</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-sh" data-lang="sh">SHARED_KEY<span style="color:#f92672">=</span><span style="color:#66d9ef">$(</span>echo -n <span style="color:#e6db74">"TheSharedKey"</span> | base64 -w 0<span style="color:#66d9ef">)</span> |
| curl -i -X PUT -H <span style="color:#e6db74">'Content-Type: application/json'</span> --data-binary <span style="color:#e6db74">'[ |
| </span><span style="color:#e6db74">{ |
| </span><span style="color:#e6db74"> "type": "hashed-password", |
| </span><span style="color:#e6db74"> "auth-id": "sensor20", |
| </span><span style="color:#e6db74"> "secrets": [{ |
| </span><span style="color:#e6db74"> "hash-function": "bcrypt", |
| </span><span style="color:#e6db74"> "pwd-hash": "$2a$10$uc.qVDwXeDRE1DWa1sM9iOaY9wuevjfALGMtXmHKP.SJDEqg0q7M6" |
| </span><span style="color:#e6db74"> }] |
| </span><span style="color:#e6db74">}, |
| </span><span style="color:#e6db74">{ |
| </span><span style="color:#e6db74"> "device-id": "4720", |
| </span><span style="color:#e6db74"> "type": "psk", |
| </span><span style="color:#e6db74"> "auth-id": "sensor20", |
| </span><span style="color:#e6db74"> "secrets": [{ |
| </span><span style="color:#e6db74"> "key": "'</span>$SHARED_KEY<span style="color:#e6db74">'" |
| </span><span style="color:#e6db74"> }] |
| </span><span style="color:#e6db74"> }]'</span> http://localhost:28080/v1/credentials/DEFAULT_TENANT/4720 |
| |
| HTTP/1.1 <span style="color:#ae81ff">204</span> No Content |
| ETag: 122c971a-505a-4336-8f7d-640360e909bc |
| </code></pre></div><p>The following command deletes all credentials for device <code>4710</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-sh" data-lang="sh">curl -i -X PUT -H <span style="color:#e6db74">'Content-Type: application/json'</span> --data-binary <span style="color:#e6db74">'[]'</span> http://localhost:28080/v1/credentials/DEFAULT_TENANT/4710 |
| |
| HTTP/1.1 <span style="color:#ae81ff">204</span> No Content |
| ETag: d383ba4d-1853-4d03-b322-b7ff5af05ae2 |
| </code></pre></div><h3 id="get-all-credentials-for-a-device">Get all Credentials for a Device</h3> |
| <ul> |
| <li>URI: <code>/v1/credentials/${tenantId}/${deviceId}</code></li> |
| <li>Method: <code>GET</code></li> |
| <li>Status Codes: |
| <ul> |
| <li>200 (OK): Credentials for the device have been found, body contains the credentials. The response body contains the registration information as specified by <a href="/hono/docs/1.0/api/management/">Credentials schema</a> of the HTTP API specification.</li> |
| <li>404 (Not Found): No credentials for the device are registered.</li> |
| </ul> |
| </li> |
| </ul> |
| <p><strong>Example</strong></p> |
| <p>The following command retrieves credentials for device <code>4720</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-sh" data-lang="sh">curl -i http://localhost:28080/v1/credentials/DEFAULT_TENANT/4720 |
| |
| HTTP/1.1 <span style="color:#ae81ff">200</span> OK |
| Content-Type: application/json; charset<span style="color:#f92672">=</span>utf-8 |
| ETag: f3449b77-2c84-4b09-8d04-2b305876e0cb |
| |
| <span style="color:#f92672">{[</span> |
| <span style="color:#f92672">{</span> |
| <span style="color:#e6db74">"auth-id"</span>: <span style="color:#e6db74">"sensor20"</span>, |
| <span style="color:#e6db74">"enabled"</span>: true, |
| <span style="color:#e6db74">"secrets"</span>: <span style="color:#f92672">[</span> |
| <span style="color:#f92672">{</span> |
| <span style="color:#e6db74">"hash-function"</span>: <span style="color:#e6db74">"sha-512"</span>, |
| <span style="color:#e6db74">"pwd-hash"</span>: <span style="color:#e6db74">"tnxz0zDFs+pJGdCVSuoPE4TnamXsfIjBEOb0rg3e9WFD9KfbCkoRuwVZKgRWInfqp87kCLsoV/HEwdJwgw793Q=="</span> |
| <span style="color:#f92672">}</span> |
| <span style="color:#f92672">]</span>, |
| <span style="color:#e6db74">"type"</span>: <span style="color:#e6db74">"hashed-password"</span> |
| <span style="color:#f92672">}</span>, |
| <span style="color:#f92672">{</span> |
| <span style="color:#e6db74">"auth-id"</span>: <span style="color:#e6db74">"sensor20"</span>, |
| <span style="color:#e6db74">"enabled"</span>: true, |
| <span style="color:#e6db74">"secrets"</span>: <span style="color:#f92672">[</span> |
| <span style="color:#f92672">{</span> |
| <span style="color:#e6db74">"key"</span>: <span style="color:#e6db74">"VGhlU2hhcmVkS2V5"</span> |
| <span style="color:#f92672">}</span> |
| <span style="color:#f92672">]</span>, |
| <span style="color:#e6db74">"type"</span>: <span style="color:#e6db74">"psk"</span> |
| <span style="color:#f92672">}</span> |
| <span style="color:#f92672">]}</span> |
| </code></pre></div> |
| |
| <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?1625793047"></script> |
| <script src="/hono/docs/js/perfect-scrollbar.min.js?1625793047"></script> |
| <script src="/hono/docs/js/perfect-scrollbar.jquery.min.js?1625793047"></script> |
| <script src="/hono/docs/js/jquery.sticky.js?1625793047"></script> |
| <script src="/hono/docs/js/featherlight.min.js?1625793047"></script> |
| <script src="/hono/docs/js/highlight.pack.js?1625793047"></script> |
| <script>hljs.initHighlightingOnLoad();</script> |
| <script src="/hono/docs/js/modernizr.custom-3.6.0.js?1625793047"></script> |
| <script src="/hono/docs/js/learn.js?1625793047"></script> |
| <script src="/hono/docs/js/hugo-learn.js?1625793047"></script> |
| |
| <link href="/hono/docs/mermaid/mermaid.css?1625793047" rel="stylesheet" /> |
| <script src="/hono/docs/mermaid/mermaid.js?1625793047"></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> |
| |