Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The getUser operation retrieves a user by ID.

Code Block
languagexml
titlegetUser
<clio.getUser>
	<userId>{$ctx:userId}</userId>
</clio.getUser>
Properties
  • userId: The ID of the user whose details should be retrieved.
Anchor
request
request
Sample request

Following is a sample REST/JSON request that can be handled by the getUser operation.

Code Block
languagexml
titleSample Request for getUser
{
    "accessToken": "",
    "userId": "",
    "apiUrl": "https://app.goclio.com"
}
Related Clio documentation

http://api-docs.clio.com/v2/index.html#get-a-user

Anchor
sampleconfiguration
sampleconfiguration
Sample configuration

Following is a sample proxy service that illustrates how to connect to Clio with the init operation and use the getUser operation. The sample request for this proxy can be found in the getUser sample request.

Code Block
languagexml
titleSample Proxy
<?xml version="1.0" encoding="UTF-8"?>
<proxy name="clio_getUser" startOnLoad="true" statistics="disable" trace="disable" transports="https,http" xmlns="http://ws.apache.org/ns/synapse">
   <target>
      <inSequence>
         <property name="apiUrl" expression="json-eval($.apiUrl)"/>
         <property name="accessToken" expression="json-eval($.accessToken)"/>
         <property name="userId" expression="json-eval($.userId)"/>
         <clio.init>
            <apiUrl>{$ctx:apiUrl}</apiUrl>
            <accessToken>{$ctx:accessToken}</accessToken>
         </clio.init>
         <clio.getUser>
            <userId>{$ctx:userId}</userId>
         </clio.getUser>
         <respond/>
      </inSequence>
      <outSequence>
         <send/>
      </outSequence>
   </target>
   <description/>
</proxy>