Skip to content

Commit 3b60f9b

Browse files
committed
[APIC] CLI extension install
1 parent 7148287 commit 3b60f9b

File tree

5 files changed

+25
-28
lines changed

5 files changed

+25
-28
lines changed

articles/api-center/enable-api-analysis-linting.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ This article provides two options to deploy the linting engine and event subscri
5959
* For Azure CLI:
6060
[!INCLUDE [include](~/reusable-content/azure-cli/azure-cli-prepare-your-environment-no-header.md)]
6161

62-
> [!NOTE]
63-
> `az apic` commands require the `apic-extension` Azure CLI extension. If you haven't used `az apic` commands, the extension is installed dynamically when you run your first `az apic` command. Learn more about [Azure CLI extensions](/cli/azure/azure-cli-extensions-overview).
62+
[!INCLUDE [install-apic-extension](includes/install-apic-extension.md)]
6463

6564
> [!NOTE]
6665
> Azure CLI command examples in this article can run in PowerShell or a bash shell. Where needed because of different variable syntax, separate command examples are provided for the two shells.

articles/api-center/import-api-management-apis.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ After importing API definitions or APIs from API Management, you can add metadat
3939
* For Azure CLI:
4040
[!INCLUDE [include](~/reusable-content/azure-cli/azure-cli-prepare-your-environment-no-header.md)]
4141

42-
> [!NOTE]
43-
> `az apic` commands require the `apic-extension` Azure CLI extension. If you haven't used `az apic` commands, the extension is installed dynamically when you run your first `az apic` command. Learn more about [Azure CLI extensions](/cli/azure/azure-cli-extensions-overview).
42+
[!INCLUDE [install-apic-extension](includes/install-apic-extension.md)]
4443

4544
> [!NOTE]
4645
> Azure CLI command examples in this article can run in PowerShell or a bash shell. Where needed because of different variable syntax, separate command examples are provided for the two shells.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
> [!NOTE]
2+
> `az apic` commands require the `apic-extension` Azure CLI extension. If you haven't used `az apic` commands, the extension can be installed dynamically when you run your first `az apic` command, or you can install the extension manually. Learn more about [Azure CLI extensions](/cli/azure/azure-cli-extensions-overview).g

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

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ title: Manage API inventory in Azure API Center - Azure CLI
33
description: Use the Azure CLI to create and update APIs, API versions, and API definitions in your Azure API center.
44
author: dlepow
55
ms.service: api-center
6-
ms.custom: devx-track-azurecli
76
ms.topic: how-to
8-
ms.date: 04/30/2024
7+
ms.date: 01/12/2024
98
ms.author: danlep
109
# Customer intent: As an API program manager, I want to automate processes to register and update APIs in my Azure API center.
1110
---
@@ -14,21 +13,20 @@ ms.author: danlep
1413

1514
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.
1615

17-
> [!VIDEO https://www.youtube.com/embed/Dvar8Dg25s0]
16+
[!INCLUDE [api-center-preview-feedback](includes/api-center-preview-feedback.md)]
1817

1918
## Prerequisites
2019

2120
* An API center in your Azure subscription. If you haven't created one already, see [Quickstart: Create your API center](set-up-api-center.md).
2221

2322
* For Azure CLI:
24-
[!INCLUDE [include](~/reusable-content/azure-cli/azure-cli-prepare-your-environment-no-header.md)]
23+
[!INCLUDE [include](~/articles/reusable-content/azure-cli/azure-cli-prepare-your-environment-no-header.md)]
2524

26-
> [!NOTE]
27-
> `az apic` commands require the `apic-extension` Azure CLI extension. If you haven't used `az apic` commands, the extension is installed dynamically when you run your first `az apic` command. Learn more about [Azure CLI extensions](/cli/azure/azure-cli-extensions-overview).
25+
[!INCLUDE [install-apic-extension](includes/install-apic-extension.md)]
2826

2927
## Register API, API version, and definition
3028

31-
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).
29+
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).
3230

3331
### Create an API
3432

@@ -38,10 +36,12 @@ The following example creates an API named *Petstore API* in the *myResourceGrou
3836

3937
```azurecli-interactive
4038
az apic api create --resource-group myResourceGroup \
41-
--service myAPICenter --api-id petstore-api \
42-
--title "Petstore API" --type "rest"
39+
--service myAPICenter --name petstore-api \
40+
--title "Petstore API" --kind "rest"
4341
```
4442

43+
By default, the command sets the API's **Lifecycle stage** to *design*.
44+
4545
> [!NOTE]
4646
> 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.
4747
@@ -50,12 +50,12 @@ az apic api create --resource-group myResourceGroup \
5050

5151
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.
5252

53-
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.
53+
The following example creates an API version named *v1-0-0* for the *petstore-api* API that you created in the previous section.
5454

5555
```azurecli-interactive
5656
az apic api version create --resource-group myResourceGroup \
57-
--service myAPICenter --api-id petstore-api \
58-
--version-id v1-0-0 --title "v1-0-0" --lifecycle-stage "testing"
57+
--service myAPICenter --api-name petstore-api \
58+
--version v1-0-0 --title "v1-0-0"
5959
```
6060

6161
### Create API definition and add specification file
@@ -68,8 +68,8 @@ The following example uses the [az apic api definition create](/cli/azure/apic/a
6868

6969
```azurecli-interactive
7070
az apic api definition create --resource-group myResourceGroup \
71-
--service myAPICenter --api-id petstore-api \
72-
--version-id v1-0-0 --definition-id openapi --title "OpenAPI"
71+
--service myAPICenter --api-name petstore-api \
72+
--version v1-0-0 --name "openapi" --title "OpenAPI"
7373
```
7474

7575
#### Import a specification file
@@ -82,8 +82,8 @@ The following example imports an OpenAPI specification file from a publicly acce
8282
```azurecli-interactive
8383
az apic api definition import-specification \
8484
--resource-group myResourceGroup --service myAPICenter \
85-
--api-id petstore-api --version-id v1-0-0 \
86-
--definition-id openapi --format "link" \
85+
--api-name petstore-api --version-name v1-0-0 \
86+
--definition-name openapi --format "link" \
8787
--value 'https://petstore3.swagger.io/api/v3/openapi.json' \
8888
--specification '{"name":"openapi","version":"3.0.2"}'
8989
```
@@ -100,8 +100,8 @@ The following example exports the specification file from the *openapi* definiti
100100
```azurecli-interactive
101101
az apic api definition export-specification \
102102
--resource-group myResourceGroup --service myAPICenter \
103-
--api-id petstore-api --version-id v1-0-0 \
104-
--definition-id openapi --file-name "/Path/to/specificationFile.json"
103+
--api-name petstore-api --version-name v1-0-0 \
104+
--definition-name openapi --file-name "/Path/to/specificationFile.json"
105105
```
106106

107107
## Register API from a specification file - single step
@@ -129,13 +129,11 @@ Use the [az apic api delete](/cli/azure/apic/api#az_apic_api_delete) command to
129129
```azurecli-interactive
130130
az apic api delete \
131131
--resource-group myResoureGroup --service myAPICenter \
132-
--api-id petstore-api
132+
--name petstore-api
133133
```
134134

135135
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.
136136

137137
## Related content
138138

139-
* 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).
140-
* [Import APIs to your API center from API Management](import-api-management-apis.md)
141-
* [Use the Visual Studio extension for API Center](use-vscode-extension.md) to build and register APIs from Visual Studio Code.
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).

articles/api-center/set-up-api-center-azure-cli.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ ms.author: danlep
1717
* For Azure CLI:
1818
[!INCLUDE [include](~/reusable-content/azure-cli/azure-cli-prepare-your-environment-no-header.md)]
1919

20-
> [!NOTE]
21-
> `az apic` commands require the `apic-extension` Azure CLI extension. If you haven't used `az apic` commands, the extension is installed dynamically when you run your first `az apic` command. Learn more about [Azure CLI extensions](/cli/azure/azure-cli-extensions-overview).
20+
[!INCLUDE [install-apic-extension](includes/install-apic-extension.md)]
2221

2322
## Register the Microsoft.ApiCenter provider
2423

0 commit comments

Comments
 (0)