Pushing REST APIs to IBM API Connect by using the web user interface

Use the web user interface to create or update a definition for one or more deployed REST APIs in IBM® API Connect.

Before you begin

Complete the following tasks:
  • Register or update credentials for the API owner with IBM API Connect:
  • If you intend to stage the REST API to a catalog, ensure that the IBM API Connect server has a catalog to which you can stage a product that includes the REST API. If a current version of the REST API exists in the catalog, staging a new version of the REST API unpublishes the current version and changes it to staged state.
  • Ensure that any firewalls allow the following connections:
    • IBM App Connect Enterprise can connect to the IBM API Connect server by using HTTPS.
    • The IBM API Connect server can connect to the integration server by using HTTP or HTTPS.
  • Create a REST API in the IBM App Connect Enterprise Toolkit; see Creating a REST API.
  • Deploy the REST API to the integration server; see Packaging and deploying a REST API.

About this task

You can use the IBM App Connect Enterprise web user interface to push one or more REST APIs to IBM API Connect. If the REST API definition exists on the IBM API Connect system, you replace the REST API definition with the new definition of your REST API.

Procedure

To push one or more REST APIs to IBM API Connect, complete the following steps.

  1. In the web user interface, click the Open List of Options icon for the required integration server.
    • If you are viewing all the available servers under the Servers tab, the Open List of Options icon appears within the tile for each integration server.
    • If you are viewing the content of an integration server under the Contents tab, the Open List of Options icon appears in the title bar for the integration server.
  2. Click Share REST APIs to API Connect.
    The Push REST APIs to API Connect dialog box opens for you to define your connection to the IBM API Connect system.
  3. Select the version of the IBM API Connect system that you are connecting to.
    You can choose from Version 5, Version 2018, or Version 10.
  4. Enter the connection details for the IBM API Connect management cluster or server in the Host and Port fields.
    • For Version 5, enter the values of the host and port for the IBM API Connect management server or cluster.
    • For Version 2018 or Version 10, enter the values of the host and port for the IBM API Connect management server or cluster.
  5. Enter your credentials for accessing the IBM API Connect system.
    Note:

    If the IBM API Connect environment is configured with self-signed certificates, or if the certificate configuration does not match the domain of the IBM API Connect environment, the first stage of the Push REST APIs to API Connect process fails. If you select Disable certificate verification when connecting, App Connect Enterprise ignores the errors.

    • For Version 5, enter your username and password.
    • For Version 2018 or Version 10, enter your username and password, together with the realm, client ID, and client secret.
      You can obtain the values for the client ID and client secret by registering App Connect Enterprise as a client application that can access the IBM API Connect environment. To register a client app from the IBM API Connect toolkit command-line interface (CLI), complete the following steps:
      1. Create a file called ace-registration.json, which will be used as the input for creating a registration object. Add the following JSON object as the file content, where clientID and clientSecret represent appropriate secure values of your choice.
        {
          "name": "ace-registration",
          "client_id": "clientID", 
          "client_secret": "clientSecret",
          "client_type": "toolkit"
        }
        Example:
        {
          "name": "ace-registration",
          "client_id": "aceappid4321", 
          "client_secret": "aceapptopsecret",
          "client_type": "toolkit"
        }
      2. If you do not already have a local installation of the IBM API Connect toolkit that provides CLI commands for IBM API Connect, download and install the toolkit. For more information, see Installing the toolkit in the IBM API Connect documentation.
      3. From a command prompt, log in to the IBM API Connect management server by using either of the following toolkit CLI commands. Ensure that you log in as an admin with the authority to create registrations.
        Interactive login:
        apic-slim login
        (You will be prompted to enter your IBM API Connect credentials.)
        Non-interactive login:
        apic-slim login --username userID --password userPassword --server mgmtServerEndpoint --realm realm
        For example:
        apic-slim login --username joebloggs --password mysecretpwd --server mycloudmanager.mydomain.com --realm admin/default-idp-1

        For more information about these login credentials, see Logging in to a management server in the IBM API Connect documentation.

      4. Create an IBM API Connect registration for App Connect Enterprise by running the following command, which supplies the ace-registration.json file that you created earlier, as input.
        apic-slim registrations:create --server mgmtServerEndpoint ace-registration.json

        If you specify an existing client_id value in the ace-registration.json file, the registration process silently generates a new client ID. You must therefore verify the client_id value for the registration before you specify it in the Push REST APIs to API Connect dialog box. (See the next step for details.)

      5. Confirm the registration by running the following command:
        apic-slim registrations:get ace-registration --server mgmtServerEndpoint --output -

        For example:
        apic-slim registrations:get ace-registration --server mycloudmanager.mydomain.com --output -

        You should see output similar to this:
        type: registration
        api_version: 2.0.0
        id: 6a45ed7e-d461-4ea7-89fa-f2a84b2f28ed
        name: ace-registration
        title: ace-registration
        state: enabled
        client_type: toolkit
        client_id: d2ddd06b-679b-4e84-a7db-c3a18aa3da52
        client_secret: '********'
        scopes:
          - 'cloud:view'
          - 'cloud:manage'
          - 'provider-org:view'
          - 'provider-org:manage'
          - 'org:view'
          - 'org:manage'
          - 'product-drafts:view'
          - 'product-drafts:edit'
          - 'api-drafts:view'
          - 'api-drafts:edit'
          - 'child:view'
          - 'child:create'
          - 'child:manage'
          - 'product:view'
          - 'product:stage'
          - 'product:manage'
          - 'approval:view'
          - 'approval:manage'
          - 'api-analytics:view'
          - 'api-analytics:manage'
          - 'consumer-org:view'
          - 'consumer-org:manage'
          - 'app:view:all'
          - 'app:manage:all'
          - 'my:view'
          - 'my:manage'
          - 'webhook:view'
        created_at: '2021-01-25T14:38:49.000Z'
        updated_at: '2021-01-25T14:38:49.000Z'
        url: >-
          https://mycloudmanager.mydomain.com/api/cloud/registrations/6a45ed7e-d461-4ea7-89fa-f2a84b2f28ed

        If the client_id value in the output is different from the value that you specified in the ace-registration.json file, this indicates that a new client ID was generated by the registration process. Make a note of this new client_id value because it takes precedence over the value in your ace-registration.json file.

        Tip: You can alternatively confirm the registration by running this command, which writes the output to a file named ace-registration.yaml:
        apic-slim registrations:get ace-registration --server mgmtServerEndpoint
      6. In the Push REST APIs to API Connect dialog box, enter the client_id value (from the apic-slim registrations:get output) into the Client ID field, and enter the client_secret value from the ace-registration.json file into the Client secret field.

      For more information about creating a JSON object for the ace-registration.json file and a client registration, see Obtaining a Client ID and Secret in the Open API Explorer Documentation.

  6. After you enter your credentials, click Connect to API Connect.
    A connection is established to the IBM API Connect server and you are prompted to specify the target organization, product, and catalog.
  7. Select the target organization where you want to push the REST APIs.
    The Organization menu shows a list of organizations on the IBM API Connect server to which you have access.
  8. Specify the name of the product that you want to update or create, then click Continue.
    You can specify an existing product or you can create a new product. Specify the title, name, and version of the product. If you want to stage the product, specify the name of the catalog in which you want it to be staged.
    Available REST APIs are listed.
  9. Select the REST APIs that you want to push to IBM API Connect and add to the product, then click Continue.
    You are given the option to specify the endpoint that IBM API Connect uses to call the REST API that is hosted by App Connect Enterprise.
  10. Choose to either override the hostname and port number that are used by IBM API Connect to call the pushed APIs, or allow IBM API Connect to call the APIs directly.
    If you choose to override the hostname and port number, you can specify HTTP proxy details, HTTPS proxy details, or both.
    • To complete the process of pushing the REST APIs to IBM API Connect by using the web user interface, click Push APIs.
    • Optionally, you can copy the properties that you set through the web user interface to the clipboard, in command format, by clicking Copy command. You can then use this output to modify and run the mqsipushapis command to push the REST APIs to IBM API Connect. For more information, see Pushing REST APIs to IBM API Connect by using the mqsipushapis command.
  11. You can view progress as the selected REST APIs are pushed to IBM API Connect.
    • If an API definition exists on the IBM API Connect server, the existing definition is replaced by the definition of your REST API. If no API definition exists on the server, a new API definition is created for your REST API.
    • If the specified product exists, it is updated. If the specified product does not exist, a new product is created.
    • If a catalog is selected, the product is staged in the catalog.
  12. Click individual tasks to see a detailed breakdown of the progress of each task.
    When the REST APIs are pushed to IBM API Connect, close the wizard by clicking Done.

Results

Your REST API definition is created or updated on the IBM API Connect server.