Configuring an API rule

How to configure an API rule.

About this task

An API rule completes the processing of API requests or completes the operations that are required by the API requests.

To configure an API rule, specify whether to use dynamic actions or explicit actions. Dynamic actions take configuration values at run time and override the default properties in assembly actions. API rules that contain dynamic actions can be included in user-defined policies that are advertised to API Manager.

Based on whether the API rule defines dynamic actions or explicit actions, define the actions.
  • When using explicit actions, select the actions to include.
  • When using dynamic actions, specify one or more of the following settings for each action.
    • A URL to a file that contains serialized XML or JSON properties to be merged into the dynamic action. These properties override any existing literal or default properties. The URL can contain variable references. The fields in the associated file can contain variable references.
    • A literal string that defines serialized XML or JSON properties for merging into the dynamic action. These properties override the existing default properties. The literal string can contain variable references.
    • An existing named assembly action to retrieve default property values for the dynamic action. If an named assembly action is not specified, the URL reference, the literal configuration, or the combination of URL reference and literal configuration fully define the dynamic action.

Procedure

  1. In the search field, enter api
  2. From the search results, click API Rule.
  3. Click Add or New.
  4. Define the basic properties: Name, administrative state, and descriptive summary.
  5. Specify whether to use dynamic actions or explicit actions.
  6. Define the actions.
    • For explicit actions, in the API actions list add an action.
      1. Select or define an assembly action.
      2. Click Add.
      3. Repeat add another explicit action.
    • For dynamic actions, in the API dynamic actions list add an action. Each action can consist of any combination of a URL, literal string, or a named object.
      1. Click Add.
      2. Specify any combination of a URL, literal string, or a named object.
        • Specify a URL to a file that contains properties to be merged into the dynamic action.
        • Specify a literal string that defines properties for merging into the dynamic action.
        • Define or select an existing object to retrieve default property values for the dynamic action.
      3. Click Apply.
      4. Repeat add another dynamic action.
  7. Click Apply to save the changes to the running configuration.
  8. Click Save Configuration or Save changes to save the changes to the persisted configuration.