Skip to main content

Comment - List

Purpose​

Retrieve a list of Comments based on attached_to_type and attached_to_internal_id which your API Credentials have access to.

Request​

Endpoint

GET /comment

Authentication

Include your API Key within the x-api-key header as described here.

Parameters

The following table lists the parameters that this query supports. All of the parameters listed are query parameters.

ParameterTypeDefinition
attached_to_typestringThe resource type ENUM("project","account","credit", "activity")
attached_to_internal_idstringThe unique ID of the resource on your internal system
internal_idsstringcomma seperated list of your internal string ids (optional)
idsstringcomma seperated list of Incentify integer ids (optional)
orderstringCan be "asc" (oldest first) or "desc" (most recent first) - default is "desc".
pageintThe page number of the results you want (set to 1, if not provided)

Request Body

Do not provide a request body when calling this method.

Response​

If successful, this method returns a response body with the following structure:

Response Body

{
"code":200,
"success":true,
"data": [
Comment Resources listed here... (See "Comment Overview" page)
],
"errors": [],
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "[path_to_endpoint]",
"per_page": 50,
"to": 10,
"total": 10
},
"links": {
"first": "[path_to_endpoint]?page=1",
"last": "[path_to_endpoint]?page=1",
"prev": null,
"next": null
}
}

Properties

The following table defines the properties that appear in this resource:

KeyTypeDefinition
codeintegerHTTP Status Code (ie; 200, 403, etc).
successbooleanEither true (success) or false (fail).
datalistList of Comments returned. The data structure of each Comment is a Comment Resource.
errorsobjectIf the request fails, this will contain information about the error.
metaobjectContains information about pagination and total record count.
linksobjectContains pre-built links for forward/backward pagination.