Wednesday, November 13, 2013

Advertising with WSO2 API Manager by Publishing to External API Store

 In WSO2 API Manager 1.5.0, we don't have the support of API sharing across tenants because with the current design, there is not way to replicate API metadata that should be written to the databases and registries along with the API configurations. Therefore, there is no straightforward approach to replicate a set of tenant APIs from one tenant to others.
 













But we have the Advertising feature, where we have the capability of displaying APIs published by tenant 1, in tenant 2's API store. However, tenant 2's users will not be able to subscribe to the APIs published by tenant 1.


To do this, you need to uncomment the <ExternalAPIStores> element in $APIM_HOME/repository/conf/api-manager.xml. Tenant's external API stores can be configured as follows by giving the tenant domain, tenant admin's user name and password
     <ExternalAPIStore id="Store1" type="wso2">
            <DisplayName>Store1</DisplayName>
            <Endpoint>http://localhost:9763/store?tenant=abc.com</Endpoint>
            <Username>abc@abc.com</Username>
            <Password>abc123</Password>
        </ExternalAPIStore>


Imagine you logged into the API Publisher as the tenant xyz.com. Then in the UI, there will be a tab available saying "External API Store". There, you will be able to see all the External tenant details you have configured earlier via the api-manager.xml. Now tenant xyz.com can publish its API, so that tenant abc.com too can see it.
Now if you login to tenant abc.com's API store, you will see the API advertised or published by tenant xyz.com. (But still tenant abc.com will not be able to subscribe to it using abc.com's credentials. )

Await for the next WSO2 API Manager release, which will allow you to subscribe to the Advertised API regardless of the tenant. 

No comments:

Post a Comment