Visibility settings prevent certain user roles from viewing and modifying APIs created by another user role. This feature allows you to restrict the ability to view and modify APIs for a set of users.
Work In Progress
This is available only as a WUM update.
Enabling Access Control
Instructions to new users
To enable this feature, open the
<APIM_HOME>/repository/conf/api-manager.xml file. Add the code given below under
If you are an existing user, with at least one API created.
Add the following code as the first sub-element under
Replace the handler class
org.wso2.carbon.apimgt.impl.handlers.CustomAPIIndexHandleras shown below.
To re-index the registry, update the
lastAccessTimeLocationparameter as given below.
Restart the server after doing these changes.
Note that the registry indexing takes some time depending on the number of APIs you have in your store, so the existing APIs may not appear if you are accessing the publisher/store immediately after you start the server.
Using the API Publisher UI
- Log in to API Publisher as an API Creator. For more information on User Roles, see Managing Users and Roles.
- Create an API. Select Restricted by roles for Access Control in the Design tab.
Add the roles that have permission to view or modify this API.
Ensure that the roles you add are valid. If the current creator is not an APIM admin, there should be at least one role of the current creator.
Users with APIM admin permission are treated differently. Even if an API is restricted to certain set of creators of publishers, it will be visible to all the API creators and publishers with APIM admin role.
Using the REST API
You can use the existing REST API to add a new API. To create an API with publisher access control restriction, add the two elements shown below in your request body,
Note that the roles should be valid. If the API creator is not an API-M admin he/she should at least have one of his/her roles in the