Comments
Contents
Comment lifecycle
Comments can be created for Projects, Files, Contacts and Tasks. They cannot be edited or deleted. For more information see Comments document model.
List Comments
List all comments.
Endpoint:
URL |
|
Method |
|
Expected response code |
|
Expected response type |
|
Example:
curl -v \
-H "Authorization: apikey $API_USER:$API_KEY" \
$COREDATA_BASE_URL/api/v2/comments/
Example response:
Get Comment details
Get details for a comment.
Endpoint:
URL |
|
Method |
|
Expected response code |
|
Expected response type |
|
URL parameters:
comment_id– ID of an existing comment to get details for.
Example:
comment_id=10be9294-77ed-11ee-8d2c-ffa226e3fdbf
curl -v \
-H "Authorization: apikey $API_USER:$API_KEY" \
$COREDATA_BASE_URL/api/v2/comments/$comment_id/
Example response:
Create Comment
Create a Comment to an existing Document (Projects, Files, Contacts and Tasks).
Endpoint:
URL |
|
Method |
|
Content-Type |
|
Expected response code |
|
Expected response type |
|
Request JSON object has the following fields:
Field | Type | Description | Mandatory |
|---|---|---|---|
|
| ID (in UUID format) of a document to add comment for. The parameter can refer one of the following document types: | Yes |
|
| Text of the comment to add. | Yes |
Example:
project_id=ad2e105c-77c8-11ee-aeee-13451b1d7d84
text="Third comment"
curl -v \
-X POST \
-H "Authorization: apikey $API_USER:$API_KEY" \
-H "Content-Type: application/json" \
-d "{\"doc_id\": \"$project_id\", \"text\": \"$text\"}" \
$COREDATA_BASE_URL/api/v2/comments/
The response has Location header which contains URL of the newly added comment:
Location: /api/v2/comments/0eb1eca2-77fd-11ee-ace4-8ffda3b6069a/