diff --git a/content/docs/APIs/REST.md b/content/docs/APIs/REST.md index 926e3160..b86345c9 100644 --- a/content/docs/APIs/REST.md +++ b/content/docs/APIs/REST.md @@ -100,7 +100,7 @@ Examples using curl: 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"}' ``` ### DELETE @@ -118,6 +118,6 @@ Examples using curl: 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 ``` diff --git a/content/docs/getting-started/quick-test.md b/content/docs/getting-started/quick-test.md index d16e6dc1..349ad46a 100644 --- a/content/docs/getting-started/quick-test.md +++ b/content/docs/getting-started/quick-test.md @@ -67,15 +67,15 @@ The complete Eclipse zenoh's key/value space is accessible through the REST API, * Get info of the local Zenoh router: ```bash - curl http://localhost:8000/@/router/local + curl http://localhost:8000/@/local/router ``` * Add a memory storage on `demo/example/**`: ```bash - 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 -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 ``` * Get the storages of the local router (should return the "demo" storage that has just been created): ```bash - curl 'http://localhost:8000/@/router/local/status/plugins/storage_manager/storages/*' + curl 'http://localhost:8000/@/local/router/status/plugins/storage_manager/storages/*' ``` ### Put/Get into Zenoh diff --git a/content/docs/manual/configuration.md b/content/docs/manual/configuration.md index cb857187..c7a49ba7 100644 --- a/content/docs/manual/configuration.md +++ b/content/docs/manual/configuration.md @@ -76,7 +76,7 @@ Remember to enable the REST plugin in `zenohd` with the command line option `--r To do this, use commands such as ```bash -curl -X PUT http://localhost:8000/@/router/local/config/plugins/storage_manager/storages/my-storage -d '{key_expr:"demo/mystore/**", volume:{id:"memory"}}' +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 ----------------^ ``` diff --git a/content/docs/manual/plugin-storage-manager.md b/content/docs/manual/plugin-storage-manager.md index b2514f1f..8693fafe 100644 --- a/content/docs/manual/plugin-storage-manager.md +++ b/content/docs/manual/plugin-storage-manager.md @@ -107,20 +107,20 @@ fetch('http://hostname:8000/key/expression', { To create a volume, add an entry describing it to the configuration. Let's say you'd like to create "my-volume" on a node that had the influxdb daemon listen on port 8086: ```bash -curl -X PUT 'http://hostname:8000/@/router/local/config/plugins/storage_manager/volumes/my-volume' -H 'content-type:application/json' -d '{"backend": "influxdb", "url": "http://localhost:8086"}' +curl -X PUT 'http://hostname:8000/@/local/router/config/plugins/storage_manager/volumes/my-volume' -H 'content-type:application/json' -d '{"backend": "influxdb", "url": "http://localhost:8086"}' ``` Note that if you only planned on having a single volume relying on influxdb, you might as well name that volume "influxdb", saving you the need to specify that the "influxdb" backend is the one you want to use: ```bash -curl -X PUT 'http://hostname:8000/@/router/local/config/plugins/storage_manager/volumes/influxdb' -H 'content-type:application/json' -d '{"url": "http://localhost:8086"}' +curl -X PUT 'http://hostname:8000/@/local/router/config/plugins/storage_manager/volumes/influxdb' -H 'content-type:application/json' -d '{"url": "http://localhost:8086"}' ``` ### Removing a volume To remove a volume, simply delete its entry from the configuration with: ```bash -curl -X DELETE 'http://hostname:8000/@/router/local/config/plugins/storage_manager/volumes/my-volume' +curl -X DELETE 'http://hostname:8000/@/local/router/config/plugins/storage_manager/volumes/my-volume' ``` The storage manager will delete the associated storages as well. @@ -131,19 +131,19 @@ You can add storages at any time by adding them to the configuration through the The simplest volume to use is the integrated "memory" volume, since it requires no extra configuration. Let's have "my-storage" work on `demo/my-storage/**`: ```bash -curl -X PUT 'http://hostname:8000/@/router/local/config/plugins/storage_manager/storages/my-storage' -H 'content-type:application/json' -d '{"key_expr": "demo/my-storage/**", "volume": "memory"}' +curl -X PUT 'http://hostname:8000/@/local/router/config/plugins/storage_manager/storages/my-storage' -H 'content-type:application/json' -d '{"key_expr": "demo/my-storage/**", "volume": "memory"}' ``` Some volumes, like that "my-volume" one we created [earlier](#adding-a-volume), need a bit more configuration. Any volume supported by the `influxdb` backend, for example, needs to know on what database to store the data associated with each storage through a `db` argument: ```bash -curl -X PUT 'http://hostname:8000/@/router/local/config/plugins/storage_manager/storages/my-other-storage' -H 'content-type:application/json' -d '{"key_expr": "demo/my-other-storage/**", "volume": {"id": "my-volume", "db": "MyOtherStorage"}}' +curl -X PUT 'http://hostname:8000/@/local/router/config/plugins/storage_manager/storages/my-other-storage' -H 'content-type:application/json' -d '{"key_expr": "demo/my-other-storage/**", "volume": {"id": "my-volume", "db": "MyOtherStorage"}}' ``` ### Removing a storage Just like volumes, removing a storage is as simple as deleting its entry in the configuration. Note that removing a volume's last storage will not remove that volume: volumes with 0 storages depending on them are perfectly legal. ```bash -curl -X DELETE 'http://hostname:8000/@/router/local/config/plugins/storage_manager/storages/my-storage' +curl -X DELETE 'http://hostname:8000/@/local/router/config/plugins/storage_manager/storages/my-storage' ``` ### Checking a volume's or a storage's status