Help

Comments API

Card comments

Mingle allows users to comment on a card. This enables team members to collaborate regarding specific topics on each card. You can get all comments that are posted for each card using the Comments API.

Structure of a Comments resource

The structure of the Comments resource, and its attributes are described below, along with their data type. Also included with each attribute is whether you are allowed to update the value.

Comments resource xml - attributes
  • content: String.
  • created_by: Resource; read only, details of the user who has created a comment.
  • created_at: Datetime; read only, date and time of the comment creation.

Post a comment

Reference

      Request Method: POST
    
      URL: /api/v2/projects/project_identifier/cards/card_number/comments.xml
      
      Parameters:     
      comment[content]: String.
    

Example

      POST

      http://yourname:password@your.mingle.server:8080/api/v2/projects/test_project/cards/1/comments.xml
    
      comment[content]=hello there
    

Explanation

The above is an example of a POST to create a new comment on a card with the card number of 1 in the project with the identifier "test_project". The request is made with the authorization credentials of yourname/password.

Result

If you were authorized to perform the operation, and the resource was available, you should get an xml document that looks something like the following.

    <card_comments type="array">
      <comment>
        <content>hello there</content>
        <created_by url="http://localhost:8080/api/v2/users/1.xml">
          <id type="integer">1</id>
          <name>gilbert</name>
          <login>gilbert</login>
          <email>gilbert@youremail.com</email>
          <light type="boolean">false</light>
          <icon_path>/user/icon/1/gilbert.jpg</icon_path>
          <activated type="boolean">true</activated>
          <admin type="boolean">true</admin>
          <version_control_user_name>gilbert</version_control_user_name>
          <jabber_user_name>gilbert</jabber_user_name>
        </created_by>
        <created_at type="datetime">2009-10-26T07:26:33Z</created_at>
      </comment>
    </card_comments>
        

View a list of comments for each card

Reference

      Request Method: GET

      URL: /api/v2/projects/project_identifier/cards/card_number/comments.xml

      Parameters: N/A
    

Example

      GET

      http://yourname:password@your.mingle.server:8080/api/v2/projects/test_project/cards/1/comments.xml
    

Explanation

The above is an example of a GET to list all comments on a card with the card number of 1 in the project with identifier "test_project". The request is made with the authorization credentials of yourname/password.

Result

If you were authorized to perform the operation, and the resource was available, you should get an xml document that looks something like the following.

  <card_comments type="array">
    <comment>
      <content>hello there</content>
      <created_by url="http://localhost:8080/api/v2/users/2.xml">
        <id type="integer">1</id>
        <name>gilbert</name>
        <login>gilbert</login>
        <email>gilbert@youremail.com</email>
        <light type="boolean">false</light>
        <icon_path>/user/icon/1/gilbert.jpg</icon_path>
        <activated type="boolean">true</activated>
        <admin type="boolean">true</admin>
        <version_control_user_name>gilbert</version_control_user_name>
        <jabber_user_name>gilbert</jabber_user_name>
      </created_by>
      <created_at type="datetime">2009-10-26T07:26:33Z</created_at>
    </comment>
     ...
    <comment>
      <content>hello</content>
      <created_by url="http://localhost:8080/api/v2/users/3.xml">
        <id type="integer">1</id>
        <name>brad</name>
        <login>brad</login>
        <email>brad@youremail.com</email>
        <light type="boolean">false</light>
        <icon_path>/user/icon/1/brad.jpg</icon_path>
        <activated type="boolean">true</activated>
        <admin type="boolean">true</admin>
        <version_control_user_name>brad</version_control_user_name>
        <jabber_user_name>brad</jabber_user_name>
      </created_by>
      <created_at type="datetime">2009-10-26T07:26:33Z</created_at>
    </comment>
  </card_comments>