Setting API properties

In addition to the pre-supplied API properties that you can use to control the behavior of API Connect policies, you can define your own API properties. The properties that you define can be referenced in your API definitions.

About this task

You can complete this task either by using either the API Designer UI application, or by using the browser based API Manager UI.

API properties include property name, value, and, optionally a specific Catalog to which a property value applies. For a list of pre-supplied API properties relating to various policies, see API properties.
Note: Once defined, an API property is read only.

For information on how to reference a property in an API definition, see Variable references in API Connect.

It is also possible to define properties that are specific to a Catalog and can be referenced by any of the APIs in that Catalog; for more information, see Creating and configuring Catalogs. Note that if you define a Catalog property of the same name as an API property, the API property takes precedence over the Catalog property.

Tip: If you add or change an API property on an API that is already staged or published, you must re-stage or re-publish the Product that contains the updated API for the change to take effect.

Procedure

To set API properties, complete the following steps:

  1. In the navigation pane, click Develop icon in the API UI navigation pane Develop, then select the APIs tab.
  2. Click the title of the API definition that you want to work with.
  3. Click Properties, then click Add.
  4. Enter a property Name and, optionally, a Default value and a Description. The following character set is supported for the Name of an API property: [A-Za-z0-9_-]+. No spaces are allowed.
    Note: If you publish the API to the DataPower® Gateway (v5 compatible) the property name must begin with either a letter or a _ (underscore) character. This restriction does not apply if you publish the API to the DataPower API Gateway. For information on the different types of gateway, see API Connect gateway types.
  5. Select Encoded if you want to hide the property values, or protect user passwords from casual observance.
    Note: If you encode a property value, it is saved in Base64 encoded form; it is not encrypted. If you subsequently clear the Encoded check box, the original property value is restored in its unencoded form.
  6. To define a property value that is specific to a particular Catalog, complete the following steps:
    1. In the Define catalog specific values for this property section, select the required Catalog and enter the corresponding value.
      Note: The Catalogs that you can select from are those that are defined for the management server and provider organization that you are connected to.

      If you are using the API Manager user interface, the connection details are determined by the API Manager URL that you open, and the user ID with which you log in. If you are using the API Designer user interface, you provide the management server details and user ID in the login window that opens when you first launch API Designer; see Logging into API Connect Designer.

      For details of how to create a Catalog in a provider organization, see Creating and configuring Catalogs.

    2. To define further Catalog/value pairs, click Add.
  7. Click Save when done.