Get comment

get
https://api.box.com/2.0
/comments/:comment_id

Retrieves the message and metadata for a specific comment, as well as information on the user who created the comment.

Request

application/json

Path Parameters

stringin pathrequired
12345

The ID of the comment.

Query Parameters

string arrayin queryoptional
id,type,name

A comma-separated list of attributes to include in the response. This can be used to request fields that are not normally returned in a standard response.

Be aware that specifying this parameter will have the effect that none of the standard fields are returned in the response unless explicitly specified, instead only fields for the mini representation are returned, additional to the fields requested.

Response

application/jsonComment

Returns a full comment object.

application/jsonClient error

An unexpected client error.

get
Get comment
You can now try out some of our APIs live, right here in the documentation.
Log in

Request Example

cURL
curl -X GET https://api.box.com/2.0/comments/12345 \
     -H 'Authorization: Bearer <ACCESS_TOKEN>'
.NET
BoxComment comment = await client.CommentsManager.GetInformationAsync(id: "11111");
Java
BoxComment comment = new BoxComment(api, "id");
BoxComment.Info info = comment.getInfo();
Node
client.comments.get('11111')
    .then(comment => {
        /* comment -> {
            type: 'comment',
            id: '11111',
            is_reply_comment: false,
            message: 'Great work!',
            created_by: 
            { type: 'user',
                id: '22222',
                name: 'Example User',
                login: 'user@example.com' },
            created_at: '2012-12-12T11:25:01-08:00',
            item: { id: '33333', type: 'file' },
            modified_at: '2012-12-12T11:25:01-08:00' }
        */
    });
iOS
client.comments.get(commentId: "55555") { (result: Result<Comment, BoxSDKError>) in
    guard case let .success(comment) = result else {
        print("Error retrieving comment")
        return
    }

    print("Comment reads: \"\(comment.message)\"")
}