APIs to Get, Create & Delete Comments
Get Comments
GET /v2/comments/[comment_id]
Optional Parameters
- comment_id - If omitted then a list of comments will be returned.
- project_id - Project ID
- task_id - Task ID
- subtask_id - Subtask ID
- limit - Limit number of records returned. Maximum 1000 records
- offset - Start position for fetching records
Sample Response - Single Comment
This is a comment attached to a project.
{
"data": {
"comment_id": "1",
"comment": "My first comment",
"parent_id": "0",
"project_id": "1",
"task_id": "0",
"subtask_id": "0",
"filepath": null,
"filename": null,
"note": "0",
"date_created": "2014-08-14 15:20:10",
"date_modified": "2014-08-14 14:20:10",
"user_id": "1234"
}
}
"data": {
"comment_id": "1",
"comment": "My first comment",
"parent_id": "0",
"project_id": "1",
"task_id": "0",
"subtask_id": "0",
"filepath": null,
"filename": null,
"note": "0",
"date_created": "2014-08-14 15:20:10",
"date_modified": "2014-08-14 14:20:10",
"user_id": "1234"
}
}
Sample Response - Multiple Comments
Shows all comments from a project, two in this case.
{
"paging": {
"offset": 0,
"limit": 1000,
"total_records": 2
},
"data": [
{
"comment_id": "1",
"comment": "My first comment",
"parent_id": "0",
"project_id": "1",
"task_id": "0",
"subtask_id": "0",
"filepath": null,
"filename": null,
"note": "0",
"date_created": "2015-01-26 14:40:50",
"date_modified": "2015-01-26 14:41:01",
"user_id": "1234"
},
{
"comment_id": "2",
"comment": "My 2nd comment",
"parent_id": "0",
"project_id": "1",
"task_id": "0",
"subtask_id": "0",
"filepath": null,
"filename": null,
"note": "0",
"date_created": "2015-01-26 14:51:21",
"date_modified": "2015-01-26 14:51:26",
"user_id": "1234"
}
]
}
"paging": {
"offset": 0,
"limit": 1000,
"total_records": 2
},
"data": [
{
"comment_id": "1",
"comment": "My first comment",
"parent_id": "0",
"project_id": "1",
"task_id": "0",
"subtask_id": "0",
"filepath": null,
"filename": null,
"note": "0",
"date_created": "2015-01-26 14:40:50",
"date_modified": "2015-01-26 14:41:01",
"user_id": "1234"
},
{
"comment_id": "2",
"comment": "My 2nd comment",
"parent_id": "0",
"project_id": "1",
"task_id": "0",
"subtask_id": "0",
"filepath": null,
"filename": null,
"note": "0",
"date_created": "2015-01-26 14:51:21",
"date_modified": "2015-01-26 14:51:26",
"user_id": "1234"
}
]
}
Sample Response - Multiple comments with replies
{
"paging": {
"offset": 0,
"limit": 1000,
"total_records": 2
},
"data": [
{
"comment_id": "1",
"comment": "Here is my first comment",
"parent_id": "0",
"project_id": "1",
"task_id": "0",
"subtask_id": "0",
"filepath": null,
"filename": null,
"note": "0",
"date_created": "2015-01-26 14:40:50",
"date_modified": "2015-01-26 14:41:01",
"user_id": "1234",
"replies": [
{
"comment_id": "3",
"comment": "Here is a reply to my first comment",
"parent_id": "1",
"project_id": "1",
"task_id": "0",
"subtask_id": "0",
"filepath": null,
"filename": null,
"note": "0",
"date_created": "2015-01-26 14:41:04",
"date_modified": "2015-01-26 14:41:14",
"user_id": "1234"
},
{
"comment_id": "4",
"comment": "Here is a 2nd reply to my first comment",
"parent_id": "1",
"project_id": "1",
"task_id": "0",
"subtask_id": "0",
"filepath": null,
"filename": null,
"note": "0",
"date_created": "2015-01-26 14:41:49",
"date_modified": "2015-01-26 14:42:00",
"user_id": "1234"
}
]
},
{
"comment_id": "2",
"comment": "My 2nd comment",
"parent_id": "0",
"project_id": "1",
"task_id": "0",
"subtask_id": "0",
"filepath": null,
"filename": null,
"note": "0",
"date_created": "2015-01-26 14:51:21",
"date_modified": "2015-01-26 14:51:26",
"user_id": "1234"
}
]
}
"paging": {
"offset": 0,
"limit": 1000,
"total_records": 2
},
"data": [
{
"comment_id": "1",
"comment": "Here is my first comment",
"parent_id": "0",
"project_id": "1",
"task_id": "0",
"subtask_id": "0",
"filepath": null,
"filename": null,
"note": "0",
"date_created": "2015-01-26 14:40:50",
"date_modified": "2015-01-26 14:41:01",
"user_id": "1234",
"replies": [
{
"comment_id": "3",
"comment": "Here is a reply to my first comment",
"parent_id": "1",
"project_id": "1",
"task_id": "0",
"subtask_id": "0",
"filepath": null,
"filename": null,
"note": "0",
"date_created": "2015-01-26 14:41:04",
"date_modified": "2015-01-26 14:41:14",
"user_id": "1234"
},
{
"comment_id": "4",
"comment": "Here is a 2nd reply to my first comment",
"parent_id": "1",
"project_id": "1",
"task_id": "0",
"subtask_id": "0",
"filepath": null,
"filename": null,
"note": "0",
"date_created": "2015-01-26 14:41:49",
"date_modified": "2015-01-26 14:42:00",
"user_id": "1234"
}
]
},
{
"comment_id": "2",
"comment": "My 2nd comment",
"parent_id": "0",
"project_id": "1",
"task_id": "0",
"subtask_id": "0",
"filepath": null,
"filename": null,
"note": "0",
"date_created": "2015-01-26 14:51:21",
"date_modified": "2015-01-26 14:51:26",
"user_id": "1234"
}
]
}
Example Calls
Single Comment
curl -X GET "https://api.projectbubble.com/v2/comments/1" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"
Simple list of all comments
curl -X GET "https://api.projectbubble.com/v2/comments" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"
Get comments by project
curl -X GET "https://api.projectbubble.com/v2/comments?project_id=1" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"
Response Codes
200 - OK or "No records found"
401 - Permission error. Your user account (API Key) does not have permission to access comments.
401 - Permission error. Your user account (API Key) does not have permission to access comments.
Create Comment
POST /v2/comments/[project_id]
Required Parameters
- project_id - Project ID
- comment - Comment text
Optional Parameters
- task_id - Task ID
- subtask_id - Subtask ID
- parent_id - Expects a comment_id. If passed then a reply will be created.
Sample Response - Single comment:
This is a comment attached to a project.
{
"data": {
"comment_id": "5",
"comment": "My first api comment",
"parent_id": "0",
"project_id": "1",
"task_id": "0",
"subtask_id": "0",
"filepath": null,
"filename": null,
"note": "0",
"date_created": "2014-08-14 15:20:10",
"date_modified": "2014-08-14 14:20:10",
"user_id": "1234"
}
}
"data": {
"comment_id": "5",
"comment": "My first api comment",
"parent_id": "0",
"project_id": "1",
"task_id": "0",
"subtask_id": "0",
"filepath": null,
"filename": null,
"note": "0",
"date_created": "2014-08-14 15:20:10",
"date_modified": "2014-08-14 14:20:10",
"user_id": "1234"
}
}
Example Calls
curl -X POST "https://api.projectbubble.com/v2/comments/1" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8" \
-d '{"comment": "My first api comment"}'
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8" \
-d '{"comment": "My first api comment"}'
Response Codes
201 - Created OK
401 - Permission error. Your user account (API Key) does not have permission to access comments.
404 - Comment not found
401 - Permission error. Your user account (API Key) does not have permission to access comments.
404 - Comment not found
Delete Comment
Will also delete any replies and attached files. Replies can also be deleted using this endpoint.
DELETE /v2/comments/[comment_id]
Sample Response
[]
Example Call
curl -X DELETE "https://api.projectbubble.com/v2/comments/1" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"
Response Codes
200 - Comment deleted
400/401 - Permission error. Validation error, see returned text.
404 - Comment not found.
400/401 - Permission error. Validation error, see returned text.
404 - Comment not found.
© 2005 - 2024 ProProfs