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 used by 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.
  • To use explicit actions, select the actions to include.
  • To use 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.
    • A named assembly action to retrieve default property values for the dynamic action. If a 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.
  4. Define the basic properties - Name, administrative state, and comments.
  5. Specify whether to use dynamic actions or explicit actions.
  6. Define the actions.
    For explicit actions, add actions from the API actions list.
    1. Select or define an assembly action.
    2. Click Add.
    3. Repeat add another explicit action.
    For dynamic actions, add actions from the API dynamic actions list.
    1. Click Add.
    2. Specify any combination of a URL, literal string, or a named object.
    3. Click Apply.
    4. Repeat add another dynamic action.
  7. Click Apply to save changes to the running configuration.
  8. Click Save to save changes to the persisted configuration.