Loading

Help documentation

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.

Please note that all POST and PUT requests must be in XML format by default. This is not illustrated in the examples here. To specify parameters as shown in the examples you will have to set the request header for Content-Type to "application/x-www-form-urlencoded".

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.

    <?xml version="1.0" encoding="UTF-8"?>
    <card_comments type="array">
      <comment>
        <content>Hi</content>
        <created_by url="http://localhost:8080/api/v2/users/21.xml">
          <name>Jeff</name>
          <login>jeff</login>
        </created_by>
        <created_at type="datetime">2010-03-10T21:16:39Z</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.

  <?xml version="1.0" encoding="UTF-8"?>
  <card_comments type="array">
    <comment>
      <content>Hi</content>
      <created_by url="http://localhost:8080/api/v2/users/21.xml">
        <name>Jeff</name>
        <login>j</login>
      </created_by>
      <created_at type="datetime">2010-03-10T21:16:39Z</created_at>
    </comment>
    ...
    <comment>
      <content>hello there</content>
      <created_by url="http://localhost:8080/api/v2/users/1.xml">
        <name>bonna</name>
        <login>bonna</login>
      </created_by>
      <created_at type="datetime">2010-03-10T21:16:02Z</created_at>
    </comment>
  </card_comments>