Dropbox for Business (REST API)
Create a Dropbox for Business connection using the DryvIQ REST API.
Table of Contents
Creating a Connection
The following GET will return a target URL. Use this URL to log in to your Dropbox for Business account, authenticate, and create the connection. Make sure you connect using an Administrator account.
GET {{url}}v1/connections/platforms/dfb/new
Creating a Connection Using Custom Credentials
The following example shows how to create a new connection using custom credentials. Replace the name, client_id, and client_secret with information relevant to your connection.
POST {{url}}v1/connections/
{
"name": "Dropbox for Business",
"platform": {
"id": "dfb"
},
"auth": {
"client_id": "{{clientID}}",
"client_secret": "{{clientSecret}}"
}
}
Creating a Connection with Single Sign-On (SSO)
The following example shows how to create a new connection using single sign-on authentication. You will need to obtain the applicable access token for your Dropbox for Business account.
POST {{url}}v1/connections/
{
"name": "Dropbox for Business",
"platform": {
"id": "dfb"
},
"auth": {
"access_token": "{{access_token}}"
}
}
Creating a Job
Create a simple transfer job using the example call below. Replace the information with information relevant to your job and connectors.
Known Issues
The following are known issues when creating a job for a Dropbox for Business account using an Administrator account connection.
- Connection-based Impersonation should be used due to a caching issue which may incorrect shared folder detection.
- Connection-based Impersonation is shown in the user-interface as a "Run As...." option on the Locations step when creating a new job.
- Path-based impersonation should not be used. The first folder is a user name such as “path: /user@company.com/.”
POST {{url}}v1/jobs
{
"name":"Simple Job",
"kind": "transfer",
"transfer": {
"transfer_type": "copy",
"source": {
"connection": { "id": "{{DropboxForBusiness_Admin_ConnectionID}}" },
"impersonate_as": { "email": "user@company.com" },
"target": {
"path": "/sourceFolder"
}
},
"destination": {
"connection": { "id": "{{OneDriveForBusiness_connection_destinationID}}" },
"target": {
"path": "/Documents/destinationFolder"
}
},
"simulation_mode": false
},
"schedule": {
"mode": "manual"
},
"stop_policy": {
"on_success": 5,
"on_failure": 5,
"on_execute": 25
},
"category": {
"name": "Report Category {Name}"
}
}