Help Desk

Submit a ticket My Tickets
Welcome
Login

Box Command Reference

Plugin for interacting with the Box 2.0 API

Connections

Box

Box API connection

Inputs

Input Type Detail Notes
Client ID TextField The service account app client ID
Client Secret TextField The service account app client secret
Client Key TextField The service account decrypted RSA key
Enterprise ID TextField The service account enterprise id

Commands

Copy File

Copy a file within Box

Inputs

Input Type Detail Notes
File ID TextField The ID of the file to copy.
File Name TextField The name of the file to copy. Optional when specifying a File ID. Performs a search for the file.
Parent Folder Name TextField The name of the parent folder that contains the file to copy. Optional when specifying a File ID. Performs a search for the folder.
Destination Folder ID TextField The ID of the destination folder to copy the file to (optional). Use "0" for the root folder.
Destination Folder Name TextField The name of the folder to copy. Optional when specifying a Destination Folder ID. Performs a search for the folder.
Name TextField Rename the file when copying (optional)

Outputs

Output Output Type Notes
File Json
File ID String

Exit Codes

Code Type Detail
1 Error The command failed
0 Success The command succeeded

Copy Folder

Copy a folder

Inputs

Input Type Detail Notes
Folder ID TextField The folder ID to copy
Folder Name TextField The name of the folder to copy. Optional when specifying an ID. Performs a search for the folder.
Destination Folder ID TextField The ID of the folder to save the copied folder to.
Destination Folder Name TextField The name of the folder to save the copied folder to. Optional when specifying the Destination Folder ID. Performs a search for the folder.
New Folder Name TextField Rename the copied folder (optional)

Outputs

Output Output Type Notes
Folder Json
Folder ID String

Exit Codes

Code Type Detail
1 Error The command failed
0 Success The command succeeded

Create Folder

Create a folder

Inputs

Input Type Detail Notes
Folder Name TextField The name of the new folder
Destination Folder ID TextField The ID of the destination folder. Use "0" for the root folder.
Destination Folder Name TextField The name of the destination folder (optional). Performs a search to find the destination folder first.

Outputs

Output Output Type Notes
Folder Json
Folder ID String

Exit Codes

Code Type Detail
1 Error The command failed
0 Success The command succeeded

Delete File

Delete a file within Box

Inputs

Input Type Detail Notes
File ID TextField The ID of the file to delete
File Name TextField The name of the file to delete. Optional when specifying the File ID. Performs a search for the file.
Parent Folder Name TextField The parent folder name of the file to delete. Optional when specifying the File ID. Performs a search for the folder.

Outputs

Output Output Type Notes
File ID String

Exit Codes

Code Type Detail
1 Error The command failed
0 Success The command succeeded

Delete Folder

Delete a folder

Inputs

Input Type Detail Notes
Folder ID TextField The folder ID to delete.
Folder Name TextField The folder name to delete. Optional when specifying the Folder ID. Performs a search for the folder.
Parent Folder Name TextField The parent folder name to search for. Optional when specifying the Folder ID.
Recursive BooleanField Delete folders recursively if they contain items.

Outputs

Output Output Type Notes
Folder ID String

Exit Codes

Code Type Detail
1 Error The command failed
0 Success The command succeeded

Download File

Download a file from Box

Inputs

Input Type Detail Notes
File ID TextField The ID of the file to download
File Name TextField The name of the file to download. Optional when specifying the File ID. Performs a search for the file.
Parent Folder Name TextField The name of the parent folder to look for the file. Optional when specifying the File ID. Performs a search for the file.

Outputs

Output Output Type Notes
Lines Integer
File File

Exit Codes

Code Type Detail
1 Error The command failed
0 Success The command succeeded

Get File Info

Get metadata about a file

Inputs

Input Type Detail Notes
File ID TextField The ID of the file to look up metadata for.
File Name TextField The name of the file to look up metadata for. Optional when specifying a File ID. Performs a search for the file.
Parent Folder Name TextField The name of the parent folder to find the file. Optional when specifying a File ID. Performs a search for the folder.

Outputs

Output Output Type Notes
File Info Json
File ID String

Exit Codes

Code Type Detail
1 Error The command failed
0 Success The command succeeded

Get Folder Info

Get metadata about a file

Inputs

Input Type Detail Notes
Folder ID TextField The folder ID to get information for
Folder Name TextField The name of the folder to copy. Optional when specifying an ID. Performs a search for the folder.

Outputs

Output Output Type Notes
Folder Info Json

Exit Codes

Code Type Detail
1 Error The command failed
0 Success The command succeeded

Get Folder Items

Get all items within a folder

Inputs

Input Type Detail Notes
Folder ID TextField The folder ID to get items for.
Folder Name TextField The name of the folder to get items for. Optional when specifying an ID. Performs a search for the folder.
Parent Folder Name TextField The name of the parent folder to perform a search in. Optional when specifying an ID.
Direction DropdownField The sort order for folder items.
Limit NumberField The limit for returned entries.

Outputs

Output Output Type Notes
Total Integer
Entries Json

Exit Codes

Code Type Detail
1 Error The command failed
0 Success The command succeeded

Search

Search for an object

Inputs

Input Type Detail Notes
Query TextField Search query
File Extensions ArrayField File extensions to limit search results
Type DropdownField The type of object to look for (leave blank for all)
Limit NumberField Number of results

Outputs

Output Output Type Notes
Entries Json
Total Integer

Exit Codes

Code Type Detail
1 Error The command failed
0 Success The command succeeded

Update File Info

Update info for a file

Inputs

Input Type Detail Notes
File ID TextField The ID of the file to update information for.
File Name TextField The name of the file to update information for. Optional when specifying a File ID. Performs a search for the file.
Parent Folder Name TextField The parent name of the file to search for. Optional when specifying a File ID. Performs a search for the file.
Name TextField The new name of the file
Description TextField The new description of the file
Destination Folder ID TextField The ID of the destination folder to move the file to (optional).
Destination Folder Name TextField The name of the destination folder. Optional when specifying a Destination Folder ID. Performs a search for the folder.

Outputs

Output Output Type Notes
File Json
File ID String

Exit Codes

Code Type Detail
1 Error The command failed
0 Success The command succeeded

Update Folder

Update info for a folder

Inputs

Input Type Detail Notes
Folder ID TextField The ID of the folder to update.
Folder Name TextField The name of the folder to update. Optional when specifying a Folder ID. Performs a search for the folder.
Destination Folder ID TextField The ID of the destination folder (optional). Use "0" for the root folder.
Destination Folder Name TextField The name of the destination folder. Optional when specifying a Destination Folder ID. Performs a search for the folder.
Name TextField The name of the folder.
Description TextField The description of the folder.

Outputs

Output Output Type Notes
Folder Json

Exit Codes

Code Type Detail
1 Error The command failed
0 Success The command succeeded

Upload File

Upload a file to box

Inputs

Input Type Detail Notes
File TextField The file to upload
Destination Folder ID TextField The ID of the destination folder to store the file.
Destination Folder Name TextField The name of the destination folder to store the file. Optional when specifying the Destination Folder ID. Performs a search for the folder.
Name TextField The name of the file

Outputs

Output Output Type Notes
File Json
File ID String

Exit Codes

Code Type Detail
1 Error The command failed
0 Success The command succeeded

Upload File Version

Upload a file to box

Inputs

Input Type Detail Notes
File TextField The file to upload a new version
File ID TextField The file ID to create a new version for.
Name TextField The name of the file you want to upload a new version for. Optional when specifying a File ID. Performs a search for the file.
Parent Folder Name TextField The name of the folder you want to upload a new version for. Optional when specifying a File ID. Performs a search for the file.

Outputs

Output Output Type Notes
Lines Integer
File File
File ID String

Exit Codes

Code Type Detail
1 Error The command failed
0 Success The command succeeded
B
Brian is the author of this solution article.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.