...
Uncomment the existing
<ExternalAPIStores>
element in<AM_Home>/repository/conf/api-manager.xml
file of the API Publisher node, and configure an <ExternalAPIStores> element for each external WSO2 API Stores that you need to publish APIs to. For example,Code Block language html/xml <ExternalAPIStores> <ExternalAPIStore id=”Store1” type="wso2"> <DisplayName>Store1</DisplayName> <Endpoint>http://localhost:9763/store</Endpoint> <Username>xxxx</Username> <Password>xxxx</Password> </ExternalAPIStore> </ExternalAPIStores>
In above configuration,
Element/Attribute Description id The external store identifier, which is a unique value. type Type of the Store. APIM 1.5.0 release supports only WSO2-specific API Stores. Other types will be supported in future releases. <DisplayName> The name of the Store that is displayed in the publisher UI. <Endpoint>
URL of the API Store. <Username> & <Password> Credentials of a user who has permissions to create and publish APIs.
To secure the user credentials given above, add a secure vault configuration as follows:
For each external API Store, add a configuration similar to the one below in <AM_HOME>/repository/conf/security/cipher-tool.properties file.
Code Block ExternalAPIStores.ExternalAPIStore.Password_{store_id}=api-manager.xml//APIManager/ExternalAPIStores/ExternalAPIStore[@name='External_Store_id_defined_in_api-manager.xml']/Password,true
Add the following to <AM_HOME>/repository/conf/security/cipher-text.properties file:
Code Block ExternalAPIStores.ExternalAPIStore.Password_{store_id}=[user_password]
Generate encrypted values for the passwords using the cipher tool
Use the encrypted password in the configuration in step 1.
Start the API Manager server and create an API.
Click on the newly created API and note a new tab called External API Stores added to the API Publisher console.
Note the following:- You can select multiple external API Stores and click Save to publish your API to them.
- If the API creator updates the API after publication to external stores, either the creator or a publisher can simply push those changes to the published stores by selecting the stores and clicking Save again.
- If the API creator deletes the API, each external store that it is published to will receive a request to delete the API from the store.
Subscribing to APIs from external stores
Once APIs are published to the configured set of external stores, those will be appearing in those stores. But will be available in an advertise mode only. This means that external store users will get to know about those APIs, but in order to subscribe they should visit the original publisher store.
For example, above we showed how to publish API1-1.0.0 into the external store ‘Store1’. Now in the Store1 API-1.0.0 will be visible. But if someone clicks on that API, there will be a link to visit original publisher’s store.
Similarly, you can deprecate, retire and block APIs. Next, see how to manage subscriptions and access tokens in Managing API Usage.