| title | Azure App Configuration REST API - Labels |
|---|---|
| description | Reference pages for working with labels using the Azure App Configuration REST API |
| author | maud-lv |
| ms.author | malev |
| ms.service | azure-app-configuration |
| ms.topic | reference |
| ms.date | 08/02/2024 |
| zone_pivot_groups | appconfig-data-plane-api-version |
:::zone target="docs" pivot="v1,v23-10,v23-11"
The Label resource is defined as follows:
{
"name": [string] // Name of the label
}Supports the following operations:
- List
For all operations name is an optional filter parameter. If omitted it implies any label.
- All HTTP requests must be authenticated. See the authentication section.
- All HTTP requests must provide explicit
api-version. See the versioning section.
GET /labels?api-version={api-version} HTTP/1.1Responses:
HTTP/1.1 200 OK
Content-Type: application/vnd.microsoft.appconfig.labelset+json; charset=utf-8"{
"items": [
{
"name": "{label-name}"
},
...
],
"@nextLink": "{relative uri}"
}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.
Alternatively the content provides a next link in form of the @nextLink property. The next link contains api-version parameter.
GET /labels?api-version={api-version} HTTP/1.1Response:
HTTP/1.1 OK
Content-Type: application/vnd.microsoft.appconfig.labelset+json; charset=utf-8
Accept-Ranges: items
Link: <{relative uri}>; rel="next"{
"items": [
...
],
"@nextLink": "{relative uri}"
}Filtering by name is supported.
GET /labels?name={label-name}&api-version={api-version}| Label Filter | Effect |
|---|---|
name is omitted or name=* |
Matches any label |
name=abc |
Matches a label named abc |
name=abc* |
Matches label names that start with abc |
name=abc,xyz |
Matches label names abc or xyz (limited to 5 CSV) |
*, \, ,
If a reserved character is part of the value, then it must be escaped using \{Reserved Character}. Non-reserved characters can also be escaped.
If a filter validation error occurs, the response is HTTP 400 with error details:
HTTP/1.1 400 Bad Request
Content-Type: application/problem+json; charset=utf-8{
"type": "https://azconfig.io/errors/invalid-argument",
"title": "Invalid request parameter 'name'",
"name": "name",
"detail": "name(2): Invalid character",
"status": 400
}-
All
GET /labels?api-version={api-version}
-
Label name starts with abc
GET /labels?name=abc*&api-version={api-version}
-
Label name is either abc or xyz
GET /labels?name=abc,xyz&api-version={api-version}
Use the optional $select query string parameter and provide comma-separated list of requested fields. If the $select parameter is omitted, the response contains the default set.
GET /labels?$select=name&api-version={api-version} HTTP/1.1Obtain a representation of the result as it was at a past time. See section 2.1.1
GET /labels&api-version={api-version} HTTP/1.1
Accept-Datetime: Sat, 12 May 2018 02:10:00 GMTResponse:
HTTP/1.1 200 OK
Content-Type: application/vnd.microsoft.appconfig.labelset+json"
Memento-Datetime: Sat, 12 May 2018 02:10:00 GMT
Link: <{relative uri}>; rel="original"{
"items": [
....
]
}:::zone-end