Box Connector > Introduction to Box Connector > Operations with Box objects
  

Operations with Box objects

You can use a Box connection to perform the following operations with Box objects:
Box sources
Box targets
Consider the following guidelines when you configure a write operation:

Delete Box Objects

You can specify Box targets in synchronization tasks, mappings, and mapping tasks to delete Box objects.
You can delete Box files or folders based on the ID or path that you specify in a file that you must name delete.csv. When you specify a file ID or path, the Secure Agent deletes the file. When you specify a folder ID or path, the Secure Agent deletes all the objects in the folder.
The following image shows the contents of the delete.csv file:
The image shows the contents of the delete.csv file.
To delete objects from Box, perform the following tasks:
  1. 1Create a delete.csv file with the File_or_Folder_ID and File_or_Folder_Path fields and values.
  2. 2Save the delete.csv file to a local directory on the machine that hosts the Secure Agent.
  3. 3Create a flat file connection to the location of the delete.csv file.
  4. 4In the synchronization task or mapping you want to create to delete Box objects, configure the following objects:
    1. aSpecify the flat file connection as the source connection and select delete.csv as the source object.
    2. bSpecify a Box connection as the target connection and select delete as the target object.
    3. cSelect Delete as the target task operation.
    4. dMap the File_or_Folder_ID or File_or_Folder_Path fields in the source object with the File_or_Folder_ID or File_or_Folder_Path fields in the target object.

Download Box Objects

You can specify Box targets in synchronization tasks, mappings, and mapping to download Box objects.
You can download Box files or folders based on the ID that you specify in a file that you must name download.csv. When you specify a file ID, the Secure Agent downloads the specified file. When you specify a folder ID, the Secure Agent downloads all the objects in the folder.
The following image shows the contents of the download.csv file:
The following image shows the contents of the download.csv file.
By default, the Secure Agent downloads all the Box objects to the root directory in the Secure Agent machine. However, to download the files to a specific directory, you can specify a path in the Target File Path field when you create the Box connection. Verify that you specify a directory that is local to the machine that hosts the Secure Agent.
To download objects from Box, you need to perform the following tasks:
  1. 1Create a download.csv file with the File_or_Folder_ID field and values.
  2. 2Save the download.csv file to a local directory on the machine that hosts the Secure Agent.
  3. 3Create a flat file connection to the location of the download.csv file.
  4. 4In the synchronization task or mapping you want to create to download Box objects, perform the following tasks:
    1. aSpecify the flat file connection as the source connection and download.csv as the source object.
    2. bSpecify a Box connection as the target connection and select download as the target object.
    3. cSelect Insert as the target task operation.
    4. dMap the File_or_Folder_ID field in the source object with the File_or_Folder_ID field in the target object.

Upload Box Objects

You can specify Box targets in synchronization tasks, mappings, and mapping tasks to upload Box objects.
You can upload Box files or folders based on the path that you specify in a file that you must name upload.csv. When you specify a file name, the Secure Agent uploads the file to Box. When you specify a folder path, the Secure Agent uploads the folder along with all the objects in the folder to Box.
The following image shows the contents of the upload.csv file:
The image shows the contents of the upload.csv file
By default, the Secure Agent uploads the files to the root directory on the Secure Agent machine. To upload the files to a specific directory, you can specify the folder ID in the Box File or Folder ID field when you create the Box connection. If you specify a file ID in the Box connection, the Secure Agent inserts the uploaded data in to the specified file.
To upload objects to Box, you need to perform the following tasks:
  1. 1Create a upload.csv file with the File_or_Folder_Path field and values.
  2. 2Save the upload.csv file to a local directory on the machine that hosts the Secure Agent.
  3. 3Create a flat file connection to the location of the upload.csv file.
  4. 4In the synchronization task or mapping you want to create to upload Box objects, configure the following objects:
    1. aSpecify the flat file connection as the source connection and select upload.csv as the source object.
    2. bSpecify a Box connection as the target connection and select upload as the target object.
    3. cSelect Insert as the target task operation.
    4. dMap the File_or_Folder_Path field in the source object with the File_or_Folder_Path field in the target object.

Write Data to CSV Files in Box

You can specify Box targets in synchronization tasks, mappings, and mapping tasks to write data to CSV files in Box.
To configure synchronization tasks or mappings to write data to CSV files in Box, perform the following tasks:
  1. 1Configure a source transformation to the object from which you want to read data.
  2. You can read data from any source and write data to CSV files in Box. However, when you read from a flat file object, you can write data only to an existing CSV file.
  3. 2Specify a Box connection that connects to the Hosted Agent or the Secure Agent as the target connection and specify the target object.
  4. Note: You can override the file or folder ID you specify in a Box connection with the value you specify in the Box Target File ID advanced target property in synchronization tasks or mappings.
  5. 3Select Insert as the target task operation.

Read data from CSV files in Box

You can specify Box sources in synchronization tasks, mappings, and mapping tasks to read data from CSV files in Box.
To configure the synchronization tasks or mappings to read from CSV files in Box, perform the following tasks:
  1. 1Specify a Box connection that connects to the Hosted Agent or the Secure Agent as the source connection and specify the source object.
  2. 2Configure a target transformation to the object to which you want to write the Box data.

Search Box objects

You can specify Box sources in synchronization tasks, mappings, and mapping tasks to search Box objects.
To search objects to Box, perform the following tasks:
  1. 1Specify the search criteria in the URI Request Parameters field when you create the Box connection.
  2. 2To configure the synchronization task or mapping to search Box objects, perform the following tasks:
    1. aSpecify a Box connection as the source connection and enter Entities as the source object.
    2. bSelect Insert as the target task operation.
    3. cSpecify a target transformation to write the search results.
When you specify Entities as the source object, the Secure Agent searches all objects in the root folder on the Secure Agent machine based on the URI request parameters you specify in the Box connections.
Specify the search string in the URI Request Parameters field using the following syntax:
query=search_string;content_types=<name|description|file_content|comments|tags;limit=<number>;offset=<number>
For example, use the following parameters to search a Box object: query="employee";content_types=name;limit=200;offset=0
The following table describes the URI Request Parameters field options:
Options
Description
Query
Searches the Box objects based on the word or phrase you specify. When you specify a phrase, verify that you enclose the phrase in single quote.
content_types
Specifies the scope of the search. You can use one of the following values:
  • - Name - Searches based on the names of Box objects.
  • - Description - Searches based on the description associated with Box objects.
  • - File_content - Searches based on contents in the Box objects.
  • - Comments - Searches based on comments associated with Box objects.
  • - Tags - Searches based on tags associated with Box objects.
limit
Limits the number of search results that the Secure Agent writes to the target.
offset
Offsets the search results based on the specified offset value. For example, if you specify the offset value as 12, the Secure Agent ignores the first 11 rows in the search results and writes the results from the 12th row.