| Crates.io | zenoh-plugin-rest |
| lib.rs | zenoh-plugin-rest |
| version | 1.7.2 |
| created_at | 2021-11-24 18:45:08.296848+00 |
| updated_at | 2026-01-08 16:11:11.803648+00 |
| description | The zenoh REST plugin |
| homepage | http://zenoh.io |
| repository | https://github.com/eclipse-zenoh/zenoh |
| max_upload_size | |
| id | 487244 |
| size | 181,772 |
The Eclipse Zenoh: Zero Overhead Pub/Sub, Store/Query and Compute.
Zenoh (pronounce /zeno/) unifies data in motion, data at rest and computations. It carefully blends traditional pub/sub with geo-distributed storages, queries and computations, while retaining a level of time and space efficiency that is well beyond any of the mainstream stacks.
Check the website zenoh.io for more information and installation instructions.
See also the roadmap for more detailed technical information.
zenohd routerThe plugin exposes a REST API in zenohd.
The zenohd links this plugin statically, it's not necessary to install it. To activate the REST plugin
the CLI argument --rest-http-port=<port> should be passed to zenohd.
The port can also be configured in the plugin configuration in the plugins section
of the config.json.
"plugins": {
"rest": {
"http_port": 8000,
}
}
This plugin translates PUT and DELETE REST operations into the pub/sub API and GET operations to the query/reply API.
For example:
cargo run -- --config DEFAULT_CONFIG.json5 --rest-http-port 8000
cargo run --example z_sub -- -k foo/bar
curl -X PUT -d '"Hello World!"' http://localhost:8080/foo/bar
The subscriber in z_sub example prints
>> [Subscriber] Received PUT ('foo/bar': '"Hello World!"')
cargo run --example z_queryable -- -k foo/bar
curl http://localhost:8080/foo/bar
The queryable z_get prints
>> [Queryable ] Received Query 'foo/bar'
>> [Queryable ] Responding ('foo/bar': 'Queryable from Rust!')
and curl prints
[{"key":"foo/bar","value":"UXVlcnlhYmxlIGZyb20gUnVzdCE=","encoding":"zenoh/bytes","timestamp":null}]
See also examples of using REST API for storages in the zenoh-plugin-storage-manager.