Complete the following steps before adding the PingIntelligence policy to your API:

  1. Download the PingIntelligence policy from the ping identity download site.
  2. Extract the policy by using the following command.
    # tar –zxvf <<file name>>
    For example,
    # tar –zxvf pi-api-ibm-policy-4.1.0.tar.gz

Complete the following steps to add the PingIntelligence policy components to your API in IBM API Manager:

  1. Log in to API Manger.

  2. Click the Menu icon on the top-left corner, to open navigation pane.

  3. Click Drafts in the navigation pane.

  4. Click the APIs tab.

  5. Click on your API under TITLE list or enter the API name in Search APIs dialog box and select the API.

  6. Click Source tab to edit your API definition.

  7. Copy and paste the content of PingIntelligence policy into the Assembly block of your API definition at three places as illustrated:
    1. Open the pi_policy.yaml file, copy the content of the set-variable: block having ASE Config component and paste it in the next line after execute: block in your API.

    2. Next, copy the content of the gateway script: block containing ASE Request component from pi_policy.yaml file and paste it after the immediate last line of ASE Config component, that was copied in step 8.1.

    3. Copy the content of the gateway script: block containing ASE Response component from pi_policy.yaml file and paste it as the last component of your API..

    Note: The assembly component ASE Reponse should always be the last component of your policy assembly.
  8. Click the Validate icon to validate your changes. Click the Save icon after completing the validation.
  9. Click the Assemble tab to open the Assemble view. Verify the sequence of the components ASE Config, ASE Request, and ASE Response in the Policy Assembly. The order must match as highlighted in the red boxes of the following image.