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
A key-value is a resource identified by unique combination of `key` + `label`. `label` is optional. To explicitly reference a key-value without a label, use "\0" (URL encoded as ``%00``). See details for each operation.
14
17
15
-
This article applies to API version 1.0.
16
-
17
18
## Operations
18
19
19
20
- Get
@@ -107,8 +108,12 @@ HTTP/1.1 200 OK
107
108
## List key-values
108
109
109
110
Optional: ``key`` (If not specified, it implies any key.)
111
+
110
112
Optional: ``label`` (If not specified, it implies any label.)
111
113
114
+
:::zone-end
115
+
:::zone target="docs" pivot="v1,v23-10"
116
+
112
117
```http
113
118
GET /kv?label=*&api-version={api-version} HTTP/1.1
For more options, see the "Filtering" section later in this article.
147
+
148
+
:::zone-end
149
+
:::zone target="docs" pivot="v23-10,v23-11"
150
+
151
+
## List key-values (conditionally)
152
+
153
+
To improve client caching, use `If-Match` or `If-None-Match` request headers. The `etag` argument is part of the list key-values response body and header.
154
+
If `If-Match` or `If-None-Match` are omitted, the operation is unconditional.
155
+
156
+
The following response gets the key-value only if the current representation matches the specified `etag`:
157
+
158
+
```http
159
+
GET /kv?key={key}label={label}&api-version={api-version} HTTP/1.1
160
+
If-Match: "4f6dd610dd5e4deebc7fbaef685fb903"
161
+
```
162
+
163
+
**Responses:**
164
+
165
+
```http
166
+
HTTP/1.1 412 PreconditionFailed
167
+
```
168
+
169
+
or
170
+
171
+
```http
172
+
HTTP/1.1 200 OK
173
+
```
174
+
175
+
The following response gets the key-values only if the current representation doesn't match the specified `etag`:
176
+
177
+
```http
178
+
GET /kv?key={key}label={label}&api-version={api-version} HTTP/1.1
A combination of `key` and `label` filtering is supported.
154
229
Use the optional `key` and `label` query string parameters.
155
230
156
231
```http
157
232
GET /kv?key={key}&label={label}&api-version={api-version}
158
233
```
159
234
235
+
:::zone-end
236
+
:::zone target="docs" pivot="v23-11"
237
+
238
+
A combination of `key`, `label`, and `tags` filtering is supported.
239
+
Use the optional `key`, `label`, and `tags` query string parameters.
240
+
Multiple tag filters can be provided as query string parameters in the `tagName=tagValue` format. Tag filters must be an exact match.
241
+
242
+
```http
243
+
GET /kv?key={key}&label={label}&tags={tagFilter1}&tags={tagFilter2}&api-version={api-version}
244
+
```
245
+
246
+
:::zone-end
247
+
:::zone target="docs" pivot="v1,v23-10,v23-11"
248
+
249
+
160
250
### Supported filters
161
251
162
252
|Key filter|Effect|
@@ -169,11 +259,25 @@ GET /kv?key={key}&label={label}&api-version={api-version}
169
259
|Label filter|Effect|
170
260
|--|--|
171
261
|`label` is omitted or `label=*`|Matches **any** label|
172
-
|`label=%00`|Matches KV without label|
262
+
|`label=%00`|Matches key-values with no label|
173
263
|`label=prod`|Matches the label **prod**|
174
264
|`label=prod*`|Matches labels that start with **prod**|
175
265
|`label=prod,test`|Matches labels **prod** or **test** (limited to 5 CSV)|
176
266
267
+
:::zone-end
268
+
:::zone target="docs" pivot="v23-11"
269
+
270
+
|Tags filter|Effect|
271
+
|--|--|
272
+
|`tags` is omitted or `tags=`|Matches **any** tag|
273
+
|`tags=group=app1`|Matches key-values that have a tag named `group` with value `app1`|
274
+
|`tags=group=app1&tags=env=prod`|Matches key-values that have a tag named `group` with value `app1` and a tag named `env` with value `prod`(limited to 5 tag filters)|
275
+
|`tags=tag1=%00`|Matches key-values that have a tag named `tag1` with value `null`|
276
+
|`tags=tag1=`|Matches key-values that have a tag named `tag1` with empty value|
277
+
278
+
:::zone-end
279
+
:::zone target="docs" pivot="v1,v23-10,v23-11"
280
+
177
281
***Reserved characters***
178
282
179
283
`*`, `\`, `,`
@@ -182,7 +286,7 @@ If a reserved character is part of the value, then it must be escaped by using `
182
286
183
287
***Filter validation***
184
288
185
-
In the case of a filter validation error, the response is HTTP `400` with error details:
289
+
If filter validation fails, the response is HTTP `400` with error details:
A combination of `key` and `label` filtering is supported.
103
107
Use the optional `key` and `label` query string parameters.
104
108
105
109
```http
106
110
GET /revisions?key={key}&label={label}&api-version={api-version}
107
111
```
108
112
113
+
:::zone-end
114
+
:::zone target="docs" pivot="v23-11"
115
+
116
+
A combination of `key`, `label` and `tags` filtering is supported.
117
+
Use the optional `key`, `label` and `tags` query string parameters.
118
+
Multiple tag filters can be provided as query string parameters in the `tagName=tagValue` format. Tag filters must be an exact match.
119
+
120
+
```http
121
+
GET /revisions?key={key}&label={label}&tags={tagFilter1}&tags={tagFilter2}&api-version={api-version}
122
+
```
123
+
124
+
:::zone-end
125
+
:::zone target="docs" pivot="v1,v23-10,v23-11"
126
+
109
127
### Supported filters
110
128
111
129
|Key filter|Effect|
@@ -119,14 +137,28 @@ GET /revisions?key={key}&label={label}&api-version={api-version}
119
137
120
138
|Label filter|Effect|
121
139
|--|--|
122
-
|`label` is omitted or `label=`|Matches entry without label|
140
+
|`label` is omitted or `label=`|Matches key-values with no label|
123
141
|`label=*`|Matches **any** label|
124
142
|`label=prod`|Matches the label **prod**|
125
143
|`label=prod*`|Matches labels that start with **prod**|
126
144
|`label=*prod`|Matches labels that end with **prod**|
127
145
|`label=*prod*`|Matches labels that contain **prod**|
128
146
|`label=prod,test`|Matches labels **prod** or **test** (limited to 5 CSV)|
129
147
148
+
:::zone-end
149
+
:::zone target="docs" pivot="v23-11"
150
+
151
+
|Tags filter|Effect|
152
+
|--|--|
153
+
|`tags` is omitted or `tags=`|Matches **any** tag|
154
+
|`tags=group=app1`|Matches key-values that have a tag named `group` with value `app1`|
155
+
|`tags=group=app1&tags=env=prod`|Matches key-values that have a tag named `group` with value `app1` and a tag named `env` with value `prod`(limited to 5 tag filters)|
156
+
|`tags=tag1=%00`|Matches key-values that have a tag named `tag1` with value `null`|
157
+
|`tags=tag1=`|Matches key-values that have a tag named `tag1` with empty value|
0 commit comments