diff --git a/docs/apis/rest/index.html b/docs/apis/rest/index.html index b6584754..82baeace 100644 --- a/docs/apis/rest/index.html +++ b/docs/apis/rest/index.html @@ -43,12 +43,12 @@ curl -X PUT -H "content-type:application/json" -d '{"value": "Hello World!"}' http://localhost:8000/demo/example/test # Create a Memory storage on demo/test/** via a Put on admin space (@/...) -curl -X PUT -H 'content-type:application/json' http://localhost:8000/@/router/local/config/plugins/storage_manager/storages/demo -d '{key_expr:"demo/test/**", volume:"memory"}' +curl -X PUT -H 'content-type:application/json' http://localhost:8000/@/local/router/config/plugins/storage_manager/storages/demo -d '{key_expr:"demo/test/**", volume:"memory"}'
Binds to the remove(keyexpr) operation on Zenoh.
http://host:8000/<keyexpr>
Examples using curl:
# Remove the value with key demo/example/test
curl -X DELETE http://localhost:8000/demo/example/test
# Remove a storage via a Remove on admin space (@/...)
-curl -X DELETE http://localhost:8000/@/router/local/config/plugins/storage_manager/storages/demo
+curl -X DELETE http://localhost:8000/@/local/router/config/plugins/storage_manager/storages/demo
The complete Eclipse zenoh’s key/value space is accessible through the REST API, using regular HTTP GET, PUT and DELETE methods. In those examples, we use the curl command line tool.
curl http://localhost:8000/@/router/local
-
demo/example/**
:curl -X PUT -H 'content-type:application/json' -d '{key_expr:"demo/example/**", volume: "memory"}' http://localhost:8000/@/router/local/config/plugins/storage_manager/storages/demo
-
curl 'http://localhost:8000/@/router/local/status/plugins/storage_manager/storages/*'
+
The complete Eclipse zenoh’s key/value space is accessible through the REST API, using regular HTTP GET, PUT and DELETE methods. In those examples, we use the curl command line tool.
curl http://localhost:8000/@/local/router
+
demo/example/**
:curl -X PUT -H 'content-type:application/json' -d '{key_expr:"demo/example/**", volume: "memory"}' http://localhost:8000/@/local/router/config/plugins/storage_manager/storages/demo
+
curl 'http://localhost:8000/@/local/router/status/plugins/storage_manager/storages/*'
Assuming the memory storage has been added, as described above, you can now:
curl -X PUT -H 'content-type:text/plain' -d 'Hello World!' http://localhost:8000/demo/example/test
curl http://localhost:8000/demo/example/test
curl -X DELETE http://localhost:8000/demo/example/test
diff --git a/docs/manual/configuration/index.html b/docs/manual/configuration/index.html
index 65de52fe..71bc4c45 100644
--- a/docs/manual/configuration/index.html
+++ b/docs/manual/configuration/index.html
@@ -12,7 +12,7 @@
}
}
}
-
zenohd
command line option: --adminspace-permissions <[r|w|rw|none]>
Then you can change elements of it’s configuration once it’s started, by sending PUT messages to its admin space.
If one of the zenohd
instances uses the REST plugin to expose Zenoh to HTTP requests, this can be done simply by sending such requests with tools such as curl
.
Remember to enable the REST plugin in zenohd
with the command line option --rest-http-port=8000
.
To do this, use commands such as
curl -X PUT http://localhost:8000/@/router/local/config/plugins/storage_manager/storages/my-storage -d '{key_expr:"demo/mystore/**", volume:{id:"memory"}}'
+
zenohd
command line option: --adminspace-permissions <[r|w|rw|none]>
Then you can change elements of it’s configuration once it’s started, by sending PUT messages to its admin space.
If one of the zenohd
instances uses the REST plugin to expose Zenoh to HTTP requests, this can be done simply by sending such requests with tools such as curl
.
Remember to enable the REST plugin in zenohd
with the command line option --rest-http-port=8000
.
To do this, use commands such as
curl -X PUT http://localhost:8000/@/local/router/config/plugins/storage_manager/storages/my-storage -d '{key_expr:"demo/mystore/**", volume:{id:"memory"}}'
# ^- REST plugin addr ^ ^--- config space --^ ^---- the path to the configured value ---^ ^-------------- the value to insert ----------------^
Path-value pairs work much like they do when using CLI arguments.
Note that while you may attempt to change any part of the configuration through this mean, not all of its properties are actually watched.
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’t apply it.
Changes to non-plugin parts of the configuration may be registered by the configuration, but not acted upon, such as the mode
field of the configuration which is only ever read at startup.