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: articles/azure-app-configuration/rest-api-key-value.md
+94-3Lines changed: 94 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,15 +5,15 @@ author: maud-lv
5
5
ms.author: malev
6
6
ms.service: azure-app-configuration
7
7
ms.topic: reference
8
-
ms.date: 08/17/2020
8
+
ms.date: 07/23/2024
9
+
zone_pivot_groups: data-plane-api-version
10
+
9
11
---
10
12
11
13
# Key-values
12
14
13
15
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
16
15
-
This article applies to API version 1.0.
16
-
17
17
## Operations
18
18
19
19
- Get
@@ -109,6 +109,22 @@ HTTP/1.1 200 OK
109
109
Optional: ``key`` (If not specified, it implies any key.)
110
110
Optional: ``label`` (If not specified, it implies any label.)
111
111
112
+
:::zone target="docs" pivot="V23_11"
113
+
Optional: ``tags`` (If not specified, it implies any tags.)
114
+
115
+
```http
116
+
GET /kv?key=Test*&tags=tag1=value1&tags=tag2=value2&api-version={api-version} HTTP/1.1
For additional options, see the "Filtering" section later in this article.
124
140
141
+
142
+
:::zone target="docs" pivot="V23_10"
143
+
:::zone target="docs" pivot="V23_11"
144
+
145
+
146
+
## List key-values (conditionally)
147
+
148
+
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.
149
+
If `If-Match` or `If-None-Match` are omitted, the operation is unconditional.
150
+
151
+
The following response gets the key-value only if the current representation matches the specified `etag`:
152
+
153
+
```http
154
+
GET /kv?key={key}label={label}&api-version={api-version} HTTP/1.1
155
+
If-Match: "4f6dd610dd5e4deebc7fbaef685fb903"
156
+
```
157
+
158
+
**Responses:**
159
+
160
+
```http
161
+
HTTP/1.1 412 PreconditionFailed
162
+
```
163
+
164
+
or
165
+
166
+
```http
167
+
HTTP/1.1 200 OK
168
+
```
169
+
170
+
The following response gets the key-values only if the current representation doesn't match the specified `etag`:
171
+
172
+
```http
173
+
GET /kv?key={key}label={label}&api-version={api-version} HTTP/1.1
174
+
If-None-Match: "4f6dd610dd5e4deebc7fbaef685fb903"
175
+
```
176
+
177
+
**Responses:**
178
+
179
+
```http
180
+
HTTP/1.1 304 NotModified
181
+
```
182
+
183
+
or
184
+
185
+
```http
186
+
HTTP/1.1 200 OK
187
+
```
188
+
189
+
:::zone-end
190
+
:::zone-end
191
+
192
+
125
193
## Pagination
126
194
127
195
The result is paginated if the number of items returned exceeds the response limit. Follow the optional `Link` response headers, and use `rel="next"` for navigation.
A combination of `key` and `label` filtering is supported.
154
222
Use the optional `key` and `label` query string parameters.
155
223
224
+
:::zone target="docs" pivot="V23_11"
225
+
226
+
For API Versions greater than `2023-11-01`, filtering by`tags` is also supported. Multiple tag filters can be provided as query string parameters in the `tagName=tagValue` format. Tag filters must be an exact match.
227
+
228
+
```http
229
+
GET /kv?key={key}&label={label}&tags={tagFilter1}&tags={tagFilter2}&api-version={api-version}
230
+
```
231
+
232
+
:::zone-end
233
+
156
234
```http
157
235
GET /kv?key={key}&label={label}&api-version={api-version}
158
236
```
@@ -174,6 +252,19 @@ GET /kv?key={key}&label={label}&api-version={api-version}
174
252
|`label=prod*`|Matches labels that start with **prod**|
175
253
|`label=prod,test`|Matches labels **prod** or **test** (limited to 5 CSV)|
176
254
255
+
:::zone target="docs" pivot="V23_11"
256
+
257
+
|Tags filter|Effect|
258
+
|--|--|
259
+
|`tags` is omitted or `tags=`|Matches **any** tag|
260
+
|`tags=group=app1`|Matches KV where the tag name is `group` and tag value is `app1`|
261
+
|`tags=group=app1&tags=env=prod`|Matches KV which contain at least 2 tags, where the tag names are `group` and `env` and tag values are `app1` and `prod` respectively (limited to 5 tag filters)|
262
+
|`tags=tag1=%00`|Matches KV where the tag name is `tag1` and tag value is `null`|
263
+
|`tags=tag1=`|Matches KV where the tag name is `tag1` and tag value is empty|
0 commit comments