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/api-center/manage-apis-azure-cli.md
+20-19Lines changed: 20 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,8 +3,9 @@ title: Manage API inventory in Azure API Center - Azure CLI
3
3
description: Use the Azure CLI to create and update APIs, API versions, and API definitions in your Azure API center.
4
4
author: dlepow
5
5
ms.service: api-center
6
+
ms.custom: devx-track-azurecli
6
7
ms.topic: how-to
7
-
ms.date: 01/12/2024
8
+
ms.date: 04/30/2024
8
9
ms.author: danlep
9
10
# Customer intent: As an API program manager, I want to automate processes to register and update APIs in my Azure API center.
10
11
---
@@ -13,20 +14,20 @@ ms.author: danlep
13
14
14
15
This article shows how to use [`az apic api`](/cli/azure/apic/api) commands in the Azure CLI to add and configure APIs in your [API center](overview.md) inventory. Use commands in the Azure CLI to script operations to manage your API inventory and other aspects of your API center.
The following steps show how to create an API and associate a single API version and API definition. For background about the data model in API Center, see [Key concepts](key-concepts.md).
30
+
The following steps show how to create an API and associate a single API version and API definition. For background about the data model in Azure API Center, see [Key concepts](key-concepts.md).
30
31
31
32
### Create an API
32
33
@@ -36,12 +37,10 @@ The following example creates an API named *Petstore API* in the *myResourceGrou
36
37
37
38
```azurecli-interactive
38
39
az apic api create --resource-group myResourceGroup \
39
-
--service myAPICenter --name petstore-api \
40
-
--title "Petstore API" --kind "rest"
40
+
--service myAPICenter --api-id petstore-api \
41
+
--title "Petstore API" --type "rest"
41
42
```
42
43
43
-
By default, the command sets the API's **Lifecycle stage** to *design*.
44
-
45
44
> [!NOTE]
46
45
> 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.
47
46
@@ -50,12 +49,12 @@ By default, the command sets the API's **Lifecycle stage** to *design*.
50
49
51
50
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.
52
51
53
-
The following example creates an API version named *v1-0-0* for the *petstore-api* API that you created in the previous section.
52
+
The following example creates an API version named *v1-0-0* for the *petstore-api* API that you created in the previous section. The version is set to the *testing* lifecycle stage.
54
53
55
54
```azurecli-interactive
56
55
az apic api version create --resource-group myResourceGroup \
To delete individual API versions and definitions, use [az apic api version delete](/cli/azure/apic/api/version#az-apic-api-version-delete) and [az apic api definition delete](/cli/azure/apic/api/definition#az-apic-api-definition-delete), respectively.
136
135
137
136
## Related content
138
137
139
-
See the [Azure CLI reference for API Center](/cli/azure/apic) for a complete command list, including commands to manage [environments](/cli/azure/apic/environment), [deployments](/cli/azure/apic/api/deployment), [metadata schemas](/cli/azure/apic/metadata-schema), and [API Center services](/cli/azure/apic/service).
138
+
* See the [Azure CLI reference for Azure API Center](/cli/azure/apic) for a complete command list, including commands to manage [environments](/cli/azure/apic/environment), [deployments](/cli/azure/apic/api/deployment), [metadata schemas](/cli/azure/apic/metadata), and [services](/cli/azure/apic/service).
139
+
*[Import APIs to your API center from API Management](import-api-management-apis.md)
140
+
*[Use the Visual Studio extension for API Center](use-vscode-extension.md) to build and register APIs from Visual Studio Code.
0 commit comments