...
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 as follows:<
Offset
>1</
Offset
>Warning Important: If you offset the default APIM port, you must also change the default API endpoints and the Thrift port accordingly. See Changing the Default Ports with Offset.
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 anexecution
element underproduction
state. It provides the API Manager's endpoint, username and password as executor parameters.Code Block language html/xml <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>
Run the API Manager. If its default port isn't changed, you can access the server using the following URL: https://<HostName>:9443/carbon.
- Run the Governance Registry. If its default port isn't changed, you can access the server using the following URL: https://<HostName>:<9445<9443+offset>/carbon.
- 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.
- Promote the service until it gets to the production state.
- 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.
- 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.