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 Message Replies in Teamwork



Overview

The following operations allow you to work with message replies. Click an operation name to see details on how to use it.

For a sample proxy service that illustrates how to work with attachments, see Sample configuration .

OperationDescription
updateMessageReplyModifies a message reply.
deleteMessageReplyDelete a message reply.
getMessageReplyReturns a message reply identified by its id.
getRepliesToMessageRetrieves all Replies to a Message.

Operation details

This section provides further details on the operations related to discussions.

Updating a message reply

The updateMessageReply operation updates a  message reply.

updateMessageReply
<teamwork.updateMessageReply>
    <messageReplyId>{$ctx:messageReplyId}</messageReplyId>
	<messageBody>{$ctx:messageBody}</messageBody>
</teamwork.updateMessageReply>
Properties
  • messageReplyId: The id of the message reply.
  • messageBody: The body of the reply.
Sample Request

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

Sample request for updateMessageReply
{
    "apiUrl":"https://wso2test.teamwork.com/",
    "apiKey":"clark42ceiling",
    "messageReplyId": "610296",
    "messageBody": "Hello"
}
Related Teamwork documentation

http://developer.teamwork.com/messagereplies#update_message_re

Deleting a message reply

The deleteMessageReply operation deletes a  message reply.

deleteMessageReply
<teamwork.deleteMessageReply>
	<messageReplyId>{$ctx:messageReplyId}</messageReplyId>
</teamwork.deleteMessageReply>
Properties
  • messageReplyId: The id of the message reply.
Sample Request

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

sample request for deleteMessageReply
{
    "apiUrl":"https://wso2test.teamwork.com/",
    "apiKey":"clark42ceiling",
    "messageReplyId": "610296"
}
Related Teamwork documentation

http://developer.teamwork.com/messagereplies#destroy_message_r

Retrieving a message reply

The getMessageReply operation retrieves a  message reply of given id.

getMessageReply
<teamwork.getMessageReply>
	<messageReplyId>{$ctx:messageReplyId}</messageReplyId>
</teamwork.getMessageReply>
Properties
  • messageReplyId: The id of the message reply.
Sample Request

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

Sample request for getMessageReply
{
    "apiUrl":"https://wso2test.teamwork.com/",
    "apiKey":"clark42ceiling",
    "messageReplyId": "610296"
}
Related Teamwork documentation

http://developer.teamwork.com/messagereplies#retrieve_a_single

Retrieving all message replies for a message

The getRepliesToMessage operation retrieves all replies for a message of given id.

getRepliesToMessage
<teamwork.getRepliesToMessage>
    <messageId>{$ctx:messageId}</messageId>
    <page>{$ctx:page}</page>
	<pageSize>{$ctx:pageSize}</pageSize>
</teamwork.getRepliesToMessage>
Properties
  • messageId: The id of the message reply.
  • page: The page no.
  • pageSize: The number of records in a page
Sample Request

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

Sample request for getRepliesToMessage
{
    "apiUrl":"https://wso2test.teamwork.com/",
    "apiKey":"clark42ceiling",
    "messageId": "174704",
	"page": "1",
	"pageSize": "25",
}
Related Teamwork documentation

http://developer.teamwork.com/messagereplies#retrieve_replies_

Sample configuration

Following is a sample proxy service that illustrates how to connect to Teamwork with the init operation and use the updateMessageReply operation. The sample request for this proxy can be found in updateMessageReply sample request. You can use this sample as a template for using other operations in this category.

Sample proxy
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="tw_updateMessageReply"
       transports="https http"
       startOnLoad="true"
       trace="disable">
   <description/>
   <target>
      <inSequence>
         <property name="apiUrl" expression="json-eval($.apiUrl)"/>
         <property name="apiKey" expression="json-eval($.apiKey)"/>
         <property name="messageReplyId" expression="json-eval($.messageReplyId)"/>
         <property name="messageBody" expression="json-eval($.messageBody)"/>
         <teamwork.init>
            <apiUrl>{$ctx:apiUrl}</apiUrl>
            <apiKey>{$ctx:apiKey}</apiKey>
         </teamwork.init>
         <teamwork.updateMessageReply>
            <messageReplyId>{$ctx:messageReplyId}</messageReplyId>
            <messageBody>{$ctx:messageBody}</messageBody>
         </teamwork.updateMessageReply>
         <respond/>
      </inSequence>
      <outSequence/>
      <faultSequence/>
   </target>
</proxy>