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.
Operation | Description |
---|---|
Creates a comment in the specified story. | |
1Working with Comments in AgileZen | Retrieves a single comment from the specified story. |
1Working with Comments in AgileZen | Retrieves the list of comments from the specified story. |
1Working with Comments in AgileZen | Modifies a single comment in the specified story. |
Operation details
This section provides further details on the operations related to comments.
Creating a comment
The
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
The text of the comment.text:
The ID of the story to which the comment belongs.storyId:
The ID of the project to which the story belongs.projectId:
Sample request
Following is a sample REST/JSON request that can be handled by the createComment
operation.
{ "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
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
The ID of the comment whose details need to be updated.commentId:
The ID of the story to which the comment belongs.storyId:
The ID of the project to which the story belongs.projectId:
Sample request
Following is a sample REST/JSON request that can be handled by the getComment
operation.
{ "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
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
The ID of the story to which the comments belong.storyId:
The ID of the project to which the story belongs.projectId:
Filter queries which the user can use to filter the returned data.filters:
The number of the page to be returned when response is paginated.page:
The number of responses to be returned in a call when response is paginated.pageSize:
Sample request
Following is a sample REST/JSON request that can be handled by the listComments
operation.
{ "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
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
The ID of the comment to update.commentId:
The ID of the story to which the comment belongs.storyId:
The ID of the project to which the story belongs.projectId:
The text of the comment.text:
Sample request
Following is a sample REST/JSON request that can be handled by the updateComment
operation.
{ "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.
<?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>