Box Connector
Introduction
The Box connector version 1.0.0.1 supports uploading, downloading and moving files in Box.
Prerequisites
- Version 9.2.9
- Privileges Required to use the Box Connector
Installation
- Navigate to Custom > Catalog and fill
box
into the Name filter. - Choose Install Specific Version from the context menu.
- Choose Install 1.0.0.1.
Contents of the car file
The car file consists of the following objects:
Object Type | Name |
---|---|
Application | GLOBAL.Redwood.REDWOOD.Box |
ConstraintDefinition | Redwood_BoxConnectionConstraint |
ExtensionPoint | Redwood_Box |
Process Definition | Redwood_Box_Upload_File |
Process Definition | Redwood_Box_Download_File |
Process Definition | Redwood_Box_Move_Item |
Process Definition | Redwood_Box_Rename_Item |
Library | Redwood_Box |
Setup
Box.com Server Authentication (with JWT)
- Navigate to the Box Developer console and choose Create New App.
- Choose Custom App.
- Choose Server Authentication (with JWT) and fill in a name for your app and choose Create App.
- By default, apps can only read files, if you wish to upload files with this component, check Write all files and folders stored in Box.
- Under Add and Manage Public Keys, choose Generate a Public/Private Keypair (requires multifactor authentication).
- Once you have authenticated, the JSON file will be downloaded automatically. Save the file, this is needed by the component.
- Under Add and Manage Public Keys, notice you have a new public key.
- Request authorization of the application, under Authorization, choose Review and Submit, your Box.com enterprise administrator will have to authorize the application.
- Your enterprise administrator needs to navigate to Admin Console and choose Authorize App.
Box recommends Server Authentication (with JWT) but you can also use OAuth usernames and passwords for authentication. The credentials are in the App Configuration:
.
Connection with JWT
Prerequisites
- Your enterprise administrator has authorized the app
Procedure
- Navigate to Custom > Connections, choose.
- Choose Box.com.
- Choose Next or Basic Properties, fill a name into the Name field, select a partition in the Partition field, select or create default queue and process server.
- Choose Next or Security, for each role you wish to grant access, choose, select the role, and the granted rank.
- Choose Next or Box.com Properties, choose Server Authentication (with JWT), upload the JSON file in the Box.com JWT Config File field and choose Test Connection, if the connection was successful, choose Save & Close.
If you want to use straight OAuth instead of JWT, simply select OAuth in the last step and fill in the credentials, choose Login with Box.
Download a File
To download a file from Box, use the Box_Download_File Process Definition.
Download Redwood/SA38 Call.docx
and move it to Done/
Parameters
- Connection: The name provided in the Connections component.
- Path to folder: the folder path in Box to download from, separated by
/
. - Name of the file to download: the file name in Box.
- Path to archive folder: The folder path in Box to move the file to after it is downloaded successfully. If omitted, the file will remain in its original location in Box.
- Box User Override: the user ID of the Box user to use for the operation (overwrite App User).
Move Item
To move a File or Folder to a new location within the Box account, use the Box_Move_Item process definition.
Move Redwood/SA38 Call.docx
and to Done/SA38 Call.docx
Parameters
- Connection: The name provided in the Connections component.
- Source Folder:
- When moving a folder: The path of the folder to move.
- When moving a file: The parent path of the file to move. Leave empty if the file is at the root.
- File Name:
- When moving a file: The name of the file to move. Wildcards
*
and?
are supported. - When moving a folder: Leave empty.
- When moving a file: The name of the file to move. Wildcards
- Target Folder: The folder path in Box to move the file to. If left empty, the file will be moved to the root.
- Name Conflict Action: What to do if an item with the same name already exists in the target.
SKIP
: Skip the conflicting item but do not fail the job. If a wildcard is used, other items will continue to be processed.RENAME
: The item being moved will have a numeric suffix added to its name to make it unique in the destination.FAIL
: Fail the job if a name conflict occurs.
- Box User Override: the user ID of the Box user to use for the operation (overwrite App User).
Rename Item
To rename a File or Folder in the Box account, use the Box_Rename_Item process definition.
Rename Done/SA38 Call.docx
to Done/SA38 Call_done.docx
Parameters
- Connection: The name provided in the Connections component.
- Folder Path:
- When renaming a folder: The path of the folder to rename.
- When renaming a file: The parent path of the file to rename. Leave empty if the file is at the root.
- File Name:
- When renaming a file: The name of the file to rename.
- When renaming a folder: Leave empty.
- New Name: The new name to assign to the specified file or folder.
- Box User Override: the user ID of the Box user to use for the operation (overwrite App User).
Connecting via Proxy
When your Redwood application server is behind a firewall and cannot directly connect to the box.com internet endpoint you configure the connection to go through an HTTP proxy service. You set up an HTTP Credential to specify the proxy server connection details.
See HTTP proxy credentials for more information.
Troubleshooting
Authorization Issues
Not Authorized
You choose Test Connection on the Box.com Properties dialog of the Connections component and get the following error:
com.box.sdk.BoxAPIResponseException: The API returned an error code [400] unauthorized_client -
This app is not authorized by the enterprise admin
Your enterprise administrator has not authorized and enabled the app.
Blocked
You choose Test Connection on the Box.com Properties dialog of the Connections component and get the following error:
com.box.sdk.BoxAPIResponseException: The API returned an error code [403] service_blocked - The application is blocked by your administrator
Your enterprise administrator has disabled the app.