Comment - Overview
A Comment is a message within a threaded discussion attached to a resource (currenly we only support attaching to Activity).
The text of a Comment is immutable on Incentify (uneditable) but a Comment can be deleted.
Methods
The API supports the following methods for Comment resources:
- POST - Create
- Insert a Comment
- GET - List
- Get an ordered list of comments attached to a given resource (
attached_to_typeand eitherattached_to_idorattached_to_internal_id).
- Get an ordered list of comments attached to a given resource (
- DELETE - Delete
- Delete a single Comment by
internal_comment_id(you can only delete comments which originated from your internal system).
- Delete a single Comment by
Resource Representation
This returns all Comments order by created at time from most recent to least for a given attachment.
The following JSON structure shows the format of an Comment resource:
{
"id": integer,
"internal_comment_id": string,
"internal_account_id": string,
"attached_to_type": ENUM("project","account","credit", "activity"),
"attached_to_id": integer,
"attached_to_internal_id": string,
"text": string,
"created_by": {
"internal_user_id": string,
"email": string,
"full_name": string
},
"created_at": string (R9FC 3339 Format - 2022-05-03T17:13:44Z),
"consumed_at": string (RFC 3339 Format - 2022-05-03T17:13:44Z)
}
Resource Properties
The following table defines the properties that appear in this resource:
| Key | Type | Definition |
|---|---|---|
| id | integer | The ID of the Comment. |
| internal_comment_id | string | The ID of the Comment on your internal system. |
| internal_account_id | string | The ID of the Account on your internal system. |
| attached_to_type | ENUM("project","account","credit", "activity") | The resource type this comment is attached to. |
| attached_to_id | integer | The Incentify ID of the resource which this comment is attached to. |
| attached_to_internal_id | string | The ID of the resource this comment is attached to on your internal system. |
| text | string | The text format is markdown. |
| created_by.internal_user_id | string | The ID of the user on your internal system. |
| created_by.email | string | The email of the user on your internal system. |
| created_by.full_name | string | The full name of the user on your internal system, or within Incentify. |
| created_at | string | The date and time that the Comment was created. The value is specified in RFC 3339 Format (2022-05-03T17:13:44Z). |
| consumed_at | string | The date and time that the Comment was consumed into your internal system at. The value is specified in RFC 3339 Format (2022-05-03T17:13:44Z). |