|
| 1 | +--- |
| 2 | +title: Tutorial - Add environments and deployments in Azure API Center (preview) | Microsoft Docs |
| 3 | +description: In this tutorial, augment the API inventory in your API center by adding information about API environments and deployments. |
| 4 | +author: dlepow |
| 5 | +ms.service: api-center |
| 6 | +ms.topic: tutorial |
| 7 | +ms.date: 11/07/2023 |
| 8 | +ms.author: danlep |
| 9 | +ms.custom: |
| 10 | +--- |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | +# Tutorial: Add environments and deployments in your API inventory |
| 15 | + |
| 16 | +Augment the inventory in your API center by adding information about API environments and deployments. |
| 17 | + |
| 18 | +* An *environment* represents a location where an API runtime could be deployed, for example, an API management platform. |
| 19 | + |
| 20 | +* A *deployment* is a location (an address) where users can access an API. |
| 21 | + |
| 22 | +For background information about APIs, deployments, and other entities that you can inventory in API Center, see [Key concepts](key-concepts.md). |
| 23 | + |
| 24 | +In this tutorial, you learn how to use the portal to: |
| 25 | +> [!div class="checklist"] |
| 26 | +> * Add information about API environments |
| 27 | +> * Add information about API deployments |
| 28 | +
|
| 29 | +[!INCLUDE [api-center-preview-feedback](includes/api-center-preview-feedback.md)] |
| 30 | + |
| 31 | + |
| 32 | +## Prerequisites |
| 33 | + |
| 34 | +* 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). |
| 35 | + |
| 36 | +* One or more APIs registered in your API center. If you haven't registered any APIs already, see [Tutorial: Register APIs in your API inventory](register-apis.md). This tutorial uses the sample APIs you added from the previous tutorial. |
| 37 | + |
| 38 | +## Add an environment |
| 39 | + |
| 40 | +Use your API center to keep track of your real-world API environments. For example, you might use Azure API Management or another solution to distribute, secure, and monitor some of your APIs. Or you might directly serve some APIs using a compute service or a Kubernetes cluster. You can add multiple environments to your API center, each aligned with a lifecycle stage such as development, testing, staging, or production. |
| 41 | + |
| 42 | +Here you add information about a fictitious Azure API Management environment to your API center. If you prefer, add information about one of your existing environments. You'll configure both built-in properties and any custom metadata properties you defined in a [previous tutorial](add-metadata-properties.md). |
| 43 | + |
| 44 | +1. In the portal, navigate to your API center. |
| 45 | + |
| 46 | +1. In the left menu, select **Environments** > **+ Add environment**. |
| 47 | + |
| 48 | +1. On the **Create environment** page, add the following information. If you previously defined the custom *Line of business* metadata property or other properties assigned to environments, you'll see them at the bottom of the page. |
| 49 | + |
| 50 | + |Setting|Value|Description| |
| 51 | + |-------|-----|-----------| |
| 52 | + |**Title**| Enter *My Testing*.| Name you choose for the environment. | |
| 53 | + |**Identification**|After you enter the preceding title, API Center generates this identifier, which you can override.| Azure resource name for the environment.| |
| 54 | + |**Environment type**| Select **Testing** from the dropdown.| Type of environment for APIs.| |
| 55 | + | **Description** | Optionally enter a description. | Description of the environment. | |
| 56 | + | **Server** | | | |
| 57 | + |**Type**| Optionally select **Azure API Management** from the dropdown.|Type of API management solution used.| |
| 58 | + | **Management portal URL** | Optionally enter a URL such as `https://admin.contoso.com` | URL of management interface for environment. | |
| 59 | + | **Onboarding** | | | |
| 60 | + | **Development portal URL** | Optionally enter a URL such as `https://developer.contoso.com` | URL of interface for developer onboarding in the environment. | |
| 61 | + | **Instructions** | Optionally select **Edit** and enter onboarding instructions in standard Markdown. | Instructions to onboard to APIs from the environment. | |
| 62 | + | **Line of business** | If you added this custom property, optionally make a selection from the dropdown, such as **IT**. | Custom metadata property that identifies the business unit that manages APIs in the environment. | |
| 63 | + |
| 64 | + :::image type="content" source="media/configure-environments-deployments/create-environment.png" alt-text="Screenshot of adding an API environment in the portal." ::: |
| 65 | + |
| 66 | +1. Select **Create**. The environment appears on the list of environments. |
| 67 | + |
| 68 | +## Add a deployment |
| 69 | + |
| 70 | +API center can also help you catalog your API deployments - the runtime environments where the APIs you track are deployed. |
| 71 | + |
| 72 | +Here you add a deployment by associating one of your APIs with the environment you created in the previous section. You'll configure both built-in properties and any custom metadata properties you've defined. |
| 73 | + |
| 74 | +1. In the portal, navigate to your API center. |
| 75 | + |
| 76 | +1. In the left menu, select **APIs** and then select an API, for example, the *Demo Conference API*. |
| 77 | + |
| 78 | +1. On the **Demo Conference API** page, select **Deployments** > **+ Add deployment**. |
| 79 | + |
| 80 | +1. In the **Add deployment** page, add the following information. If you previously defined the custom *Line of business* metadata property or other properties assigned to environments, you'll see them at the bottom of the page. |
| 81 | + |
| 82 | + |Setting|Value|Description| |
| 83 | + |-------|-----|-----------| |
| 84 | + |**Title**| Enter *v1 Deployment*.| Name you choose for the deployment. | |
| 85 | + |**Identification**|After you enter the preceding title, API Center generates this identifier, which you can override.| Azure resource name for the deployment.| |
| 86 | + | **Description** | Optionally enter a description. | Description of the deployment. | |
| 87 | + | **Environment** | Make a selection from the dropdown, such as *My Testing*, or optionally select **Create new**.| New or existing environment where the API version is deployed. | |
| 88 | + | **Definition** | Select or add a definition file for a version of the Demo Conference API. | API definition file. | |
| 89 | + | **Runtime URL** | Enter a base URL, for example, `https://api.contoso.com/conference`. | Base runtime URL for the API in the environment. | |
| 90 | + | **Line of business** | If you added this custom property, optionally make a selection from the dropdown, such as **IT**. | Custom metadata property that identifies the business unit that manages APIs in the environment. | |
| 91 | + |
| 92 | + :::image type="content" source="media/configure-environments-deployments/add-deployment.png" alt-text="Screenshot of adding an API deployment in the portal." ::: |
| 93 | + |
| 94 | +1. Select **Create**. The deployment appears on the list of deployments. |
| 95 | + |
| 96 | +In this tutorial, you learned how to use the portal to: |
| 97 | +> [!div class="checklist"] |
| 98 | +> * Add information about API environments |
| 99 | +> * Add information about API deployments |
| 100 | +
|
| 101 | +## Related content |
| 102 | + |
| 103 | + * [Learn more about API Center](key-concepts.md) |
| 104 | + |
0 commit comments