Skip to content

Commit ed241af

Browse files
committed
Specifying REST API where relevant. Renaming section to "Worker Binding API"
1 parent 6863967 commit ed241af

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

src/content/docs/kv/api/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
pcx_content_type: navigation
3-
title: API
3+
title: Worker Binding API
44
sidebar:
55
order: 3
66
group:

src/content/docs/kv/api/list-keys.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ To list all the keys in your KV namespace, call the `list()` method of the [KV b
1313
env.NAMESPACE.list();
1414
```
1515

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.
1717

18-
#### Example
18+
#### Example
1919

2020
An example of listing keys from within a Worker:
2121

@@ -63,16 +63,16 @@ env.NAMESPACE.list(options?)
6363
#### Response
6464
* `response`: `Promise<{
6565
keys: {
66-
name: string,
66+
name: string,
6767
expiration?: number,
6868
metadata?: object
6969
}[],
7070
list_complete: boolean,
7171
cursor: string
7272
}>`
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.
7474
* `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.
7676
* `cursor` is a `string` used for paginating responses.
7777
7878
The `list()` method returns a promise which resolves with an object that looks like the following:
@@ -159,4 +159,4 @@ await NAMESPACE.put(key, "", {
159159
```
160160
161161
## Other methods to access KV
162-
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).

src/content/docs/kv/api/read-key-value-pairs.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,5 +162,5 @@ The effective `cacheTtl` of an already cached item can be reduced by getting it
162162
163163
## Other methods to access KV
164164
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).
166166

src/content/docs/kv/api/write-key-value-pairs.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Refer to [How KV works](/kv/concepts/how-kv-works/) for more information on this
8484
8585
### Write data in bulk
8686
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).
8888
8989
The bulk API can accept up to 10,000 KV pairs at once.
9090
@@ -270,4 +270,4 @@ async function retryWithBackoff(
270270
271271
## Other methods to access KV
272272
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

Comments
 (0)