All docs This doc
Skip to end of metadata
Go to start of metadata

To use the Clio connector, add the  <clio.init>  element in your configuration before carrying out any other Clio operations. 

Before you start performing various operations with the connector, make sure to import the Clio certificate to your ESB client keystore.

Follow the below mentioned steps to add valid certificate to access Clio API over https into the ESB client keystore:

  1. Extract the certificate from browse by navigating to ' https://app.goclio.com ' and click the lock icon on the address bar to view the certificate.
  2. Place the downloaded certificate into "Clio_CONNECTOR_HOME/src/test/resources/keystores/products" folder.
  3. Navigate to "Clio_CONNECTOR_HOME/src/test/resources/keystores/products/" using command prompt and execute the following command.
  4. This command will import Clio certificate in to keystore. Give "wso2carbon" as password.To import the certificate give "wso2carbon" as password. Press "Y" to complete certificate import process.

    keytool -importcert -file CERT_FILE_NAME -keystore wso2carbon.jks -alias -alias "CERT_NAME"

Clio’s API is only exposed through OAuth 2.0. In order to access any of the methods exposed in the API, your application must obtain authorization from the user.  For more information on authentication, see http://api-docs.clio.com/v2/index.html#authorization-with-oauth-2-0.

init
<clio.init>
	<apiUrl>{$ctx:apiUrl}</apiUrl>
    <accessToken>{$ctx:accessToken}</accessToken>
</clio.init>
Properties  
  • apiUrl:  The base end point URL of the Clio API.
  • accessToken: The auth token to read and manipulate data of the Clio account.

Configuring the message formatters and builders

Ensure that the following Axis2 configurations are added and enabled in the <ESB_HOME>\repository\conf\axis2\axis2.xml file.

Required message formatter
<messageFormatter contentType="application/json"class="org.apache.synapse.commons.json.JsonStreamFormatter"/>
<messageFormatter contentType="text/html"class="org.wso2.carbon.relay.ExpandingMessageFormatter"/>
Required message builder
<messageBuilder contentType="application/json"class="org.apache.synapse.commons.json.JsonStreamBuilder"/>
<messageBuilder contentType="text/html"class="org.wso2.carbon.relay.BinaryRelayBuilder"/>

Configuring the operations

Now that you have connected to Clio, use the information in the following topics to perform various operations with the connector.

  • No labels