This documentation is for WSO2 API Manager 1.4.0 View documentation for the latest release.
Integrating with WSO2 Governance Registry Services - API Manager 1.4.0 - WSO2 Documentation
||
Skip to end of metadata
Go to start of metadata

WSO2 Governance Registry is a registry-repository for storing and managing metadata related to service and other artifacts. The Governance Registry maintains RXTs referring to APIs you create using the API Publisher. When you publish an API, it gets exposed in the API Store for users to consume. Usually, API publication is done using the API Publisher Web interface. Instead, you can integrate the API Manager with the Governance Registry to directly publish the artifacts relevant to the API over to the API Store.

The following steps apply to WSO2 Governance Registry version 4.6.0 or after.

Follow the steps below to publish services on Governance Registry to API Manager.

  1. Download and run both Governance Registry and API Manager.

    When running more than one WSO2 products on the same server, you have to change the default port of one product in order to prevent port conflicts. To do this, change the <offset> value of one product in <PRODUCT_HOME>/repository/conf/carbon.xml file. In this example, we set the port offset value of Governance Registry to 1.
    <!-- Ports offset. This entry will set the value of the ports defined below to the define value + Offset. e.g. Offset=2 and HTTPS port=9443 will set the effective HTTPS port to 9445 -->
     
    <Offset>1</Offset>
  2. In WSO2 Governance Registry 4.6.0 , we do a simple POST to publish the API to Store. It does not involve registry mounting.

    Next, provide API Manager credentials in <GREG_HOME>/repository/resources/lifecycles/configurations.xml file. For example, the following code block defines an execution element under production state. It provides the API Manager's endpoint, username and password as executor parameters.

    <execution forEvent="Publish" class="org.wso2.carbon.governance.registry.extensions.executors.apistore.ApiStoreExecutor">
       <parameter name="apim.endpoint" value="http://localhost:9763/"/>
       <parameter name="apim.username" value="admin"/>
       <parameter name="apim.password" value="admin"/>
    </execution>
  3. Run the API Manager. If its default port isn't changed, you can access the server using the following URL: https://<HostName>:9443/carbon.
  4. Run the Governance Registry. If its default port isn't changed, you can access the server using the following URL: https://<HostName>:<9443+offset>/carbon.
  5. Log in to the Governance Registry's management console and create a new service in it. Attach the default service life cycle to it. For instructions on how to add a new service and associate a new life cycle, see http://docs.wso2.org/wiki/display/Governance453/Managing+Services in the Governance Registry documentation. 
  6. Promote the service until it gets to the production state. 
  7. Once it is in the production state, publish it using the Publish button.

    You should get a confirmation message once the API is successfully published.

     
  8. You have now published a service in the Governance Registry. Open the API Store to see that this published service is successfully published as an API.
  • No labels