getBatch
Description
Gets multiple key-value entries by key(s).
Code Examples
Request
curl -X GET 'https://api.rivet.gg/kv/entries/batch'
Request Parameters
keys
Query parameter, required
watch_index
Query parameter, optional
A query parameter denoting the requests watch index.
namespace_id
Query parameter, optional
Response Body
entries
array<object>
(required)
entries[*].deleted
boolean
entries[*].key
string
(required)
A string representing a key in the key-value database.
Maximum length of 512 characters.
Recommended Key Path Format
Key path components are split by a slash (e.g. a/b/c
has the path components ["a", "b", "c"]
). Slashes can be escaped by using a backslash (e.g. a/b\/c/d
has the path components ["a", "b/c", "d"]
).
This format is not enforced by Rivet, but the tools built around Rivet KV work better if this format is used.
entries[*].value
object
(required)
A JSON object stored in the KV database.
A null
value indicates the entry is deleted.
Maximum length of 262,144 bytes when encoded.
watch
object
(required)
Provided by watchable endpoints used in blocking loops.
watch.index
string
(required)
Index indicating the version of the data responded.
Pass this to WatchQuery
to block and wait for the next response.