wso2 / product-apim

Welcome to the WSO2 API Manager source code! For info on working with the WSO2 API Manager repository and contributing code, click the link below.
http://wso2.github.io/
Apache License 2.0
845 stars 785 forks source link

API Categories Feature #7247

Closed msm1992 closed 4 years ago

msm1992 commented 4 years ago

Implement a proper way to get a group-wise view of API Categories without using the tag-wise grouping hack.

msm1992 commented 4 years ago

API Categories

API categories can be used to group APIs. In earlier versions this was possible by using tagwise groups. With the new addition of API categories feature tagwise grouping feature is now deprecated and the users are advised to use API categories instead.

1. Add API Category

1.1 Through Admin Portal UI

a. Goto admin portal and select API Category > API Categories from the left menu.

add_category_1 1

b. Click on Add New Category on top left corner of the main panel.

add_category_1

C. Give a name and a description for the category and save it.

add_category_1 2

1.2 Through admin REST API

curl -k -X POST -H "Authorization: Bearer " -H "Content-Type: application/json" https://localhost:9443/api/am/admin/v0.16/api-categories -d @category-data.json

NOTE : ACCESS_TOKEN should have admin_operations scope

Sample payload : { "name": "Sales", "description": "Sales category" }

2. Attach API Category to an API

a. Select an API and goto Design Configurations tab. From the category drop down select the API category and save the API.

attach_category_2 1

attach_category_2 2

3. List APIs in Devportal

Expand tag cloud menu. Select the API category under API Categories listing. APIs belonging to the selected category will be listed.

devportal_listing_3 1