mirror of
https://codeberg.org/scip/anydb.git
synced 2026-07-09 19:24:32 +02:00
13
cmd/anydb.go
13
cmd/anydb.go
@@ -413,6 +413,13 @@ TEMPLATES
|
||||
|
||||
.Key - string
|
||||
.Value - string
|
||||
To be able to use the value in a template, you'll need to add the
|
||||
"-s" flag so that values are included in output data stream.
|
||||
Otherwise you can only use ".Preview".
|
||||
|
||||
.Preview string
|
||||
First line of entry value (if it is a string).
|
||||
|
||||
.Bin - []byte
|
||||
.Created - timestamp.Time
|
||||
To retrieve a string representation of the timestamp, use
|
||||
@@ -504,7 +511,7 @@ REST API
|
||||
Some curl example calls to the API:
|
||||
|
||||
Post a new key: curl -X PUT localhost:8787/anydb/v1/ \ -H 'Content-Type:
|
||||
application/json' \ -d '{"key":"foo","val":"bar"}'
|
||||
application/json' \ -d '{"key":"foo","data":"bar"}'
|
||||
|
||||
Retrieve the value:
|
||||
|
||||
@@ -514,6 +521,10 @@ REST API
|
||||
|
||||
curl localhost:8787/anydb/v1/
|
||||
|
||||
Delete an entry:
|
||||
|
||||
curl -s -X DELETE http://localhost:8787/anydb/v1/foo
|
||||
|
||||
BUGS
|
||||
In order to report a bug, unexpected behavior, feature requests or to
|
||||
submit a patch, please open an issue on github:
|
||||
|
||||
Reference in New Issue
Block a user