Get Comments on Interdiff Line¶
Path: | api/json/reviewrequests/{review_request_id}/diff/{diff_revision}-{interdiff_revision}/file/{filediff_id}-{interfilediff_id}/line/{linenum}/comments/ |
---|
URL Parameters¶
Parameter | Type | Description |
---|---|---|
review_request_id | Integer | The ID of the review request. |
diff_revision | Integer | The first revision of the interdiff. |
interdiff_revision | Integer | The second revision of the interdiff. |
filediff_id | Integer | The ID of the first FileDiff in the interdiff containing the comments. |
interfilediff_id | Integer | The ID of the second FileDiff in the interdiff containing the comments. |
linenum | Integer | The line number containing the comments. |
HTTP GET¶
Returns the list of comments on a particular line of an interdiff.
The comments may span one or more lines, and may belong to different reviews.
These may include draft comments made by the requesting user.
Example Request¶
GET /api/json/reviewrequests/12321/diff/1-2/file/9456-9485/line/42/comments/
Responses¶
HTTP 200: Success¶
Field | Type | Description |
---|---|---|
comments | Array of Comment | The list of comments. |
Example Response¶
{
stat: "ok",
comments: [
{
id: 25,
filediff: {
id: 9456,
diffset: {
id: 54,
name: "bugfix-1.diff",
revision: 1,
timestamp: "2010-01-12 09:56:19",
repository: {
path: "git://github.com/reviewboard/reviewboard.git",
tool: "Git",
id: 1,
name: "Review Board"
}
},
source_file: "README",
dest_file: "README",
source_revision: "123",
dest_revision: "456",
},
interfilediff: {
id: 9485,
diffset: {
id: 60,
name: "bugfix-2.diff",
revision: 2,
timestamp: "2010-01-13 12:05:16",
repository: {
path: "git://github.com/reviewboard/reviewboard.git",
tool: "Git",
id: 1,
name: "Review Board"
}
},
source_file: "README",
dest_file: "README",
source_revision: "123",
dest_revision: "456",
},
text: "This is a sample comment",
timestamp: "2010-01-14 12:05:43",
timesince: "6 days ago",
first_line: 42,
num_lines: 2,
public: 1,
user: {
username: "joe",
first_name: "Joe",
last_name: "User",
url: "/users/joe/",
email: "joe@example.com",
fullname: "Joe User",
id: 1
}
}
]
}
HTTP 401: Unauthorized¶
Error 103: Not Logged In¶
The client making the request is not logged in and the server disallows anonymous access.
See Authenticating for more information.
HTTP 404: Not Found¶
There are two possibilities for this error:
- The review request with the given review_request_id does not exist on the server.
- The filediff_id is invalid or isn’t owned by the review request.