Box Using REST API
Creating a Connection
The following GET will return a Box login link. Use the link to complete logging into the account and to grant DryvIQ access to the account.Â
Creating a Box Connection Using Connect As Standard User
GET {{url}}v1/connections/platforms/box/new
Creating a Box Connection Using Connect as Account Administrator
GET {{url}}v1/connections/platforms/box/new?admin_mode=1
Creating a Job
Example: Box connection created as standard user, no impersonation
Connect as a Box user. The path relates to my source content.
POST {{url}}v1/jobs |
---|
{
"name":"Simple Job",
"kind": "transfer",
"transfer": {
"transfer_type": "copy",
"source": {
"connection": { "id": "{{Box_connection_AsStandardUser_sourceID}}" },
"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 {Name}"
}
} |
Â
Example: Box Connection Created as Standard User with Impersonation
As a Box administrator, impersonate a user in the system where the path relates to their content. This requires administrator privileges to use the impersonation feature, such as administrator or co-administrator.
POST {{url}}v1/jobs |
---|
Example: Box Connection created as an Account Administrator
Connect as an account administrator. The path must include the user of the content you are transferring. If impersonation is used for this scenario, permissions will be ignored.
POST {{url}}v1/jobs |
---|