Excel Add-In for Box

Build 25.0.9434

Comments

Contains user comments made on Box files and folders, supporting creation, retrieval, updates, and deletion.

Table Specific Information

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

Select

When selecting from the Collaborations table, you must specify the Id or FileId in the WHERE clause.

SELECT * FROM Comments WHERE Id = '1925314736840';

If you're authenticated as an administrator with user impersonation permissions, you can query comments from multiple user accounts.

SELECT * FROM Comments WHERE AsUserId IN (SELECT Id FROM Users);

Note: User impersonation has the following limitations:

  • The authenticated user cannot be impersonated unless that user is a service account.
  • If the authenticated user is a standard user account, they can only query comments associated with their account.
  • Comments shared with multiple users are only returned for one of the users.

Insert

To insert into Comments, specify the item to insert the Comment into, as well as the Message. Either a Message or a TaggedMessage must be specified, but not both.

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

Update

You can only update the message of the Comment.

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

Delete

Delete a comment by specifying its Id:

DELETE FROM Comments WHERE Id = '100';

Columns

Name Type ReadOnly Description
Id [KEY] String True

Unique identifier assigned to the comment.

Message String False

The plain text content of the comment. Either this or TaggedMessage must be used, but not both.

TaggedMessage String False

The formatted message of the comment that supports tagging users with @[USER_ID:USERNAME], which notifies the tagged user. An invalid tag format results in an error.

ItemId String False

Identifier of the item that the comment is attached to, such as a file or another comment.

ItemType String False

Specifies the type of item the comment is associated with, which can be a file or another comment.

The allowed values are file, comment.

CreatedById String True

Identifier of the user who authored the comment.

CreatedByName String True

The full name of the user who authored the comment.

CreatedByLogin String True

The login email of the user who authored the comment.

CreatedAt Datetime True

The date and time when the comment was created.

AsUserId String False

Identifier of the user to impersonate for API calls, available only for Admin, Co-Admin, and Service Accounts.

Pseudo-Columns

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

Identifier of the file the comment is linked to. This field is only for querying and cannot be used when inserting comments.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9434