Overview

Skill Level: Intermediate

This document explains how to migrate API Connect v5 compatible APIs which are running on DataPower Gateway (DataPower Gateway - MPGW) to API Connect 2018 (DataPower API Gateway).

Ingredients

1.     Postman.
2.     The Workstation which Postman is installed should be able to Access REST Management API of the API Connect  v2018.
3.     APIC CLI tool.
4.     API Connect V5 compatible APIs should be imported on API Connect v2018.

Step-by-step

  1. Create an APPLICATION for REST API Call

    To be able to invoke REST Management API of the API Connect 2018, an application should be created by using APIC CLI tool.

    1.      Login to API Connect with CLI.

    By using the below command login to API Connect.

    apic login –username {username} –password {password} –server {api-manager-host} –realm provider/{user-registry}
     
    * username : user which is member of an provider organization and  authorized on API Manager.
    * password : password of the user
    * api-manager-host : API Manager console hostname. You can find it on Cloud Manager -> Settings -> Endpoints -> API Manager URL.

     

    Picture1

    * user-registry default value : default-idp-2.
     If LDAP is being used for API Manager onboarding, below command can be used to list the registry names.
     
    apic identity-providers:list –scope provider –server {api-manager-host}

    1.     Create a file named app1.json with the below content, in the directory which APIC CLI runs.
     
    {
      “name”: “app1”,
      “client_id”: “app1id”,
      “client_secret”: “app1secret”,
      “client_type”: “toolkit”
    }

    2.     Execute the below command.

    apic registrations:create –server {api-manager-host} app1.json

    If the application created succesfully , a message similar to below one should be seen

    – app1    [state: enabled]   https://{api-manager-host}/api/cloud/registrations/d23628a5-eea0-4def-b727-00ab2ac7bf6d

     

  2. Download POSTMAN Project

    Two seperate files should be downloaded by using links below.
     
    1.     https://ibm.box.com/s/mj62d2myetvpbcq26p1z22w6uym93dms
    2.     https://ibm.box.com/s/afktw2c20li251cy69ixwba62ygxm0dz

  3. Configure POSTMAN

    1. Import downloaded two files to Postman.

    Picture2

    2. Select APIC-v5-API-to-v2018 as Postman Environment.

    Picture3

    3. Fill the Postman environment variables with your own API Connect values.

    apic-hostname : API Manager hostname
    apic-org : API Connect provider organization
    apic-username : username which is used for creating application on previous step
    apic-password : password
    apic-catalog : API Connect catalog name
    apiName : API Name which you want to migrate
    apiVersion : API version which you want to migrate

    productName : Product Name which contains the API you want to migrate
    productVersion : Product version which contains the API you want to migrate
    user-registry : default value is default-idp-2.

  4. Execute POSTMAN Project

    Postman Project consists of 8 requests.

    Picture4

    0. GET TOKEN : This request should be invoked once per hour. It gathers OAuth token and assigns it to other request.
     
    All other requests should be executed in order from 1 to 7.
     
    If you want to migrate subscriptions from old product to newly created product you should execute all requests numbered 1 to 8.

Join The Discussion