title | description | author | ms.service | ms.custom | ms.topic | ms.date | ms.author |
---|---|---|---|---|---|---|---|
Quickstart - Create your Azure API center - Azure CLI | In this quickstart, use the Azure CLI to set up an API center for API discovery, reuse, and governance. | dlepow | azure-api-center | devx-track-azurecli | quickstart | 06/27/2024 | danlep |
[!INCLUDE quickstart-intro]
[!INCLUDE quickstart-prerequisites]
For Azure CLI: [!INCLUDE include]
[!INCLUDE install-apic-extension]
If you haven't already, you need to register the Microsoft.ApiCenter resource provider in your subscription. You only need to register the resource provider once.
To register the resource provider in your subscription using the Azure CLI, run the following az provider register
command:
az provider register --namespace Microsoft.ApiCenter
You can check the registration status by running the following az provider show
command:
az provider show --namespace Microsoft.ApiCenter
Azure API Center instances, like all Azure resources, must be deployed into a resource group. Resource groups let you organize and manage related Azure resources.
Create a resource group using the az group create
command. The following example creates a group called MyGroup in the East US location:
az group create --name MyGroup --location eastus
Create an API center using the az apic create
command.
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 for your API center.
az apic create --name MyApiCenter --resource-group MyGroup --location westeurope
Output from the command looks similar to the following. By default, the API center is created in the Free plan.
{ "dataApiHostname": "myapicenter.data.westeurope.azure-apicenter.ms", "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/mygroup/providers/Microsoft.ApiCenter/services/myapicenter", "location": "westeurope", "name": "myapicenter", "resourceGroup": "mygroup", "sku": { "name": "Free" }, "systemData": { "createdAt": "2024-06-22T21:40:35.2541624Z", "lastModifiedAt": "2024-06-22T21:40:35.2541624Z" }, "tags": {}, "type": "Microsoft.ApiCenter/services" }
After deployment, your API center is ready to use!
[!INCLUDE quickstart-next-steps]