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 Comments in AgileZen


Overview

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

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

OperationDescription

createComment

Creates a comment in the specified story.

getCommentRetrieves a single comment from the specified story.
listCommentsRetrieves the list of comments from the specified story.
updateCommentModifies a single comment in the specified story.

Operation details

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

Creating a comment 

The createComment operation creates a comment in the specified story.

createComment
<agilezen.createComment>
    <text>{$ctx:text}</text>
    <storyId>{$ctx:storyId}</storyId>
	<projectId>{$ctx:projectId}</projectId>
</agilezen.createComment>
Properties
  • text: The text of the comment.
  • storyId: The ID of the story to which the comment belongs.
  • projectId: The ID of the project to which the story belongs.
   Sample request

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

Sample Request for createComment
{
    "apiUrl": "https://agilezen.com",
    "apiKey": "7fb8d03c21d748e09fb31b62b1ba7d13",
    "format": "json",
    "text": "This is comment #03",
    "storyId": 1,
    "projectId": 70025
}

Note

There are optional parameters available. For more information on the usage of these parameters please check the API document. 

Related AgileZen documentation

http://dev.agilezen.com/resources/comments.html#create_a_new_comment

Retrieving a single comment from the specified story

The getComment operation retrieves a single comment from the specified story.

getComment
<agilezen.getComment>
   <commentId>{$ctx:commentId}</commentId>
    <storyId>{$ctx:storyId}</storyId>
	<projectId>{$ctx:projectId}</projectId>
</agilezen.getComment>
Properties
  • commentId: The ID of the comment whose details need to be updated.
  • storyId: The ID of the story to which the comment belongs.
  • projectId: The ID of the project to which the story belongs.
   Sample request

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

Sample Request for getComment
{
    "apiUrl": "https://agilezen.com",
    "apiKey": "7fb8d03c21d748e09fb31b62b1ba7d13",
    "format": "json",
    "commentId": 1582996,
    "storyId": 1,
    "projectId": 70025
}

Note

There are optional parameters available. For more information on the usage of these parameters please check the API document. 

Related AgileZen documentation

http://dev.agilezen.com/resources/comments.html#get_a_comment

Retrieving the list of comments from the specified story

The listComments operation retrieves the list of comments from the specified story.

listComments
<agilezen.listComments>
    <storyId>{$ctx:storyId}</storyId>
    <projectId>{$ctx:projectId}</projectId>
    <filters>{$ctx:filters}</filters>
    <page>{$ctx:page}</page>
	<pageSize>{$ctx:pageSize}</pageSize>
</agilezen.listComments>
Properties
  • storyId: The ID of the story to which the comments belong.
  • projectId: The ID of the project to which the story belongs.
  • filters: Filter queries which the user can use to filter the returned data.
  • page: The number of the page to be returned when response is paginated.
  • pageSize: The number of responses to be returned in a call when response is paginated.
   Sample request

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

Sample Request for listComments
{
    "apiUrl": "https://agilezen.com",
    "apiKey": "7fb8d03c21d748e09fb31b62b1ba7d13",
    "format": "json",
    "storyId": 1,
    "projectId": 70025,
    "page": 2,
    "pageSize": 2
}

Note

There are optional parameters available. For more information on the usage of these parameters please check the API document. 

Related AgileZen documentation

http://dev.agilezen.com/resources/comments.html#list_comments_within_a_story

Modifying a single comment in the specified story

The updateComment operation modifies a single comment in the specified story.

updateComment
<agilezen.updateComment>
    <commentId>{$ctx:commentId}</commentId>
    <storyId>{$ctx:storyId}</storyId>
    <projectId>{$ctx:projectId}</projectId>
	<text>{$ctx:text}</text>
</agilezen.updateComment>
Properties
  • commentId: The ID of the comment to update.
  • storyId: The ID of the story to which the comment belongs.
  • projectId: The ID of the project to which the story belongs.
  • text: The text of the comment.
   Sample request

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

Sample Request for updateComment
{
    "apiUrl": "https://agilezen.com",
    "apiKey": "7fb8d03c21d748e09fb31b62b1ba7d13",
    "format": "json",
    "commentId": 1582996,
    "text": "Updated - This is comment #03",
    "storyId": 1,
    "projectId": 70025
}

Note

There are optional parameters available. For more information on the usage of these parameters please check the API document. 

Related AgileZen documentation

http://dev.agilezen.com/resources/comments.html#update_a_comment

Sample configuration

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

Sample Proxy
<?xml version="1.0" encoding="UTF-8"?>
<proxy name="agilezen_createComment" 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="apiKey" expression="json-eval($.apiKey)"/>
         <property name="format" expression="json-eval($.format)"/>
         <property name="text" expression="json-eval($.text)"/>
         <property name="storyId" expression="json-eval($.storyId)"/>
         <property name="projectId" expression="json-eval($.projectId)"/>
         <property name="enrichments" expression="json-eval($.enrichments)"/>
         <agilezen.init>
            <apiUrl>{$ctx:apiUrl}</apiUrl>
            <apiKey>{$ctx:apiKey}</apiKey>
            <format>{$ctx:format}</format>
            <enrichments>{$ctx:enrichments}</enrichments>
         </agilezen.init>
         <agilezen.createComment>
            <text>{$ctx:text}</text>
            <storyId>{$ctx:storyId}</storyId>
            <projectId>{$ctx:projectId}</projectId>
         </agilezen.createComment>
         <respond/>
      </inSequence>
      <outSequence>
         <send/>
      </outSequence>
   </target>
   <description/>
</proxy>