Skip to main content

Overview

In this guide, you will learn how to create the APIM configuration and routing in Grand Central.

Key learning outcomes

  • Learn the key concepts of APIM.
  • Learn how to manage APIM through applications-live.

APIM architecture overview

The following diagram shows the architecture of a connector running within the Grand Central Platform. This exercise focuses on the APIM components; how to configure the APIM so the connector can be called. The APIM components are configured at a runtime level with the configuration located at the runtimes/$/apim directory in the Grand Central DevHub Application Live repository of your installation: https://github.com/bb-ecos-${installation}/gc-devhub-${installation}-applications-live/tree/main/runtimes/{runtime}/apim
Replace {installation} and {runtime} values in the preceding URL with the actual values for your environment.
You deploy these configurations using Helm charts by providing the YAML file in Applications Live.

The supported components are:

  • APIs
  • API Version Sets
  • Backends
  • Products
  • Subscriptions

API

The API deployment is configured in runtimes/$/apim/apis directory of your installation: https://github.com/bb-ecos-${installation}/gc-devhub-${installation}-applications-live/tree/main/runtimes/{runtime}/apim/apis
Replace {installation} and {runtime} values in the preceding URL with the actual values for your environment.
Create an Argo Helm chart to deploy the API. The following example shows how to create a Generic API. The format is the same for all APIs, but with different values. Read the comments carefully. Every installation has an example deployment configured with comments. See the generic API example at: https://github.com/bb-ecos-${installation}/gc-devhub-${installation}-applications-live/blob/main/runtimes/{runtime}/apim/apis/generic-api.yaml

API Version Sets

Each API needs a corresponding API Version Set configured. The version sets are configured for your installation at: https://github.com/bb-ecos-${installation}/gc-devhub-${installation}-applications-live/blob/main/runtimes/{runtime}/apim/apiversionsets.values.yaml
Replace {installation} and {runtime} values in the preceding URL with the actual values for your environment.
The version set name should match the metadata.name value of your API.

Backends

An APIM Backend is a configuration that represents the actual connector service your API sends requests to. Below is a sample backend configuration. For your installation, backends are configured at: https://github.com/bb-ecos-${installation}/gc-devhub-${installation}-applications-live/blob/main/runtimes/{runtime}/apim/backends.values.yaml
Replace {installation} and {runtime} values in the preceding URL with the actual values for your environment.
For more information, see the “Backends Configuration Example” section in the apim/readme.md file.

URL pattern for Connector deployment


Products

An APIM Product is a bundle that groups API implementations together and binds the API with its specific one or more implementations and defines various policies to route and control API requests. In your installation, products are configured at: https://github.com/bb-ecos-${installation}/gc-devhub-${installation}-applications-live/blob/main/runtimes/{runtime}/apim/products.values.yaml The following example shows a product configuration with details of each field:

Subscriptions

In calling a template connector exercise previously you learned how to retrieve a subscription key from the APIM portal. This section shows how to create those subscriptions. A subscription (API key) grants a client access to a specific API(s) and its implementation(s). For your installation, you manage subscriptions at: Subscriptions Configuration For more information, see the “Subscriptions Configuration Example” section in the apim/readme.md file.