Issue Comments
JSON Object Structure Describing an Issue Comment
| Field | Type | Description | 
|---|---|---|
| id | String | Unique ID of the issue comment | 
| message | String | Comment text | 
| author | Object | Information about the user who left the comment | 
| createdAt | LocalDateTime | Date and time the comment was created | 
| createTimeDifference | String | Time elapsed since the comment was posted | 
You can find the structure of the user JSON object here
Method to Get All Comments for an Issue
GET /project/{ownerAlias}/{projectAlias}/issue-discussion/{localId}
The request returns an array of comments for the issue. You can configure the number of objects displayed per page.
| Path Variable | Type | Description | 
|---|---|---|
| ownerAlias | String | Project owner's alias | 
| projectAlias | String | Project alias | 
| localId | Long | Issue ID | 
Responses
STATUS 200 Example JSON:
Example Response
    
{
    "_embedded": {
        "issueDiscussionList": [
            {
                "id": "3b8b4350-aaaa-aaaa-aaaa-f5c171c350ca",
                "message": "Comment text",
                "author": {
                    "id": "6736240a-aaaa-aaaa-aaaa-cab026562172",
                    "username": "user1",
                    "name": "name",
                    "surname": "surname",
                    "fullName": "name surname",
                    "avatar": "https://gitflic.ru/static/image/avatar.jpg",
                    "cover": "/upload/img/3b7780f1-aaaa-aaaa-aaaa-97e55d7bbdbb.jpg"
                },
                "createdAt": "2022-04-22T14:30:35.063583",
                "createTimeDifference": "2 days ago"
            },
            {
                "id": "323f79d9-aaaa-aaaa-aaaa-df772358ad9e",
                "message": "Reply to comment",
                "author": {
                    "id": "6736240a-aaaa-aaaa-aaaa-cab026562172",
                    "username": "user2",
                    "name": "name",
                    "surname": "surname",
                    "fullName": "name surname",
                    "avatar": "https://gitflic.ru/static/image/avatar.jpg",
                    "cover": "/upload/img/3b7780f1-aaaa-aaaa-aaaa-97e55d7bbdbb.jpg"
                },
                "createdAt": "2022-04-25T11:50:01.815651",
                "createTimeDifference": "2 minutes ago"
            }
        ]
    },
    "page": {
        "size": 10,
        "totalElements": 2,
        "totalPages": 1,
        "number": 0
    }
}
    
  
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Method to Create a New Comment for an Issue
POST /project/{ownerAlias}/{projectAlias}/issue-discussion/{localId}/create
The request creates a comment for the issue.
| Path Variable | Type | Description | 
|---|---|---|
| ownerAlias | String | Project owner's alias | 
| projectAlias | String | Project alias | 
| localId | Long | Issue ID | 
Request
Supported JSON format
POST request body structure:
| Parameter | Description | 
|---|---|
| note | Comment text | 
Example JSON Object
{
    "note": "Example comment"
}
Responses
STATUS 200 Example JSON:
Example Response
    
{
    "id": "03194139-aaaa-aaaa-aaaa-4dbd3179ba91",
    "message": "Example comment",
    "author": {
        "id": "6736240a-aaaa-aaaa-aaaa-cab026562172",
        "username": "user",
        "name": "name",
        "surname": "surname",
        "fullName": "name surname",
        "avatar": "https://gitflic.ru/static/image/avatar.jpg",
        "cover": "/upload/img/3b7780f1-aaaa-aaaa-aaaa-97e55d7bbdbb.jpg"
    },
    "createdAt": "2022-04-25T13:17:26.4990249",
    "createTimeDifference": "2 minutes ago"
}
    
  
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Method to Delete a Comment for an Issue
DELETE /project/{ownerAlias}/{projectAlias}/issue-discussion/{localId}/{commentId}/delete
The request deletes a comment for the issue.
| Path Variable | Type | Description | 
|---|---|---|
| ownerAlias | String | Project owner's alias | 
| projectAlias | String | Project alias | 
| localId | Long | Issue ID | 
| commentId | Long | Comment ID | 
Responses
STATUS 200 - Comment deleted
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Method to Edit a Comment for an Issue
PUT /project/{ownerAlias}/{projectAlias}/issue-discussion/{localId}/{commentId}/edit
The request edits the text of a comment for the issue.
| Path Variable | Type | Description | 
|---|---|---|
| ownerAlias | String | Project owner's alias | 
| projectAlias | String | Project alias | 
| localId | Long | Issue ID | 
| commentId | Long | Comment ID | 
Request
Supported JSON format
POST request body structure:
| Parameter | Description | 
|---|---|
| note | Comment text | 
Example JSON Object
{
    "note": "Example comment"
}
Responses
STATUS 200 Example JSON:
Example Response
    
{
    "id": "03194139-aaaa-aaaa-aaaa-4dbd3179ba91",
    "message": "Example comment",
    "author": {
        "id": "6736240a-aaaa-aaaa-aaaa-cab026562172",
        "username": "user",
        "name": "name",
        "surname": "surname",
        "fullName": "name surname",
        "avatar": "https://gitflic.ru/static/image/avatar.jpg",
        "cover": "/upload/img/3b7780f1-aaaa-aaaa-aaaa-97e55d7bbdbb.jpg"
    },
    "createdAt": "2022-04-25T13:17:26.4990249",
    "createTimeDifference": "2 minutes ago"
}
    
  
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Automated translation!
This page was translated using automatic translation tools. The text may contain inaccuracies.