Get Comments
Retrieves multiple comments from a record in an app.
Method | GET |
---|---|
URL | https://{subdomain}.kintone.com/k/v1/record/comments.json |
URL(guest space) | https://{subdomain}.kintone.com/k/guest/{SpaceID}/v1/record/comments.json |
Authentication | Password Authentication , API Token Authentication , Session Authentication |
Content-Type | application/json (not needed if specifying the query with a query string) |
Contents
Permissions
The user or API Token must have permission to view the record to retrieve comments.
Request Parameters
PARAMETER | VALUE | REQUIRED | DESCRIPTION |
---|---|---|---|
app | Integer or String | Yes | The App ID. |
record | Integer or String | Yes | The Record ID. |
order | String | Optional | The sort order of the Comment ID. Specifying "asc" will sort the comments in ascending order, and "desc" will sort the comments in descending order. If ignored, "desc" will be set. |
offset | Integer | Optional | This skips the retrieval of the first number of comments. "offset": 30 skips the first 30 comments, and retrieves from the 31st comment. There is no maximum for this value. |
limit | Integer | Optional | The number of records to retrieve. "limit": 5 will retrieve the first 5 comments. The default and maximum is 10 comments. |
Sample Request (Query String)
|
|
curl Sample
|
|
Sample Request (JSON)
|
|
curl Sample
|
|
Response Parameters
PARAMETER | VALUE | DESCRIPTION |
---|---|---|
comments | Array of Objects | An array of comments. An empty array is returned if no conditions are met. |
comments[].id | Integer | The Comment ID. |
comments[].text | String | The comment including the line feed codes. If a user is mentioned within a comment, the "@" symbol will be omitted from the String. |
comments[].createdAt | String | The created date and time of the comment. |
comments[].creator | Object | An object including information of the comment creator. |
comments[].creator.code | String | The comment creator's user code (log in name). |
comments[].creator.name | String | The comment creator's user name (display name). |
comments[].mentions | Array | An array including information of mentioned users. |
comments[].mentions[].code | String | The code of the mentioned user, group or organization. |
comments[].mentions[].type | String | The type of the mention.
|
older | Boolean | Information of older comments:
|
newer | Boolean | Information of newer comments:
|
Sample Response
|
|
Limitations
- The maximum number of records that can be retrieved with the Get Comments API is 10.
- An error will return if the commenting feature of the App is turned off.
- For other limitations, refer to the Limitations section in the following article:
Kintone REST API Overview