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/enable-api-analysis-linting.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Perform API linting and analysis - Azure API Center
3
3
description: Configure linting of API definitions in your API center to analyze compliance of APIs with the organization's API style guide.
4
4
ms.service: api-center
5
5
ms.topic: how-to
6
-
ms.date: 04/22/2024
6
+
ms.date: 06/29/2024
7
7
ms.author: danlep
8
8
author: dlepow
9
9
ms.custom: devx-track-azurecli
@@ -169,13 +169,13 @@ Now that the managed identity is enabled, assign it the Azure API Center Complia
169
169
170
170
```azurecli
171
171
#! /bin/bash
172
-
apicID=$(az apic service show --name <apic-name> --resource-group <resource-group-name> \
172
+
apicID=$(az apic show --name <apic-name> --resource-group <resource-group-name> \
173
173
--query "id" --output tsv)
174
174
```
175
175
176
176
```azurecli
177
177
# PowerShell syntax
178
-
$apicID=$(az apic service show --name <apic-name> --resource-group <resource-group-name> `
178
+
$apicID=$(az apic show --name <apic-name> --resource-group <resource-group-name> `
179
179
--query "id" --output tsv)
180
180
```
181
181
@@ -231,13 +231,13 @@ Now create an event subscription in your API center to trigger the function app
231
231
232
232
```azurecli
233
233
#! /bin/bash
234
-
apicID=$(az apic service show --name <apic-name> --resource-group <resource-group-name> \
234
+
apicID=$(az apic show --name <apic-name> --resource-group <resource-group-name> \
235
235
--query "id" --output tsv)
236
236
```
237
237
238
238
```azurecli
239
239
# PowerShell syntax
240
-
$apicID=$(az apic service show --name <apic-name> --resource-group <resource-group-name> `
240
+
$apicID=$(az apic show --name <apic-name> --resource-group <resource-group-name> `
241
241
--query "id" --output tsv)
242
242
```
243
243
1. Get the resource ID of the function in the function app. In this example, the function name is *apicenter-analyzer*. Substitute `<function-app-name>` and `<resource-group-name>` with your function app name and resource group name.
Copy file name to clipboardExpand all lines: articles/api-center/import-api-management-apis.md
+45-52Lines changed: 45 additions & 52 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: Add APIs to your Azure API center inventory from your API Managemen
4
4
author: dlepow
5
5
ms.service: api-center
6
6
ms.topic: how-to
7
-
ms.date: 04/30/2024
7
+
ms.date: 06/28/2024
8
8
ms.author: danlep
9
9
ms.custom: devx-track-azurecli
10
10
# Customer intent: As an API program manager, I want to add APIs that are managed in my Azure API Management instance to my API center.
@@ -22,12 +22,10 @@ This article shows two options for using the Azure CLI to add APIs to your API c
22
22
* Run [az apic api register](/cli/azure/apic/api#az-apic-api-register) to register a new API in your API center.
23
23
* Run [az apic api definition import-specification](/cli/azure/apic/api/definition#az-apic-api-definition-import-specification) to import the API definition to an existing API.
24
24
25
-
***Option 2** - Import APIs directly from API Management to your API center using the [az apic service import-from-apim](/cli/azure/apic/service#az-apic-service-import-from-apim) command.
25
+
***Option 2** - Import APIs directly from API Management to your API center using the [az apic import-from-apim](/cli/azure/apic/az-apic-import-from-apim) command.
26
26
27
27
After importing API definitions or APIs from API Management, you can add metadata and documentation in your API center to help stakeholders discover, understand, and consume the API.
* An API center in your Azure subscription. If you haven't created one, see [Quickstart: Create your API center](set-up-api-center.md).
@@ -50,7 +48,7 @@ First, export an API from your API Management instance to an API definition usin
50
48
51
49
### Export API to a local API definition file
52
50
53
-
The following example command exports the API with identifier *my-api* in the *myAPIManagement* instance of API. The API is exported in OpenApiJson format to a local OpenAPI definition file named *specificationFile.json*.
51
+
The following example command exports the API with identifier *my-api* in the *myAPIManagement* instance of API. The API is exported in OpenApiJson format to a local OpenAPI definition file at the path you specify.
54
52
55
53
```azurecli
56
54
#! /bin/bash
@@ -90,7 +88,7 @@ You can register a new API in your API center from the exported definition by us
90
88
The following example registers an API in the *myAPICenter* API center from a local OpenAPI definition file named *definitionFile.json*.
91
89
92
90
```azurecli
93
-
az apic api register --resource-group myResourceGroup --service myAPICenter --api-location "/path/to/definitionFile.json"
91
+
az apic api register --resource-group myResourceGroup --service-name myAPICenter --api-location "/path/to/definitionFile.json"
94
92
```
95
93
96
94
### Import API definition to an existing API in your API center
@@ -102,7 +100,7 @@ This example assumes you have an API named *my-api* and an associated API versio
## Option 2: Import APIs directly from your API Management instance
121
119
122
-
The following are steps to import APIs from your API Management instance to your API center using the [az apic service import-from-apim](/cli/azure/apic/service#az-apic-service-import-from-apim) command. This command is useful when you want to import multiple APIs from API Management to your API center, but you can also use it to import a single API.
120
+
The following are steps to import APIs from your API Management instance to your API center using the [az apic import-from-apim](/cli/azure/apic#az-apic-service-import-from-apim) command. This command is useful when you want to import multiple APIs from API Management to your API center, but you can also use it to import a single API.
123
121
124
-
When you add APIs from an API Management instance to your API center using `az apic service import-from-apim`, the following happens automatically:
122
+
When you add APIs from an API Management instance to your API center using `az apic import-from-apim`, the following happens automatically:
125
123
126
124
* Each API's [versions](key-concepts.md#api-version), [definitions](key-concepts.md#api-definition), and [deployment](key-concepts.md#deployment) information are copied to your API center.
127
125
* The API receives a system-generated API name in your API center. It retains its display name (title) from API Management.
@@ -143,10 +141,10 @@ The following examples show how to configure a system-assigned managed identity
143
141
144
142
#### [Azure CLI](#tab/cli)
145
143
146
-
Set the system-assigned identity in your API center using the following [az apic service update](/cli/azure/apic/service#az-apic-service-update) command. Substitute the names of your API center and resource group:
144
+
Set the system-assigned identity in your API center using the following [az apic update](/cli/azure/apic#az-apic-update) command. Substitute the names of your API center and resource group:
147
145
148
146
```azurecli
149
-
az apic service update --name <api-center-name> --resource-group <resource-group-name> --identity '{"type": "SystemAssigned"}'
147
+
az apic update --name <api-center-name> --resource-group <resource-group-name> --identity '{"type": "SystemAssigned"}'
150
148
```
151
149
---
152
150
@@ -167,18 +165,18 @@ To allow import of APIs, assign your API center's managed identity the **API Man
167
165
168
166
#### [Azure CLI](#tab/cli)
169
167
170
-
1. Get the principal ID of the identity. For a system-assigned identity, use the [az apic service show](/cli/azure/apic/service#az-apic-service-show) command.
168
+
1. Get the principal ID of the identity. For a system-assigned identity, use the [az apic show](/cli/azure/apic#az-apic-show) command.
171
169
172
170
```azurecli
173
171
#! /bin/bash
174
-
apicObjID=$(az apic service show --name <api-center-name> \
172
+
apicObjID=$(az apic show --name <api-center-name> \
175
173
--resource-group <resource-group-name> \
176
174
--query "identity.principalId" --output tsv)
177
175
```
178
176
179
177
```azurecli
180
178
# PowerShell syntax
181
-
$apicObjID=$(az apic service show --name <api-center-name> `
179
+
$apicObjID=$(az apic show --name <api-center-name> `
182
180
--resource-group <resource-group-name> `
183
181
--query "identity.principalId" --output tsv)
184
182
```
@@ -221,7 +219,7 @@ To allow import of APIs, assign your API center's managed identity the **API Man
221
219
222
220
### Import APIs from API Management
223
221
224
-
Use the [az apic service import-from-apim](/cli/azure/apic/service#az-apic-service-import-from-apim) command to import one or more APIs from your API Management instance to your API center.
222
+
Use the [az apic import-from-apim](/cli/azure/apic#az-apic-import-from-apim) command to import one or more APIs from your API Management instance to your API center.
225
223
226
224
> [!NOTE]
227
225
> * This command depends on a managed identity configured in your API center that has read permissions to the API Management instance. If you haven't added or configured a managed identity, see [Add a managed identity in your API center](#add-a-managed-identity-in-your-api-center) earlier in this article.
@@ -230,53 +228,48 @@ Use the [az apic service import-from-apim](/cli/azure/apic/service#az-apic-servi
230
228
231
229
#### Import all APIs from an API Management instance
232
230
233
-
Use a wildcard (`*`) to specify all APIs from the API Management instance.
234
-
235
-
1. Get the resource ID of your API Management instance using the [az apim show](/cli/azure/apim#az-apim-show) command.
231
+
In the following command, substitute the names of your API center, your API center's resource group, your API Management instance, and your instance's resource group. Use `*` to specify all APIs from the API Management instance.
236
232
237
-
```azurecli
238
-
#! /bin/bash
239
-
apimID=$(az apim show --name <apim-name> --resource-group <resource-group-name> --query id --output tsv)
240
-
```
241
-
242
-
```azurecli
243
-
# PowerShell syntax
244
-
$apimID=$(az apim show --name <apim-name> --resource-group <resource-group-name> --query id --output tsv)
245
-
```
246
-
247
-
1. Use the `az apic service import-from-apim` command to import the APIs. Substitute the names of your API center and resource group, and use `*` to specify all APIs from the API Management instance.
233
+
```azurecli
234
+
#! /bin/bash
235
+
az apic import-from-apim --service-name <api-center-name> --resource-group <resource-group-name> \
> If your API Management instance has a large number of APIs, import to your API center might take some time.
247
+
> [!NOTE]
248
+
> If your API Management instance has a large number of APIs, import to your API center might take some time.
255
249
256
250
#### Import a specific API from an API Management instance
257
251
258
252
Specify an API to import using its name from the API Management instance.
259
253
260
-
1. Get the resource ID of your API Management instance using the [az apim show](/cli/azure/apim#az-apim-show) command.
254
+
In the following command, substitute the names of your API center, your API center's resource group, your API Management instance, and your instance's resource group. Pass an API name such as `petstore-api` using the `--apim-apis` parameter.
261
255
262
-
```azurecli
263
-
#! /bin/bash
264
-
apimID=$(az apim show --name <apim-name> --resource-group <resource-group-name> --query id --output tsv)
$apimID=$(az apim show --name <apim-name> --resource-group <resource-group-name> --query id --output tsv)
270
-
```
271
-
272
-
1. Use the `az apic service import-from-apim` command to import the API. Substitute the names of your API center and resource group, and specify an API name from the API Management instance.
273
263
274
-
```azurecli
275
-
az apic service import-from-apim --service-name <api-center-name> --resource-group <resource-group-name> --source-resource-ids $apimID/apis/<api-name>
276
-
```
277
-
278
-
> [!NOTE]
279
-
> Specify `<api-name>` using the API resource name in the API Management instance, not the display name. Example: `petstore-api` instead of `Petstore API`.
> Specify an API name using the API resource name in the API Management instance, not the display name. Example: `petstore-api` instead of `Petstore API`.
280
273
281
274
After importing APIs from API Management, you can view and manage the imported APIs in your API center.
Copy file name to clipboardExpand all lines: articles/api-center/includes/install-apic-extension.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,3 +13,5 @@ ms.custom: Include file
13
13
14
14
> [!NOTE]
15
15
> `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).
16
+
>
17
+
> See the [release notes](https://github.com/Azure/azure-cli-extensions/blob/main/src/apic-extension/HISTORY.rst) for the latest changes and updates in the `apic-extension`.
Copy file name to clipboardExpand all lines: articles/api-center/manage-apis-azure-cli.md
+8-10Lines changed: 8 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ author: dlepow
5
5
ms.service: api-center
6
6
ms.custom: devx-track-azurecli
7
7
ms.topic: how-to
8
-
ms.date: 04/30/2024
8
+
ms.date: 06/28/2024
9
9
ms.author: danlep
10
10
# Customer intent: As an API program manager, I want to automate processes to register and update APIs in my Azure API center.
11
11
---
@@ -14,8 +14,6 @@ ms.author: danlep
14
14
15
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.
Copy file name to clipboardExpand all lines: articles/api-center/set-up-api-center-azure-cli.md
+8-5Lines changed: 8 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ author: dlepow
5
5
ms.service: api-center
6
6
ms.custom: devx-track-azurecli
7
7
ms.topic: quickstart
8
-
ms.date: 04/19/2024
8
+
ms.daate: 06/27/2024
9
9
ms.author: danlep
10
10
---
11
11
@@ -48,12 +48,12 @@ az group create --name MyGroup --location eastus
48
48
49
49
## Create an API center
50
50
51
-
Create an API center using the [`az apic service create`](/cli/azure/apic/service#az-apic-service-create) command.
51
+
Create an API center using the [`az apic create`](/cli/azure/apic/#az-apic-create) command.
52
52
53
53
The following example creates an API center called *MyApiCenter* in the *MyGroup* resource group. In this example, the API center is deployed in the *West Europe* location. Substitute an API center name of your choice and enter one of the [available locations](overview.md#available-regions) for your API center.
54
54
55
55
```azurecli-interactive
56
-
az apic service create --name MyApiCenter --resource-group MyGroup --location westeurope
56
+
az apic create --name MyApiCenter --resource-group MyGroup --location westeurope
57
57
```
58
58
59
59
Output from the command looks similar to the following. By default, the API center is created in the Free plan.
@@ -65,9 +65,12 @@ Output from the command looks similar to the following. By default, the API cent
0 commit comments