Get Approval Stage Comments
Retrieve a paginated list of comments posted on a specific approval stage, ordered from oldest to newest.
URL: GET /api/v1/approval/{id}/stage/{stage_number}/comment
URL Example: http://172.16.15.185/api/v1/approval/118/stage/1/comment
Path Variables
| Variable | Type | Description |
|---|---|---|
{id} | long | Approval ID. |
{stage_number} | int | Stage number. |
Comment Ordering
Comments are returned in ascending order by createdAt (oldest first).
Request Headers
| Key | Description |
|---|---|
Authorization | Bearer {access token obtained after authorization} |
Content-Type | application/json |
Example Request
curl --location 'http://172.16.15.185/api/v1/approval/118/stage/1/comment' \
--header 'Authorization: Apikey wGjCygm6LvI7J1LT%40HHW%2Bs0ighXw7TeP5biyBL1uvBkzRnKMidKLUsz%2FIHEIn9w%3D%3D'
Example Response (200 OK)
{
"objectList": [
{
"id": 858,
"comment": "Approved Note : approve",
"commentBy": "Rosy",
"createdAt": 1786692992565
},
{
"id": 861,
"comment": "The ticket is valid and will taken on priority.",
"commentBy": "Rosy",
"createdAt": 1786699193432
}
],
"totalCount": 2
}
Response Fields
| Field | Type | Description |
|---|---|---|
objectList | array | Paginated list of comment objects. |
totalCount | int | Total number of comments on the stage. |
id | long | Unique comment ID. |
comment | string | Comment text. |
commentBy | string | Display name of the user who posted the comment. |
createdAt | long or string | When the comment was posted. Epoch milliseconds by default; formatted string when ?pretty=true is set. |
Error Responses
| Scenario | HTTP Status | When It Occurs |
|---|---|---|
Invalid {id} (less than or equal to 0) | 400 Bad Request | A negative or zero approval ID was provided. |
| Stage not found | 400 Bad Request | No stage with the given stage_number exists on the approval. |
| Unauthorized | 401 Unauthorized | Session expired or no valid credentials were provided. |