You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/kv/api/list-keys.mdx
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,9 +13,9 @@ To list all the keys in your KV namespace, call the `list()` method of the [KV b
13
13
env.NAMESPACE.list();
14
14
```
15
15
16
-
The `list()` method returns a promise you can `await` on to get the value.
16
+
The `list()` method returns a promise you can `await` on to get the value.
17
17
18
-
#### Example
18
+
#### Example
19
19
20
20
An example of listing keys from within a Worker:
21
21
@@ -63,16 +63,16 @@ env.NAMESPACE.list(options?)
63
63
#### Response
64
64
* `response`: `Promise<{
65
65
keys: {
66
-
name:string,
66
+
name:string,
67
67
expiration?:number,
68
68
metadata?:object
69
69
}[],
70
70
list_complete:boolean,
71
71
cursor:string
72
72
}>`
73
-
* A `Promise` that resolves to an object containing `keys`, `list_complete`, and `cursor` attributes.
73
+
* A `Promise` that resolves to an object containing `keys`, `list_complete`, and `cursor` attributes.
74
74
* `keys` is an array that contains an object for each key listed. Each object has attributes `name`, `expiration` (optional), and `metadata` (optional). If the key-value pair has an expiration set, the expiration will be present and in absolute value form (even if it was set in TTL form). If the key-value pair has non-null metadata set, the metadata will be present.
75
-
* `list_complete` is a boolean, which will be `false` if there are more keys to fetch, even if the `keys` array is empty.
75
+
* `list_complete` is a boolean, which will be `false` if there are more keys to fetch, even if the `keys` array is empty.
76
76
* `cursor` is a `string` used for paginating responses.
77
77
78
78
The `list()` method returns a promise which resolves with an object that looks like the following:
You can also [list keys on the command line with Wrangler](/kv/reference/kv-commands/#list) or [with the API](/api/operations/workers-kv-namespace-list-a-namespace'-s-keys).
162
+
You can also [list keys on the command line with Wrangler](/kv/reference/kv-commands/#list) or [with the REST API](/api/operations/workers-kv-namespace-list-a-namespace'-s-keys).
Copy file name to clipboardExpand all lines: src/content/docs/kv/api/read-key-value-pairs.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -162,5 +162,5 @@ The effective `cacheTtl` of an already cached item can be reduced by getting it
162
162
163
163
## Other methods to access KV
164
164
165
-
You can [read key-value pairs from the command line with Wrangler](/kv/reference/kv-commands/#get) and [from the API](/api/operations/workers-kv-namespace-read-key-value-pair).
165
+
You can [read key-value pairs from the command line with Wrangler](/kv/reference/kv-commands/#get) and [from the REST API](/api/operations/workers-kv-namespace-read-key-value-pair).
Copy file name to clipboardExpand all lines: src/content/docs/kv/api/write-key-value-pairs.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,7 +84,7 @@ Refer to [How KV works](/kv/concepts/how-kv-works/) for more information on this
84
84
85
85
### Write data in bulk
86
86
87
-
Write more than one key-value pair at a time with Wrangler or [via the API](/api/operations/workers-kv-namespace-write-multiple-key-value-pairs).
87
+
Write more than one key-value pair at a time with Wrangler or [via the REST API](/api/operations/workers-kv-namespace-write-multiple-key-value-pairs).
88
88
89
89
The bulk API can accept up to 10,000 KV pairs at once.
90
90
@@ -270,4 +270,4 @@ async function retryWithBackoff(
270
270
271
271
## Other methods to access KV
272
272
273
-
You can also [write key-value pairs from the command line with Wrangler](/kv/reference/kv-commands/#create) and [write data via the API](/api/operations/workers-kv-namespace-write-key-value-pair-with-metadata).
273
+
You can also [write key-value pairs from the command line with Wrangler](/kv/reference/kv-commands/#create) and [write data via the REST API](/api/operations/workers-kv-namespace-write-key-value-pair-with-metadata).
0 commit comments