Add Custom Attributes to Applications¶
You as a developer can register applications via the WSO2 API Manager 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, WSO2 API Manager also allows you to add a set of custom attributes while creating an application if required.
Follow the steps below to configure WSO2 API Manager 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 WSO2 API Manager.
Server-specific configuration¶
Follow the instructions below to configure server-specific custom attributes:
-
Open the
<API-M-home>/repository/conf/deployment.toml
file. -
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.
Tenant-specific configuration¶
Follow the instructions below to configure tenant-specific custom attributes:
- Sign in to the WSO2 API Manager Admin Portal
https://<hostname>:9443/admin
. - Click Settings → Advanced.
-
Add
ApplicationConfigs
as shown below and save.
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.