The platform is available in over 80 languages

Task Comments Reference

The GitScrum API allows users to comment on tasks and add context to them, helping to make task tracking easier and more organized. With the API, users can create comments that link directly to the task they are referencing, making it easier to look back at the conversation linked to a specific task. The comments can be used to create a clearer picture of the task and provide additional information such as feedback and updates. Additionally, users can also collaborate with other users and share ideas in the comments section. By leveraging the GitScrum API, users can keep better track of their tasks and ensure that everyone involved has a clear understanding of what is required.

The GitScrum API provides endpoints for managing these task comments and other related resources.

ENDPOINTS
GET

/comments

POST

/comments

DELETE

/comments/:slug

The Task Comments Object

Attributes

id NUMBER

Unique identifier for the comment object.

resource OBJECT

The resource attribute is used to identify a task comment through its type and unique identifier. It is a JSON object consisting of two keys, type and uuid, which store the type of resource and its unique identifier.

comment STRING

The comment attribute is a field for users to provide their own comments and feedback about a particular task. This information can then be used to improve the task and its performance.

More Attributes

THE OBJECT RESPONSE
{
  "id": number,
  "resource": object,
  "comment": string,
  "keywords": array,
  "votes": number,
  "created_at": object,
  "updated_at": object,
  "is_mine": boolean,
  "replies": array,
  "user": object,
  "users": array,
  "company": object,
  "project": object
}

Create comment for task

The Create User Story endpoint on the GitScrum API allows users to create and add user stories to a project using a POST method.

Parameters

comment_text STRING REQUIRED

The comment_text parameter is an optional field that a user can use to input comments, notes, or instructions on a task. This can help to provide additional details about the task or to communicate with other users about the task.

commentable_type STRING REQUIRED

The commentable_type parameter should be set to issues when creating comments. This parameter will determine the type of object being commented on, allowing the application to identify which type of object is being referred to when displaying the comment.

commentable_id STRING REQUIRED

The commentable_id parameter should be the unique identifier associated with the task. This parameter will allow comments to be related to a specific task.

ENDPOINT

POST /comments

RESPONSE201 Created
{
  "id": 1,
  "resource": {
    "type": "task",
    "uuid": "39579ac6-c93c-4c13-8c8e-da0e7f5ebc8f"
  },
  "comment": "The new Mars project is well underway, and we're making great progress. However, we've encountered a minor setback – we're currently missing a crucial part for the rover. Our team is actively working to resolve this issue and ensure that the project stays on track. We appreciate your patience and support as we overcome this challenge. Together, we're one step closer to exploring the wonders of Mars!",
  "keywords": [],
  "votes": 0,
  "created_at": {
      "date_for_humans": "1 minute ago",
      "timezone": "2023-05-11 23:17:36",
      "timestamp": 1683847056
  },
  "updated_at": {
      "date_for_humans": "1 minute ago",
      "timezone": "2023-05-11 23:17:36",
      "timestamp": 1683847056
  },
  "is_mine": true,
  "replies": [],
  "user": {
      "name": "Renato Marinho de Carvalho",
      "headline": "GitScrum Founder",
      "username": "renato.marinho",
      "avatar": "https://gitscrum-storage-avatars.s3.amazonaws.com/5467e2bdd31886166112fea09debe9f72aae06dd.png",
      "location": "Lisbon",
      "timezone_id": 37,
      "timezone_name": "Etc/Greenwich",
      "since": "October 2019"
  },
  "users": [],
  "company": {
      "slug": "gitscrum",
      "name": "GitScrum"
  },
  "project": {
      "slug": "gitscrum-project-demo",
      "name": "GitScrum Project Demo"
  }
}

List All Task Comments

This is a GET request that returns a list of task comments sorted either in ascending (ASC) or descending (DESC) order, with the most recently created comment at the top. This request can be used to quickly view and organize comments that are associated with a particular task.

Parameters

page NUMBER OPTIONAL

The page parameter can be used in subsequent calls to access additional pages of results after the initial page. It allows for pagination, allowing the user to navigate through multiple pages of search results.

sort STRING OPTIONAL

The sort parameter is used to control the order of the comments, either in ascending or descending order.

ENDPOINT

GET /comments

RESPONSE200 OK
{
  "data": [
    { ... },
    { ... },
    { ... }
  ],
  "total": 20,
  "count": 20,
  "per_page": 15,
  "current_page": 1,
  "total_pages": 2
}

Delete a Task Comment

To delete a Task Comment, use the DELETE method.

Parameters

No parameters.

Returns

Returns a deleted object on success.

ENDPOINT

DELETE /comments/:id

RESPONSE200 OK
{ }