Add Custom Attributes to Applications

You as a developer can register applications via the MWARE ESB Developer Portal. When you create a subscription to an API for an application, it allows you to consume the API. Thereby, this helps developers to expose and monetize their APIs. Applications can be created with a predefined set of properties. In addition, MWARE ESB also allows you to add a set of custom attributes while creating an application if required.

Follow the steps below to configure MWARE ESB in order to accept custom attributes to applications:

Step 1 - Configure custom attributes for applications

Use one of the following options to configure custom attributes in MWARE ESB.

Server-specific configuration

Follow the instructions below to configure server-specific custom attributes:

  1. Open the <API-M-home>/repository/conf/deployment.toml file.

  2. Add the application_attributes section as shown below.

    [[apim.devportal.application_attributes]]
    required=true
    hidden=false
    name="External Reference Id"
    description="Sample description of the attribute"

    Note

    Default attribute values can be specified in the configurations as below. Default values must be defined for required, hidden attributes.

    [[apim.devportal.application_attributes]]
    required=true
    hidden=true
    default="DEFAULT"
    name="Organization Id"
    description="Sample description of the attribute"

Tenant-specific configuration

Follow the instructions below to configure tenant-specific custom attributes:

  1. Sign in to the MWARE ESB Admin Portal https://<hostname>:9443/admin.
  2. Click SettingsAdvanced.
  3. Add ApplicationConfigs as shown below and save.

    "ApplicationConfigs": {
       "Attributes" : [
           {
               "Attribute" : "External Reference Number",
               "Required" : true,
               "Description" : "Sample description"
           },
           {
               "Attribute" : "Tenant Billing tier"
           }
       ]
    }

Step 2 - Create an application with the custom attributes

After configuring the custom attributes as shown in the previous step, you will be able to add these attributes to the applications you create via the Developer Portal.

  1. Sign in to the API Developer Portal.

  2. Click Add Application, to add a new application.

    Add application button

    You will see the configured custom attribute as shown below.

    Custom application attributes

  3. Add the application details and click SAVE.

Top