reddb-cli 0.1.2-next.60 → 0.1.2-next.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -240,6 +240,39 @@ Remote backends: S3, R2, DigitalOcean Spaces, GCS, Turso, Cloudflare D1, local f
|
|
|
240
240
|
|
|
241
241
|
---
|
|
242
242
|
|
|
243
|
+
## KV REST API
|
|
244
|
+
|
|
245
|
+
Every collection doubles as a key-value store with dedicated REST endpoints:
|
|
246
|
+
|
|
247
|
+
```bash
|
|
248
|
+
# Write a key
|
|
249
|
+
curl -X PUT http://127.0.0.1:8080/collections/settings/kvs/theme \
|
|
250
|
+
-H 'content-type: application/json' -d '{"value": "dark"}'
|
|
251
|
+
|
|
252
|
+
# Read a key
|
|
253
|
+
curl http://127.0.0.1:8080/collections/settings/kvs/theme
|
|
254
|
+
|
|
255
|
+
# Delete a key
|
|
256
|
+
curl -X DELETE http://127.0.0.1:8080/collections/settings/kvs/theme
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
Config keys work the same way -- read, write, or delete any `red_config` setting at runtime:
|
|
260
|
+
|
|
261
|
+
```bash
|
|
262
|
+
# Set a config key
|
|
263
|
+
curl -X PUT http://127.0.0.1:8080/config/red.ai.default.provider \
|
|
264
|
+
-d '{"value": "groq"}'
|
|
265
|
+
|
|
266
|
+
# Read a config key
|
|
267
|
+
curl http://127.0.0.1:8080/config/red.ai.default.provider
|
|
268
|
+
|
|
269
|
+
# Or manage config from SQL
|
|
270
|
+
SET CONFIG red.ai.default.provider = 'groq'
|
|
271
|
+
SHOW CONFIG red.ai
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
243
276
|
## 3 Deployment Modes
|
|
244
277
|
|
|
245
278
|
| Mode | Think of it as... | Access via |
|