Skip to content

Commit 4b18ea1

Browse files
authored
Merge pull request #292223 from dlepow/cliu
[APIC] Update custom property - CLI
2 parents 229844e + 89b7736 commit 4b18ea1

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

articles/api-center/manage-apis-azure-cli.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@ az apic api create --resource-group myResourceGroup \
3939
--title "Petstore API" --type "rest"
4040
```
4141

42-
> [!NOTE]
43-
> After creating an API, you can update the API's properties by using the [az apic api update](/cli/azure/apic/api#az_apic_api_update) command.
44-
45-
4642
### Create an API version
4743

4844
Use the [az apic api version create](/cli/azure/apic/api/version#az_apic_api_version_create) command to create a version for your API.
@@ -117,8 +113,26 @@ az apic api register --resource-group myResourceGroup \
117113
* By default, the command sets the API's **Lifecycle stage** to *design*.
118114
* It creates an API version named according to the `version` property in the API definition (or *1-0-0* by default), and an API definition named according to the specification format (for example, *openapi*).
119115

116+
## Update API properties
117+
120118
After registering an API, you can update the API's properties by using the [az apic api update](/cli/azure/apic/api#az_apic_api_update), [az apic api version update](/cli/azure/apic/api/version#az_apic_api_version_update), and [az apic api definition update](/cli/azure/apic/api/definition#az_apic_api_definition_update) commands.
121119

120+
The following example updates the title of the *petstore-api* API to *Petstore API v2*.
121+
122+
```azurecli-interactive
123+
az apic api update --resource-group myResourceGroup \
124+
--service-name myAPICenter --api-id petstore-api \
125+
--title "Petstore API v2"
126+
```
127+
128+
The following example sets the API's Boolean *internal* custom property to *false*.
129+
130+
```azurecli-interactive
131+
az apic api update --resource-group myResourceGroup \
132+
--service-name myAPICenter --api-id petstore-api \
133+
--set custom_properties.internal=false
134+
```
135+
122136
## Delete API resources
123137

124138
Use the [az apic api delete](/cli/azure/apic/api#az_apic_api_delete) command to delete an API and all of its version and definition resources. For example:

0 commit comments

Comments
 (0)