Procedures

Automation procedures in the Box BDK Book.

to create a (folder) in another folder

Creates a new empty folder within the specified parent folder.

Input Concepts

Concept
Description
Type
Required
Default Value

folder name

The name for the new folder.

text

Yes

A FolderReference for the parent folder.

folder reference or item base

Yes

fields

A list of attributes to include in the response.

text

No

Output Concepts

Concept
Description
Type

A FolderReference object for the newly created folder.

folder reference or item base

to delete an item and get an item reference

Deletes a file or folder by moving it to the trash. For folders, this is recursive.

Input Concepts

Concept
Description
Type
Required
Default Value

item

A FileReference or FolderReference object for the item to delete.

file reference or folder reference or item base or item base

Yes

Output Concepts

Concept
Description
Type

item reference

The reference of the item targeted for deletion.

file reference or folder reference or item base or item base

to download a file

Downloads the content of a file.

Input Concepts

Concept
Description
Type
Required
Default Value

A FileReference for the file to download.

file reference or item base

Yes

version

The specific version ID of the file to download (optional).

text

No

Output Concepts

Concept
Description
Type

answer

An IO[bytes] object containing the file content.

file

to list (items) in a folder

Retrieves a page of item references from the specified folder.

Input Concepts

Concept
Description
Type
Required
Default Value

A FolderReference object for the folder whose items are to be listed.

folder reference or item base

Yes

fields

A comma-separated list of attributes to include in the response for each item.

text

No

usemarker

Specifies whether to use marker-based pagination.

boolean

No

marker

Defines the position marker at which to begin returning results (for marker-based pagination).

text

No

Output Concepts

Concept
Description
Type

items

A list of item references (FileReference, FolderReference, WebLinkMini).

file reference or folder reference or item base or item base or item base or web link mini

to retrieve the (root folder reference)

Retrieves a reference to the root folder.

Input Concepts

Concept
Description
Type
Required
Default Value

fields

A list of attributes to include in the response for the root folder reference.

text

No

Output Concepts

Concept
Description
Type

A FolderReference object representing the root folder.

folder reference or item base

to upload a file and get a file reference

Uploads a file to Box. For files over 50MB, consider chunked upload APIs.

Input Concepts

Concept
Description
Type
Required
Default Value

file

The content of the file as a byte stream.

file

Yes

file name

The name the file should have in Box.

text

Yes

A FolderReference for the parent folder.

folder reference or item base

Yes

content created at

The RFC3339 timestamp of when the content was created.

text

No

content modified at

The RFC3339 timestamp of when the content was last modified.

text

No

Output Concepts

Concept
Description
Type

A FileReference object for the uploaded file.

file reference or item base

Last updated

Was this helpful?