Dropbox Connector

Configuring SearchBlox

Before using Dropbox Connector, install SearchBlox successfully, then create a Custom Collection.

1001

Configuring Dropbox Connector

Prerequisite
Install Java JDK 1.8.x for the Dropbox Connector to work. The environment variable is set as shown here:

      JAVA_HOME = C:\Program Files\Java\jdk1.8.0_31

Link to download Java: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Steps to set up Dropbox Connector
Please contact [email protected] for the download link for SearchBlox Dropbox connector.
Download the SearchBlox Dropbox connector. Extract the zip file to C:\searchblox-dropbox and save the folder as searchblox-dropbox.

Unzip searchblox-dropbox-connector under C:. After extracting, C:\searchblox-dropbox should contain searchblox-dropbox-0.0.1.jar, application.properties and readme.txt

953

Under My apps, Click on Create app.

  1. Select Dropbox API.
  2. Choose the type of access you need: Select 'Full Dropbox -- Access to all files and folders in a user's Dropbox'.
  3. Name your app.
  4. Click on create app.
1050 970
  1. The app will be created and you will be redirected to Settings. Under Redirect URIs, provide the following URIs and click on Add.
    http://localhost:8181/dropbox-auth-finish
1010
  • Provide the details in C:/searchblox-dropbox/application.properties. The properties with the prefix dbxApi are Dropbox properties. The properties with the prefix SearchBlox are SearchBlox properties.
dbxApi.clientIdClientId from Dropbox developer console.
dbxApi.clientSecretClient Secret from Dropbox developer console.
dbxApi.batchSizeBatch size.
searchblox.restJsonApiSearchblox rest API URL. Make changes based on IPaddress and port number used.
searchblox.apiKeySearchblox application's API key in Menu → Admin.
searchblox.colnameName of custom collection.
searchblox.excludeFoldersFolders to be excluded. The URLs should be separated by commas.
searchblox.excludeFormatsFormats to be excluded. The formats should be separated by commas.
searchblox.cronExpressionSchedule value should be in cron format (http://www.nncron.ru/help/EN/working/cron-format.htm).
Default value is 1 minute (0 0-59 0-23 ? * ).
To index every day at midnight, the cron value for Poll is 0 0 0
*
To index every hour daily, the cron value for Poll is 0 0
  • Provide the details in C:/searchblox-dropbox/application.properties. The content details for application.properties are listed here:
dbxApi.clientId = 9pp8r5bbc8sv5ea //ClientId From dropbox developers console
dbxApi.clientSecret= exr11xtk5r0sptx //Client Secret From dropbox developers console
dbxApi.batchSize= 20
  
searchblox.restjsonapi  = http://localhost:8080/searchblox/rest/v1/api/add
searchblox.apiKey = 1BDECF7B40DEA1BD266C79710DEE44B6 //Searchblox APIKey
searchblox.colname = dropbox3 //same collection name as in searchblox
searchblox.excludeFolders - folder1,folder2 //folder names to exclude separated only by comma
searchblox.excludeFormats - txt,.tar,.doc,.docx,.xls,.xlsx //specify file extension to exclude, separated only by comma.
searchblox.cronExpression = 0 0 0/24 * * ?//enter cron expression (example to run every 24 hours : searchblox.cronExpression = 0 0 0/24 * * ? )
  • Make sure the SearchBlox server has been started.The log files will be written to C:\searchblox-Dropbox.

  • Port 8181 must be available before running the following command. If it is not available, change -Dserver.port number to any available port number.

  • Open the command prompt, the go to C:\searchblox-dropbox and execute.

        java -DLOG_PATH="C:\searchblox-dropbox" -DLOG_LEVEL=DEBUG -DpropertySource=file:C:/searchblox-dropbox/application.properties -Dserver.port=8181 -jar searchblox-dropbox-0.0.1-SNAPSHOT.jar
    
  • If you are installing the connector for the first time, you will be redirected to a webpage requesting approval to access Dropbox. Click 'Allow'.

1091 470
  • Copy the code displayed and paste it in the execution command prompt.
669 674

🚧

Note:

The log level in the above command is set to DEBUG, which prints out the detailed explanation of requests and responses to the log. This can be changed to INFO for a short explanation.