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 Labels in Producteev

The updateLabel operation updates a label.

updateLabel
<producteev.updateLabel>
    <title>{$ctx:title}</title>
    <backgroundColor>{$ctx:backgroundColor}</backgroundColor>
    <foregroundColor>{$ctx:foregroundColor}</foregroundColor>
	<labelId>{$ctx:labelId}</labelId>
</producteev.updateLabel>
Properties
  • title: The title of the label.
  • backgroundColor: Background text color of the label.
  • foregroundColor: Text color of the label.
  • labelId: The ID of the label.
Sample request

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

Sample Request for updateLabel
{
   "apiUrl": "https://www.producteev.com",
   "accessToken": "OTg4ZGY0NTgxZTE2ZDYzODNjNDUzZWUzMTI4YmExNzhiMDM2MTllNzNlYWQyMmY4ODk5YjQ1Mzc0ZGQxZjAxOA",
   "labelId":"55ba09f5b2fa09285400000e",
   "title":"test tiger",
   "backgroundColor":"#0066cc",
   "foregroundColor":"#ffffff"
}
Related Producteev documentation

 https://www.producteev.com/api/doc/#Update a label

Sample configuration

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

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