This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Working with Users in Producteev

The getUser operation retrieves a specific user. 

getUser
<producteev.getUser>
	<userId>{$ctx:userId}</userId>
</producteev.getUser>
Properties
  • userId: The ID of the user to find.
Sample request

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

Sample Request for getUser
{
    "apiUrl": "https://www.producteev.com",
    "accessToken": "OTg4ZGY0NTgxZTE2ZDYzODNjNDUzZWUzMTI4YmExNzhiMDM2MTllNzNlYWQyMmY4ODk5YjQ1Mzc0ZGQxZjAxOA",
    "userId": "51e83d8bfa46341808000029"
}
Related Producteev documentation

 https://www.producteev.com/api/doc/#Get current user

Sample configuration

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

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