Quickstart: Create your API center - Azure CLI

Create your API center to start an inventory of your organization's APIs. Azure API Center enables tracking APIs in a centralized location for discovery, reuse, and governance.

After creating your API center, follow the steps in the tutorials to add custom metadata, APIs, versions, definitions, and other information.

Prerequisites

  • If you don't have an Azure subscription, create an Azure free account before you begin.

  • At least a Contributor role assignment or equivalent permissions in the Azure subscription.

  • For Azure CLI:

    Note

    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.

    See the release notes for the latest changes and updates in the apic-extension.

Register the Microsoft.ApiCenter provider

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

Create a resource group

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

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!

Next steps

Now you can start adding information to the inventory in your API center. To help you organize your APIs and other information, begin by defining custom metadata in your API center.