wso2 api manager database

∥☆過路亽.° 提交于 2019-12-14 02:43:17

问题


I don't understand how can I access the data of APIs (api_id) USER (user_id), subscriptions (is a user 'x' subscribed to API 'y'?) ...

how can I perform such controls by connecting to some db?


回答1:


Though your question is not much clear,hope you want to know how WSO2 API Manager implemented database data accessing part.I'll explain how WSO2 API Manager did controlling over database data.

You could found the database scripts[it contains h2/mysql/oracle dbscripts] use by WSO2 API Manager from [1] which used to create the database table structure of it.You'll notice there are separate database tables to store information on APIs[AM_API] ,subscribers[AM_SUBSCRIBER] and subscriptions[AM_SUBSCRIPTION],etc.And you'll notice how foreign keys have been used to enable relationships among tables to perform controls over data while ensuring that the data stored in a consistent way.

Then there's an inbuilt java API defined for WSO2 API Manager related back-end functionalities and you can found it from [2] and its implemented java code can be found from [3].If you have a look on ApiMgtDAO.java class implementation in org.wso2.carbon.apimgt.impl bundle,you'll get a better understanding how the database access layer for API Manager implemented with querying through database data.

Hope above will help to you.

Thanks;

/Lalaji

[1] https://svn.wso2.org/repos/wso2/carbon/platform/branches/4.0.0/products/apimgt/1.0.0/modules/distribution/resources/sql/

[2]https://svn.wso2.org/repos/wso2/carbon/platform/branches/4.0.0/components/apimgt/org.wso2.carbon.apimgt.api/1.0.0/

[3]https://svn.wso2.org/repos/wso2/carbon/platform/branches/4.0.0/components/apimgt/org.wso2.carbon.apimgt.impl/1.0.0/



来源:https://stackoverflow.com/questions/12251336/wso2-api-manager-database

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!