Using API Connect

You can expose a decision service ruleset to other organizations via IBM API Connect®, which manages access and uses built-in security mechanisms.

Before you begin

You must use authentication credentials for the cloud portal.

Important:

IBM API Connect can also generate client code for Swagger APIs. For more information, see Viewing and testing APIs in the Developer Portal External link opens a new window or tab, and for API Connect, see IBM API Connect External link opens a new window or tab.

About this task

To expose a decision service ruleset in API Connect, you must generate an OpenAPI file for API Connect, import it into API Connect, and configure the credentials.

Procedure

  1. Obtain a OpenAPI file specific to API Connect for a decision service ruleset.
  2. Import the OpenAPI file into API Connect, and set the credentials used when calling the ruleset.

Example

To get the OpenAPI file specific to API Connect from Rule Execution Server:

  1. Deploy the decision service ruleset to Rule Execution Server.
  2. In the Rule Execution Server console, go to the Explorer tab.
  3. In the Navigator pane, click a RuleApp, and then click a ruleset that corresponds to your decision service.
  4. In the ruleset view, click Retrieve HTDS Description File.
  5. Select REST as a service protocol type.
  6. Select OpenAPI – YAML or OpenAPI – JSON as a format to generate an OpenAPI file in YAML or JSON.
  7. Check Latest ruleset version and Latest RuleApp version to generate the OpenAPI file for the latest versions.
  8. Check Proxy for API Connect to generate an OpenAPI file for a proxy so that the decision service can be called from API Connect.
  9. Click Download.

To import the OpenAPI file into API Connect and set the credentials:

  1. Download and install API Designer for IBM API Connect, or use it on IBM® Bluemix.
  2. In the APIs tab in API Designer, click Add > Import an existing OpenAPI.
  3. Click Select File.
  4. Navigate to the OpenAPI file, and then click Open.
  5. Click Import.
  6. Click the Assemble tab to edit the policy assembly.
  7. Click the Calls Decision Service Operation invoke policy.
  8. In the property sheet, enter the user name and password of a user who has access to the cloud portal.
  9. Click the Save icon.

    Your decision service ruleset is now ready to be called from API Connect.

    You can now continue configuring your API at the API Connect level by adding a custom security.