/comments
These methods allow you to create, edit, delete and get info on comments.
Create a comment
POST
https://pm415.com/api/comments/new/:ownertable/:orgid/:owmerid
Creates the new comment.
Path Parameters
:ownertable
string
"Bugs" or "Initiatives" or "Items"
:ownerid
number
The ID of the bug or initiative or item
:orgid
number
The ID of the org
Headers
Authentication
string
Authorization: Bearer 50ca9ba0f7b1444fa55d5
{
"success": true,
"comment": {
"comment": "comment2-2",
"organization_id": 17,
"created_by": 13,
"ownerId": 49,
"ownerTable": "items",
"mailers": "",
"updated_at": "2019-04-26T08:34:57.752Z",
"created_at": "2019-04-26T08:34:57.752Z",
"id": 54
}
}
Get list of comments
GET
https://pm415.com/api/comments/get/:ownertable/:orgid/:ownerid
Gets the list of comments.
Path Parameters
:ownerid
number
The ID of the bug or initiative or item
:orgid
number
The ID of the org
:ownertable
string
"Bugs" or "Initiatives" or "Items"
Headers
Authentication
string
Authorization: Bearer 50ca9ba0f7b1444fa55d5
{
"success": true,
"comments": [
{
"id": 48,
"ownerId": 49,
"ownerTable": "items",
"mailers": "",
"comment": "comment1",
"createdAt": "2019-04-26T07:13:39.000Z",
"createdBy": 13,
"updatedAt": "2019-04-26T08:31:59.000Z",
"organizationId": 17
},
{
"id": 51,
"ownerId": 49,
"ownerTable": "items",
"mailers": "",
"comment": "comment2-1",
"createdAt": "2019-04-26T07:48:19.000Z",
"createdBy": 13,
"updatedAt": "2019-04-26T08:32:27.000Z",
"organizationId": 17
}
]
}
Update current comment
PUT
https://pm415.com/api/comments/edit/:commentid
Updates the current comment.
Path Parameters
:commentid
number
The ID of the comment you want to update
Headers
Authentication
string
Authorization: Bearer 50ca9ba0f7b1444fa55d5
{
"success": true,
"comment": {
"id": 52,
"ownerId": 49,
"ownerTable": "items",
"mailers": "",
"comment": "commentUpdated",
"createdAt": "2019-04-26T08:33:39.000Z",
"createdBy": 13,
"updatedAt": "2019-04-26T08:33:39.000Z",
"organizationId": 17,
"updated_at": "2019-04-26T08:37:59.009Z"
}
}
Delete a comment
DELETE
https://pm415.com/api/comments/delete/:orgid/:commentid
Delets the chosen comment.
Path Parameters
:commentid
number
The ID of the comment you want to delete
:orgid
number
The ID of the org
Headers
Authentication
string
Authorization: Bearer 50ca9ba0f7b1444fa55d5
{
"success": true,
"comment": 49,
"message": "Comment deleted"
}
Last updated
Was this helpful?