Folders contain information about the items contained inside of them, including files and other folders. There is also a set of metadata such as who owns the folder and when it was modified that is also returned. When accessing other resources that make reference to folders, a ‘mini folder’ object will be used.
{folderid}
/items{folderId}
{folderId}
{folderId}
{folderId}
/copy{folderid}
/items!Retrieves the files and/or folders contained within this folder without any other metadata about the folder.
Any attribute in the full files
or folders objects can be passed in with
the fields
parameter to get specific attributes, and only those specific attributes back; otherwise, the mini format is returned for each item by default. Multiple attributes can be passed in separated by commas e.g. fields=name,created_at
. Paginated results can be retrieved using thelimit
and offset
parameters.
Path variables
Folder identifier
Request parameters
Attribute(s) to include in the response
The number of items to return (default=100, max=1000)
The item at which to begin the response (default=0)
Responses
Body
An collection of items contained in the folder is returned. An error is thrown if the folder does not exist, or if any of the parameters are invalid.
Sorting object
{folderId}
Retrieves the full metadata about a folder, including information about when it was last updated as well as the files and folders contained in it. The root folder of a Box account is always represented by the id “0″.
Path variables
Responses
Body
Used to create a new empty folder. The new folder will be created inside of the specified parent folder
Request body
The desired name for the folder
The parent folder
The ID of the parent folder
Responses
Body
{folderId}
Used to update information about the folder. To move a folder, update the ID of its parent. To enable an email address that can be used to upload files to this folder, update thefolder_upload_email
attribute. An optional If-Match header can be included to ensure that client only updates the folder if it knows about the latest version.
Path variables
Request body
Used to update information about the folder. To move a folder, update the ID of its parent. To enable an email address that can be used to upload files to this folder, update thefolder_upload_email
attribute. An optional If-Match header can be included to ensure that client only updates the folder if it knows about the latest version.
The name of the folder
The description of the folder.
The parent folder of this file.
Parent object id
An object representing this item’s shared link and associated permissions.
The level of access required for this shared link. Can be open
,company
, collaborators.
The day that this link should be disabled at. Timestamps are rounded off to the given day.
The set of permissions that apply to this link.
The email-to-upload address for this folder.
Can be open
or collaborators.
The user who owns the folder. Only used when moving a collaborated folder that you are not the owner of to a folder you are the owner of. Not a substitute for changing folder owners, please reference collaborations to accomplish folder ownership changes.
The ID of the user, should be your own user ID.
Whether Box Sync clients will sync this folder. Values ofsynced
or not_synced
can be sent, whilepartially_synced
may also be returned.
All tags attached to this folder. To add/remove a tag to/from a folder, you can first get the folder’s current tags (be sure to specify?fields=tags
, since the tags
field is not returned by default); then modify the list as required; and finally, set the folder’s entire list of tags.
Responses
Body
{folderId}
Used to delete a folder.
Path variables
Request parameters
Whether to delete this folder if it has items inside of it.
A recursive
parameter must be included in order to delete folders that have items inside of them. An optional If-Match header can be included to ensure that client only deletes the folder if it knows about the latest version.
Responses
{folderId}
/copyUsed to create a copy of a folder in another folder. The original version of the folder will not be altered.
Path variables
Request body
Object representing the new location of the folder
The ID of the destination folder
An optional new name for the folder
Responses
Body
File objects represent that metadata about individual files in Box, with attributes describing who created the file, when it was last modified, and other information. The actual content of the file itself is accessible through the /files/{id}/content endpoint. Attributes listed in green will not appear in default file requests and must be explicitly asked for using the fields parameter.
{fileId}
{fileId}
{fileId}
Used to retrieve the metadata about a file.
Path variables
Request parameters
wdgwre
wer
Responses
Body
{fileId}
Used to update individual or multiple fields in the file object, including renaming the file, changing it’s description, and creating a shared link for the file. To move a file, change the ID of its parent folder. An optional If-Match header can be included to ensure that client only updates the file if it knows about the latest version.
Path variables
Request body
Used to update individual or multiple fields in the file object, including renaming the file, changing it’s description, and creating a shared link for the file. To move a file, change the ID of its parent folder. An optional If-Match header can be included to ensure that client only updates the file if it knows about the latest version.
The name of the file
The new description for the file.
The parent folder of this file.
Parent folder id
An object representing this item’s shared link and associated permissions.
The level of access required for this shared link. Can be open
,company
, collaborators.
The day that this link should be disabled at. Timestamps are rounded off to the given day.
The set of permissions that apply to this link.
All tags attached to this file. To add/remove a tag to/from a file, you can first get the file’s current tags (be sure to specify ?fields=tags
, since the tags
field is not returned by default); then modify the list as required; and finally, set the file’s entire list of tags.
Responses
Body
Comments are messages generated by Box users. Each message is tied to a specific file. You can create comments independently or create them as responses to other comments.
{commentId}
{commentId}
Used to update the message of the comment.
Path variables
cometd
Request parameters
3r 2 e
Request body
Used to update the message of the comment
The desired text for the comment message
Responses
Body
Used to add a comment by the user to a specific file or comment (i.e. as a reply comment).
Request body
Used to add a comment by the user to a specific file or comment (i.e. as a reply comment).
The item that this comment will be placed on.
The type of the item that this comment will be placed on. Can be file
or comment
The id of the item that this comment will be placed on.
The text body of the comment
Responses
Body
Folders contain information about the items contained inside of them, including files and other folders. There is also a set of metadata such as who owns the folder and when it was modified that is also returned. When accessing other resources that make reference to folders, a ‘mini folder’ object will be used.
For folders is ‘folder’
The folder’s ID.
A unique ID for use with the /events endpoint.
May be null for some folders such as root or trash.
A unique string identifying the version of this folder.May be null for some folders such as root or trash.
The name of the folder.
The time the folder was created.
May be null for some folders such as root or trash.
The time the folder or its contents were last modified.
May be null for some folders such as root or trash.
The description of the folder.
The folder size in bytes. Be careful parsing this integer, it can easily go into EE notation: see IEEE754 format.
The path of folders to this item, starting at the root.
The user who created this folder.
The user who last modified this folder.
The user who owns this folder.
The shared link for this folder. Null if not set.
The upload email address for this folder. Null if not set.
The folder that contains this one.
May be null for folders such as root, trash and child folders whose parent is inaccessible.
Whether this item is deleted or not.
A collection of mini file and folder objects contained in this folder.
All tags applied to this folder.
approved
Whether this folder will be synced by the Box sync clients or not. Can besynced
, not_synced
, or partially_synced.
Whether this folder has any collaborators.
The permissions that the current user has on this folder.
File objects represent that metadata about individual files in Box, with attributes describing who created the file, when it was last modified, and other information. The actual content of the file itself is accessible through the /files/{id}/content
endpoint
For files is ‘file’
The folder’s ID.
A unique ID for use with the /events endpoint.
May be null for some folders such as root or trash.
A unique string identifying the version of this folder.May be null for some folders such as root or trash.
The name of this file.
When this file was created on Box’s servers.
When this file was last updated on the Box servers.
The description of the file.
The path of folders to this item, starting at the root.
The user who created this folder.
The user who last modified this folder.
The user who owns this folder.
The shared link for this folder. Null if not set.
The folder that contains this one.
May be null for folders such as root, trash and child folders whose parent is inaccessible.
Whether this item is deleted or not.
All tags applied to this folder.
approved
The permissions that the current user has on this folder.
The sha1 hash of this file.
When this file was last moved to the trash.
When this file will be permanently deleted.
When the content of this file was created (more info).
When the content of this file was last modified (more info).
The version of the file.
The number of comments on a file.
Shared link
Comments are messages generated by Box users. Each message is tied to a specific file. You can create comments independently or create them as responses to other comments.
For comments is ‘comment’
A unique string identifying this comment
Whether or not this comment is a reply to another comment
The comment text that the user typed
A mini user object representing the author of the comment
The object this comment was placed on
The string representing the comment text with @mentions included. @mention format is @[id:username]. Field is not included by default.