IBM Support

Defining, packaging and publishing a catalog-scoped policy for the API Gateway through the APIM

How To


Summary

This technote will provide the steps to define, package and publish a catalog-scoped policy for the API Gateway through the APIM UI instead of using the Datapower WebGUI or a gateway extension.

Objective

Create a catalog-scoped, user-defined policy that can be used in API assemblies within the catalog where the policy is published.

 

Environment

Applicable to APIC v10.0.5.x and v10.0.8.x LTS and CD releases.

Steps

  1. First, create a policy yaml with the required or a basic assembly.  To make things easier, the assembly can be created from the APIM API Gateway tab and then copied to the policy yaml.
  2. policy: 1.0.0
    info:
      title: Some Random Policy
      name: my-policy
      version: 1.0.0
      description: This is a random policy
    assembly:
        execute:
          - invoke:
              version: 2.0.0
              ...            
        
  3. Once the policy yaml is complete, create a zip file that contains only the yaml. Both the zip folder and the yaml file will be required to upload to the catalog.

    Tip: For the above task on macOS, run the zip command on the command line with the following flags:

    1. -x '**/.*' -x '**/__MACOSX' -x '.DS_Store'

    Including the flags prevents the autogenerated .DS_Store and __MACOSX files from being added to the compressed file.

  4. Upload the policy to the catalog of choice.
    1. Manage > Catalog > Catalog Settings > Gateway Services > View Policies for selected gateway > Upload
    2. Manage > Catalog > Catalog Settings > Gateway Services > View Policies for selected gateway > Upload
    3. Navigate to policys and upload
  5. Create a new API and navigate to the Gateway Assembly tab.               
  6. The new policy will be available under Integrations. It can be selected and added to the API.     
    1. Note: If you do not see the policy under Integrations, please note that it can sometimes take time to appear or may require a private browser window. If it does not show at all, please open an IBM APIC Support Ticket.
    2. The new policy will be available under Integrations. It can be selected and added to the API.             
  7. The new API can now be tested.                

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB77","label":"Automation Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSMNED","label":"IBM API Connect"},"ARM Category":[{"code":"a8mKe000000CaZXIA0","label":"API Connect-\u003EAPIC Platform - Other"}],"ARM Case Number":"TS021142880","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"10.0.0;10.0.1;10.0.2;10.0.3;10.0.4;10.0.5;10.0.6;10.0.7;10.0.8;10.0.9"}]

Document Information

Modified date:
24 February 2026

UID

ibm17261584