JDBC Driver for Box

Build 22.0.8462

Folders

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

Table Specific Information

Select

If you search for folders without specifying any condition in the WHERE Clause, by default only the folders that are at most 5 levels deep from the root folder will be returned. You can change the default depth value in the connection string; e.g. DirectoryRetrievalDepth=10.

SELECT * FROM Folders

To search all the Folders in your enterprise, query the Folders table with the column SearchTerms.

SELECT * FROM Folders WHERE SearchTerms LIKE '%untitled%'

To search all the Folders within a specific folder, query the Folders table with the ParentId column..

SELECT * FROM Folders WHERE ParentId = '12'

Insert

You're required to specify the name of the Folder and also the Id of the parent Folder. Use 0 for the root Folder's ParentId.

INSERT INTO Folders(Name, ParentId, SharedLink, Description, Access, OwnedById) VALUES ('new folder', '0', 'http://sharedlink.com', 'example desc', 'open', '123')

Update

Any column where ReadOnly=False can be updated.

UPDATE Folders SET Description = 'example description', Access = 'open', SharedLink='http://sharedlink.com', OwnedById='321', ParentId='12', Name = 'no longer new folder'  WHERE Id = '123'

Delete

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

DELETE FROM Folders WHERE Id = '123'

Columns

Name Type ReadOnly Description
SearchTerms String True

Query to search the folders database.

Id [KEY] String True

The Id of the folder.

Name String False

The name of the folder.

Etag String True

The Etag of the folder

SequenceId String False

The sequence Id of the folder.

Description String False

The description of the folder.

Access String False

The email access of this folder to.

The allowed values are open, collaborators, null.

Size Integer True

The size of the file.

CreatedAt Datetime True

The date the file was created at.

ModifiedAt Datetime True

The date the file was modified at.

TrashedAt Datetime True

The date the folder was trashed at.

PurgedAt Datetime True

The date the folder was purged at.

ContentCreatedAt Datetime True

The date the content of the folder was created at.

ContentModifiedAt Datetime True

The date the content of the folder was modified at.

CreatedBy String True

The Id of the user that created the folder.

CreatedByName String True

The Name of the user that created the folder.

CreatedByLogin String True

The Login of the user that created the folder.

SharedLink String False

The Id of the user that created the folder.

ModifiedBy String True

The Id of the user that last modified the folder.

ModifiedByName String True

The Name of the user that last modified the folder.

ModifiedByLogin String True

The Login of the user that last modified the folder.

OwnedById String False

The Id user that owns the folder.

OwnedByName String True

The Name of the user that owns the folder.

OwnedByLogin String True

The Login of the user that owns the folder.

ParentId String False

The Id of the folder that contains the folder.

ItemStatus String True

The status of the folder.

Path String True

The full path of the folder.

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
Scope String

The scope of the search.

ContentTypes String

The content to search the query at, separated by commas. This can contain a mixture of the following: name, file_content, description, comments, tags.

OwnerUserIDs String

The Ids of the owners to limit the search to, separated by a comma.

AncestorfolderIDs String

The Ids of the folders to limit the search to, separated by a comma.

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