Tutorial: Define custom metadata
In this tutorial, define custom metadata to help you organize your APIs and other information in your API center. Use custom and built-in metadata for search and filtering and to enforce governance standards in your organization.
For background information about metadata in Azure API Center, see:
In this tutorial, you learn how to use the portal to:
- Define custom metadata in your API center
- View the metadata schema
Prerequisites
- An API center in your Azure subscription. If you haven't created one already, see Quickstart: Create your API center.
Define metadata
Here you define two custom metadata examples: Line of business and Public-facing; if you prefer, define other metadata of your own. When you add or update APIs and other information in your inventory, you'll set values for custom and any common built-in metadata.
Important
Don't include any sensitive, confidential, or personal information in the titles (names) of metadata you define. These titles are visible in monitoring logs that are used by Microsoft to improve the functionality of the service. However, other metadata details and values are your protected customer data.
In the Azure portal, navigate to your API center.
In the left menu, under Assets, select Metadata > + New metadata.
On the Details tab, enter information about the metadata.
In Title, enter Line of business.
Optionally, enter a Description.
Select type Predefined choices and enter choices such as Marketing, Finance, IT, Sales, and so on. Optionally enable Allow selection of multiple values. Select Next.
On the Assignments tab, select Required for APIs. Select Optional for Deployments and Environments. (You'll add these entities in later tutorials.) Select Next.
On the Review + create tab, review the settings and select Create.
The metadata is added to the list on the Metadata page.
Select + New metadata to add another example.
On the Details tab, enter information about the metadata.
In Title, enter Public-facing.
Select type Boolean.
On the Assignments tab, select Required for APIs. Select Not applicable for Deployments and Environments.
On the Review + create tab, review the settings and select Create.
The metadata is added to the list.
View metadata schema
You can view and download the JSON schema for the metadata defined in your API center. The schema includes built-in and custom metadata.
In the left menu, under Assets, select Metadata > View metadata schema.
Select View metadata schema > APIs to see the metadata schema for APIs, which includes built-in and custom metadata. You can also view the metadata schema defined for deployments and environments in your API center.
Next steps
In this tutorial, you learned how to use the portal to:
- Define custom metadata in your API center
- View the metadata schema
Now that you've prepared your metadata schema, add APIs to the inventory in your API center.