/api/reports/:id/comments
Returns all comments for the report with the specified ID.
Resource Information
Resource URL | |
HTTP Method |
|
Request Parameters
Parameters | Detail | Example |
---|---|---|
| ID of the report whose comments to fetch. You can find the ID in the response to | 123 |
| (Optional) Specifies the page offset if pagination is necessary. | 2 |
| (Optional) Specifies the number of entries on each page if pagination is necessary.
| 15 |
Response Structure
{ "comments" : [ ], "offset" : 2, "size" : 15 }
JSON response contains 2 pagination elements (offset and size) but the main element is array "comments" that contains multiple report comment objects with following definition:
Name | Description |
---|---|
id | Comment identifier |
authorId | Author identifier |
author | Author full name |
private | Boolean value defining if the comment is public or private |
text | Comment text |
when | Date and time of comment creation |
Sample Request / Response
Using curl
:
curl -H "Authorization: OAuth realm=\"https://service.belladati.com/\", oauth_consumer_key=\"myConsumer\", oauth_token=\"mh7an9dkrg59\", oauth_timestamp=\"135131231\", oauth_nonce=\"randomString\"" https://service.belladati.com/api/reports/123/comments
The JSON format response:
{ "comments" : [ { "id" : "12345", "authorId" : "1", "author" : "John Smith", "private" : true, "text" : "This is a comment.", "when" : "Fri, 16 Aug 2013 12:56:50 GMT" } ], "offset" : 2, "size" : 15 }
Overview
Content Tools