JDBC Driver for Box

Build 22.0.8462


Create, update, delete, and query the available Comments in Box.

Table Specific Information

Comments are additional information passed on to a File. These Comments can also have child Comments.


To query the Comments table specify an Id or a FileId.

SELECT * FROM Comments WHERE Id = '123'


To insert into Comments you need to specify the item to insert the Comment into and the Message. You need to either specify a Message or a TaggedMessage but not both.

INSERT INTO Comments(ItemId, ItemType, Message) VALUES('1', 'file', 'example comment')


Only the message of the Comment can be updated.

UPDATE Comments SET Message = 'editor' WHERE Id = '100'


Comments can be deleted by providing an Id and issuing a DELETE statement.

DELETE FROM Comments WHERE Id = '100'


Name Type ReadOnly Description
Id [KEY] String True

The Id of the comment.

Message String False

The plain message of the comment. Use only this or tagged_message not both.

TaggedMessage String False

The tagged message of the comment. Setting this as @[USER_ID:USERNAME] tags the user and notifies him. A tagged message that does not contain a proper tag will give an error.

ItemId String False

The Id of the item the comment is targeted to.

ItemType String False

The type of the item the comment is targeted to. This can be a file or another comment.

The allowed values are file, comment.

CreatedById String True

The id of the user that created the item.

CreatedByName String True

The name of the user that created the item.

CreatedByLogin String True

The login user that created the item.

CreatedAt Datetime True

The date the item was created.


Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
FileID String

The File ID the comment is connected to, is not used to insert to this table.

AsUserId String

The Id of the user you want to impersonate. Only works with Admin, Co-Admin and Service Accounts.

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462