In WSO2 G-Reg, the categorization feature allows you to further filter (narrow down) the results of a particular search to refine it, by selecting a specific value or a set of values for a given attribute. Also, you can provide the filtering criteria for multiple attributes.
Configuring the RXT definition based on the refinements
Follow the steps below to configure the RXT of the asset type to enable categorization on it.
- Log in to the Management Console using the following URL and admin/admin credentials: https://<G-REG_HOST>:<G-REG_PORT>/carbon/
- Click Extensions, and then click Artifact Types in the Configure menu.
- Click View/Edit option of restservice to configure REST services to enable categorization on them.
- Enter the following example configuration to add a new option field to the
Categorization
table of the REST service RXT using the provided Editor.<table name="Categorization"> <field type="options" categorization="true"> <name label="Security">Security</name> <values> <value>Encrypted</value> <value>Policy-based</value> <value>Token-based</value> <value>Signature-based</value> </values> </field> </table>
- Click Save , and then click Ok in the message which pops-up as shown below.
Applying the refinements to an asset
Follow the instructions below to apply the defined categories and select the categorization values for the BuyMoreBillCalculateRESTAPI Version 1.0.0
asset.
- Log in to the WSO2 G-Reg Publisher using the following URL and admin/admin credentials: https://<G-REG_HOST>:<G-REG_PORT>/publisher/
- Type "name:BuyMoreBillCalculateRESTAPI version:1.0.0" in the search field and click the search icon.
- Click the
BuyMoreBillCalculateRESTAPI
asset, which appears in the search results to open it.
- Click the EDIT button in the top menu.
- Select the categorization value.
- Click Update to finalize the asset updating process.
Searching for the asset using refinements
Once you add the filters to an asset, follow the steps below to use those filters to search for that asset in the G-Reg Store.
- Log in to the WSO2 G-Reg Store using the following URL and admin/admin credentials: https://<G-REG_HOST>:<G-REG_PORT>/store/
- Click Rest Services in the left menu.
- Expand Security category under the Refine by menu, and select the Token-based option.
You view the BuyMoreBillCalculateRESTAPI Version 1.0.0
asset, to which you added the refinements in the search results.
For more information on searching for assets using filters, see the following: