Dropbox Connector
This adapter connects to the Dropbox cloud service and offers cloud storage management functions.
You need a Dropbox account (standard or business) to use the Dropbox Connector.
Before using the adapter for the first time:
If you want to use the Dropbox Connector for the first time, you need to execute the following steps beforehand:
- Go to the following website: https://www.dropbox.com/developers.
- Click on App Console. The button is located at the top right.
- Click on Create app.
- For Choose an API, select
Dropbox API
. - For Choose the type of access you need, choose
Full Dropbox
. - Enter any name in Name your app.
- Click on Create app
- The app is created and the app settings open.
- For Choose an API, select
- Klick on Generate under Generate access token.
- The Access Token is generated and displayed. This Access Token is required for using the Dropbox Connector.
Via the API, an Apps
folder is created in the assigned Dropbox; this respresents the application folder. Anyone who is in possession of the generated Access Token has access to this folder! Make sure you know who comes into possession of the Access Token!
Properties
Operation | Operation executed by the adapter Possible values:
|
Parameter
Adapter | Main class of the adapter (do not change!) Possible values: en.softproject.x4.adapter.dropbox.DropBoxConnector: Main class (default) |
accessToken | Required. Required to connect to the Dropbox account. Possible values: Unique Access Token The Access Token must be generated in Dropbox. |
folderPath | Path to a folder in Dropbox. Possible values: Folder path (default: The folder path must always begin and end with a If folders are used during the |
fileName | File name of the file to be processed. Possible values: File name incl. file extension |
sourcePath | Required for the Possible values: File path incl. file name and file extension, e.g. |
destinationPath | Required for the Possible values: File path |
folderName | Required for the Possible values: Any string |
overwrite | Defines whether existing files are overwritten when copying or creating. Possible values:
|
Status values
1 | The operation was executed successfully. |
-1 | The operation could not be executed. The error message is output as a text document and in the server log. |
Input
The adapter expects a file as input for the operations CreateFile
and UpdateFile
.
The adapter expects a .zip file as input for the ExtractFolder
operation.
Output
The adapter provides different data as output depending on the executed operation.
CopyFile
,CreateFile
andDeleteFile
operations: Text document with informationListFolder
,GetFileMetadata
operations: XML document with corresponding contentSample output GetFileMetadata
XML<Metadata isFolder="false"> <Name>new.txt</Name> <Path>/new.txt</Path> <Id>id:SLz0S6oc-FAAAAAAAAAALw</Id> <LastModified>2019-06-26T11:55:33</LastModified> <Size>4</Size> </Metadata>
Sample output ListFolder
XML<Result> <Entry isFolder="true">Folder</Entry> <Entry isFolder="false">Image.png</Entry> <Entry isFolder="false">file.txt</Entry> <Entry isFolder="false">Document.docx</Entry> </Result>
- Operation
ExtractFolder
: Does not return any output. Operation
GetFileContent
: content of the read fileNot all file formats are supported!