Skip to content

Commit

Permalink
deploy: 8d84356
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierHecart committed Feb 12, 2025
1 parent 20804b4 commit 37e473a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions docs/apis/rest/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@
</span></span><span style=display:flex><span>curl -X PUT -H <span style=color:#c30>&#34;content-type:application/json&#34;</span> -d <span style=color:#c30>&#39;{&#34;value&#34;: &#34;Hello World!&#34;}&#39;</span> http://localhost:8000/demo/example/test
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#09f;font-style:italic># Create a Memory storage on demo/test/** via a Put on admin space (@/...)</span>
</span></span><span style=display:flex><span>curl -X PUT -H <span style=color:#c30>&#39;content-type:application/json&#39;</span> http://localhost:8000/@/router/local/config/plugins/storage_manager/storages/demo -d <span style=color:#c30>&#39;{key_expr:&#34;demo/test/**&#34;, volume:&#34;memory&#34;}&#39;</span>
</span></span><span style=display:flex><span>curl -X PUT -H <span style=color:#c30>&#39;content-type:application/json&#39;</span> http://localhost:8000/@/local/router/config/plugins/storage_manager/storages/demo -d <span style=color:#c30>&#39;{key_expr:&#34;demo/test/**&#34;, volume:&#34;memory&#34;}&#39;</span>
</span></span></code></pre></div><h3 id=delete>DELETE</h3><p>Binds to the <strong>remove(keyexpr)</strong> operation on Zenoh.</p><ul><li><strong>URL</strong>: <code>http://host:8000/&lt;keyexpr></code></li><li><strong>body</strong>: none</li><li><strong>headers</strong>: none</li></ul><p>Examples using curl:</p><div class=highlight><pre tabindex=0 style=background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#09f;font-style:italic># Remove the value with key demo/example/test</span>
</span></span><span style=display:flex><span>curl -X DELETE http://localhost:8000/demo/example/test
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#09f;font-style:italic># Remove a storage via a Remove on admin space (@/...)</span>
</span></span><span style=display:flex><span>curl -X DELETE http://localhost:8000/@/router/local/config/plugins/storage_manager/storages/demo
</span></span><span style=display:flex><span>curl -X DELETE http://localhost:8000/@/local/router/config/plugins/storage_manager/storages/demo
</span></span></code></pre></div><div class=ato-next><b>Next up</b>: <a href=/docs/apis/kotlin/>Kotlin API</a></div></main></div></div><footer class="ato-footer text-muted"><div class="container-fluid p-6 p-md-5"><div class=row><div class=col-md-2><h5>Eclipse Incubation</h5><p><img src=../../../img/eclipse-incubation.png style=width:100px></p><p>Eclipse zenoh &trade; is an incubating project under the Eclipse Foundation.</p></div><div class=col-md-2><h5>More Information</h5><p><a href=https://www.eclipse.org/legal target=_blank>Legal</a></p><p><a href=https://www.eclipse.org/legal/privacy.php target=_blank>Privacy policy</a></p><p><a href=https://www.eclipse.org/legal/termsofuse.php target=_blank>Terms of use</a></p><p><a href=https://www.eclipse.org/legal/copyright.php target=_blank>Copyright</a></p><p><a href=https://www.eclipse.org/security/ target=_blank>Report a security issue</a></p><p><a href=https://www.eclipse.org/legal/epl-2.0/ target=_blank>Eclipse Public License 2.0</a></p><p><a href=https://www.apache.org/licenses/LICENSE-2.0 target=_blank>Apache License 2.0</a></p><p><a href=https://www.eclipse.org/ target=_blank>Eclipse Foundation</a></p></div><div class=col-md-2><h5>Sponsored by:</h5><p><a href=https://www.eclipse.org target=_blank><img src=../../../img/eclipse-foundation.svg style=width:120px></a></p><p><a href=https://zettascale.tech target=_blank><img src=../../../img/zettascale-dark.svg style=width:120px></a></p></div><div class=col-md-2><h5>Follow us</h5><p><a href=https://github.com/eclipse-zenoh/zenoh><i class="fa fa-github" aria-hidden=true></i>
GitHub</a></p><p><a href=https://discord.gg/vSDSpqnbkm><i class="fa fa fa-comments-o" aria-hidden=true></i>
Discord</a></p><p><a href=https://www.youtube.com/channel/UCslbiyiqgOAPMjCrPWIfQ5Q><i class="fa fa-youtube-play" aria-hidden=true></i> Youtube</a></p><p><a href=../../../docs/overview/what-is-zenoh><i class="fa fa-info-circle" aria-hidden=true></i> About</a></p></div><div class=col-md-2><p><img src=../../../img/zenoh-dragon-150x163.png style=width:45px></p><p>Eclipse zenoh &trade; is free, open source and always will be.</p><p>Copyright &copy 2022 Eclipse Foundation</p><p>Built with <a href=https://gohugo.io/ target=_blank>HUGO</a></p></div></div></div></footer><script src=https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js integrity=sha384-3ceskX3iaEnIogmQchP8opvBy3Mi7Ce34nWjpBIwVTHfGYWQS9jwHDVRnpKKHJg7 crossorigin=anonymous></script>
Expand Down
6 changes: 3 additions & 3 deletions docs/getting-started/quick-test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
</span></span><span style=display:flex><span> - ./zenoh_docker:/root/.zenoh
</span></span><span style=display:flex><span> environment:
</span></span><span style=display:flex><span> - <span style=color:#033>RUST_LOG</span><span style=color:#555>=</span>debug
</span></span></code></pre></div><hr><h2 id=first-tests-using-the-rest-api>First tests using the REST API</h2><p>The complete Eclipse zenoh&rsquo;s key/value space is accessible through the REST API, using regular HTTP GET, PUT and DELETE methods. In those examples, we use the <strong>curl</strong> command line tool.</p><h3 id=managing-the-admin-space>Managing the admin space</h3><ul><li>Get info of the local Zenoh router:<div class=highlight><pre tabindex=0 style=background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>curl http://localhost:8000/@/router/local
</span></span></code></pre></div></li><li>Add a memory storage on <code>demo/example/**</code>:<div class=highlight><pre tabindex=0 style=background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>curl -X PUT -H <span style=color:#c30>&#39;content-type:application/json&#39;</span> -d <span style=color:#c30>&#39;{key_expr:&#34;demo/example/**&#34;, volume: &#34;memory&#34;}&#39;</span> http://localhost:8000/@/router/local/config/plugins/storage_manager/storages/demo
</span></span></code></pre></div></li><li>Get the storages of the local router (should return the &ldquo;demo&rdquo; storage that has just been created):<div class=highlight><pre tabindex=0 style=background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>curl <span style=color:#c30>&#39;http://localhost:8000/@/router/local/status/plugins/storage_manager/storages/*&#39;</span>
</span></span></code></pre></div><hr><h2 id=first-tests-using-the-rest-api>First tests using the REST API</h2><p>The complete Eclipse zenoh&rsquo;s key/value space is accessible through the REST API, using regular HTTP GET, PUT and DELETE methods. In those examples, we use the <strong>curl</strong> command line tool.</p><h3 id=managing-the-admin-space>Managing the admin space</h3><ul><li>Get info of the local Zenoh router:<div class=highlight><pre tabindex=0 style=background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>curl http://localhost:8000/@/local/router
</span></span></code></pre></div></li><li>Add a memory storage on <code>demo/example/**</code>:<div class=highlight><pre tabindex=0 style=background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>curl -X PUT -H <span style=color:#c30>&#39;content-type:application/json&#39;</span> -d <span style=color:#c30>&#39;{key_expr:&#34;demo/example/**&#34;, volume: &#34;memory&#34;}&#39;</span> http://localhost:8000/@/local/router/config/plugins/storage_manager/storages/demo
</span></span></code></pre></div></li><li>Get the storages of the local router (should return the &ldquo;demo&rdquo; storage that has just been created):<div class=highlight><pre tabindex=0 style=background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>curl <span style=color:#c30>&#39;http://localhost:8000/@/local/router/status/plugins/storage_manager/storages/*&#39;</span>
</span></span></code></pre></div></li></ul><h3 id=putget-into-zenoh>Put/Get into Zenoh</h3><p>Assuming the memory storage has been added, as described above, you can now:</p><ul><li>Put a key/value into Zenoh:</li></ul><div class=highlight><pre tabindex=0 style=background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>curl -X PUT -H <span style=color:#c30>&#39;content-type:text/plain&#39;</span> -d <span style=color:#c30>&#39;Hello World!&#39;</span> http://localhost:8000/demo/example/test
</span></span></code></pre></div><ul><li>Retrieve the key/value:</li></ul><div class=highlight><pre tabindex=0 style=background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>curl http://localhost:8000/demo/example/test
</span></span></code></pre></div><ul><li>Remove the key value</li></ul><div class=highlight><pre tabindex=0 style=background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>curl -X DELETE http://localhost:8000/demo/example/test
Expand Down
2 changes: 1 addition & 1 deletion docs/manual/configuration/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</span></span><span style=display:flex><span> }
</span></span><span style=display:flex><span> <span style=color:#a00;background-color:#faa>}</span>
</span></span><span style=display:flex><span><span style=color:#a00;background-color:#faa>}</span>
</span></span></code></pre></div><ul><li>either via the <code>zenohd</code> command line option: <code>--adminspace-permissions &lt;[r|w|rw|none]></code></li></ul><p>Then you can change elements of it&rsquo;s configuration once it&rsquo;s started, by sending PUT messages to its <a href=../abstractions#admin-space>admin space</a>.</p><p>If one of the <code>zenohd</code> instances uses the REST plugin to expose Zenoh to HTTP requests, this can be done simply by sending such requests with tools such as <code>curl</code>.</p><p>Remember to enable the REST plugin in <code>zenohd</code> with the command line option <code>--rest-http-port=8000</code>.</p><p>To do this, use commands such as</p><div class=highlight><pre tabindex=0 style=background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>curl -X PUT http://localhost:8000/@/router/local/config/plugins/storage_manager/storages/my-storage -d <span style=color:#c30>&#39;{key_expr:&#34;demo/mystore/**&#34;, volume:{id:&#34;memory&#34;}}&#39;</span>
</span></span></code></pre></div><ul><li>either via the <code>zenohd</code> command line option: <code>--adminspace-permissions &lt;[r|w|rw|none]></code></li></ul><p>Then you can change elements of it&rsquo;s configuration once it&rsquo;s started, by sending PUT messages to its <a href=../abstractions#admin-space>admin space</a>.</p><p>If one of the <code>zenohd</code> instances uses the REST plugin to expose Zenoh to HTTP requests, this can be done simply by sending such requests with tools such as <code>curl</code>.</p><p>Remember to enable the REST plugin in <code>zenohd</code> with the command line option <code>--rest-http-port=8000</code>.</p><p>To do this, use commands such as</p><div class=highlight><pre tabindex=0 style=background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>curl -X PUT http://localhost:8000/@/local/router/config/plugins/storage_manager/storages/my-storage -d <span style=color:#c30>&#39;{key_expr:&#34;demo/mystore/**&#34;, volume:{id:&#34;memory&#34;}}&#39;</span>
</span></span><span style=display:flex><span><span style=color:#09f;font-style:italic># ^- REST plugin addr ^ ^--- config space --^ ^---- the path to the configured value ---^ ^-------------- the value to insert ----------------^</span>
</span></span></code></pre></div><p>Path-value pairs work much like they do when using <a href=#command-line-arguments>CLI arguments</a>.</p><p>Note that while you may attempt to change any part of the configuration through this mean, not all of its properties are actually watched.<br>For example, while the storage plugin watches for any change in its configuration and will attempt to act on it, the REST plugin will only log a warning that it observed a change, but won&rsquo;t apply it.<br>Changes to non-plugin parts of the configuration may be registered by the configuration, but not acted upon, such as the <code>mode</code> field of the configuration which is only ever read at startup.</p><div class=ato-next><b>Next up</b>: <a href=/docs/manual/plugins/>Zenoh plugins</a></div></main></div></div><footer class="ato-footer text-muted"><div class="container-fluid p-6 p-md-5"><div class=row><div class=col-md-2><h5>Eclipse Incubation</h5><p><img src=../../../img/eclipse-incubation.png style=width:100px></p><p>Eclipse zenoh &trade; is an incubating project under the Eclipse Foundation.</p></div><div class=col-md-2><h5>More Information</h5><p><a href=https://www.eclipse.org/legal target=_blank>Legal</a></p><p><a href=https://www.eclipse.org/legal/privacy.php target=_blank>Privacy policy</a></p><p><a href=https://www.eclipse.org/legal/termsofuse.php target=_blank>Terms of use</a></p><p><a href=https://www.eclipse.org/legal/copyright.php target=_blank>Copyright</a></p><p><a href=https://www.eclipse.org/security/ target=_blank>Report a security issue</a></p><p><a href=https://www.eclipse.org/legal/epl-2.0/ target=_blank>Eclipse Public License 2.0</a></p><p><a href=https://www.apache.org/licenses/LICENSE-2.0 target=_blank>Apache License 2.0</a></p><p><a href=https://www.eclipse.org/ target=_blank>Eclipse Foundation</a></p></div><div class=col-md-2><h5>Sponsored by:</h5><p><a href=https://www.eclipse.org target=_blank><img src=../../../img/eclipse-foundation.svg style=width:120px></a></p><p><a href=https://zettascale.tech target=_blank><img src=../../../img/zettascale-dark.svg style=width:120px></a></p></div><div class=col-md-2><h5>Follow us</h5><p><a href=https://github.com/eclipse-zenoh/zenoh><i class="fa fa-github" aria-hidden=true></i>
GitHub</a></p><p><a href=https://discord.gg/vSDSpqnbkm><i class="fa fa fa-comments-o" aria-hidden=true></i>
Expand Down
Loading

0 comments on commit 37e473a

Please sign in to comment.