1. Comment Fields

  1. body (string) - The comment body. A value for this field is required when a new comment is created.

2. /projects/:project_id/comments/add&parent_id=:parent_id

This command will post a new comment on the specified object in the given project.

Method: POST.

Request example:

submitted = submitted
comment[body] = My comment!

Response:

<comment>
  <id>23</id>
  <type>
    <![CDATA[Comment]]>
  </type>
  <name>
    <![CDATA[Comment on One ticket]]>
  </name>
  <body>
    <![CDATA[My comment!]]>
  </body>
  <state>...</state>
  <visibility>...</visibility>
  <created_on>...</created_on>
  <created_by_id>...</created_by_id>
  <updated_on>...</updated_on>
  <updated_by_id>...</updated_by_id>
  <version>...</version>
  <permalink>...</permalink>
  <project_id>...</project_id>
  <parent_id>...</parent_id>
  <milestone_id>...</milestone_id>
  <permissions>
    <can_edit>1</can_edit>
    <can_delete>1</can_delete>
    <can_change_visibility>1</can_change_visibility>
    <can_move>0</can_move>
    <can_copy>0</can_copy>
  </permissions>
</comment>

3. /projects/:project_id/comments/:comment_id

Displays comment details.

Method: GET

<comment>
  <id>23</id>
  <type>
    <![CDATA[Comment]]>
  </type>
  <name>
    <![CDATA[Comment on One ticket]]>
  </name>
  <body>
    <![CDATA[My comment!]]>
  </body>
  <state>...</state>
  <visibility>...</visibility>
  <created_on>...</created_on>
  <created_by_id>...</created_by_id>
  <updated_on>...</updated_on>
  <updated_by_id>...</updated_by_id>
  <version>...</version>
  <permalink>...</permalink>
  <project_id>2</project_id>
  <parent_id>10</parent_id>
  <milestone_id>
  </milestone_id>
  <permissions>
    <can_edit>1</can_edit>
    <can_delete>1</can_delete>
    <can_change_visibility>1</can_change_visibility>
    <can_move>0</can_move>
    <can_copy>0</can_copy>
  </permissions>
</comment>

4. /projects/:project_id/comments/:comment_id/edit

Updates an existing comment.

Method: POST

Request example:

submitted = submitted
comment[body] = Updating my comment!

Response:

<comment>
  <id>23</id>
  <type>
    <![CDATA[Comment]]>
  </type>
  <name>
    <![CDATA[Comment on One ticket]]>
  </name>
  <body>
    <![CDATA[Updating my comment!]]>
  </body>
  <state>...</state>
  <visibility>...</visibility>
  <created_on>...</created_on>
  <created_by_id>...</created_by_id>
  <updated_on>...</updated_on>
  <updated_by_id>...</updated_by_id>
  <version>...</version>
  <permalink>...</permalink>
  <project_id>...</project_id>
  <parent_id>...</parent_id>
  <milestone_id>...</milestone_id>
  <permissions>
    <can_edit>1</can_edit>
    <can_delete>1</can_delete>
    <can_change_visibility>1</can_change_visibility>
    <can_move>0</can_move>
    <can_copy>0</can_copy>
  </permissions>
</comment>