API
Automate transfers, remotely set settings, and control licenses.
You can tell OffShoot to do something by calling this URL – offshoot://
. You can call this from any app or script that can open an URL.
Using Hedge? Then use hedge://
instead of offshoot://
Using a browser
Copy/paste the URL below in a web browser, press Enter
, and OffShoot will open.
offshoot://open
Using a shell
Copy/paste the command below in a shell, press Enter
, and OffShoot will open.
Using Terminal
open 'offshoot://open'
Using a script
AppleScript:
do shell script ("open 'offshoot://open'")
Python:
import os
os.system("open 'offshoot://open'")
The result of an API call is logged in a text file.
Location: ~/Library/Logs/Hedge/urlSchemeResponseLog.txt
This log will contain a single line with either a success
or fail
state. It's empty when OffShoot starts, then emptied after each call.
OffShoot API calls
Control OffShoot's application state.
Open
offshoot://open
Quit
offshoot://quit
Restart
offshoot://restart
Check for updates
offshoot://update
Activate
offshoot://activate?key=xxxx-xxxx-xxxx-xxxx
key
String
Required
Deactivate
offshoot://deactivate
Chain Actions
The actions
call allows you to pass multiple API calls in a single request:
offshoot://actions?json=[{"<action>":{"<property>": "<value>"},},{"<action>":{"<property>": "<value>"}}]
json
Array containing JSON object(s)
Required
<action>
String
An API action
<property>
String
An action property
<value>
Various
The value of the property
offshoot://deactivate
offshoot://activate?key=xxxx-xxxx-xxxx-xxxx
offshoot://actions?json=[{"deactivate":{}},{"activate":{"key":"xxxx-xxxx-xxxx-xxxx"}}]
Reset Disks
Removes disks from Sources and/or Destinations dropzones. Existing transfers are not affected. If type
is not defined, both Sources and Destinations are reset.
offshoot://reset?type=sources
type
Sting
Optional (sources
or destinations)
.
Set Source
Sets a single Source or a collection of paths and applies a Label when defined.
offshoot://setSource?paths=["/Volumes/UNTITLED"]&label=Clips
paths
Array
Required
label
String
Optional
Terminal examples:
open 'offshoot://actions?json=[{"setSource":{"paths":["/Volumes/Untitled/The Clips"],"label":"test"}}]'
Call with URL encoded json= value
open 'offshoot://actions?json=%5B%7B%22setSource%22%3A%7B%22paths%22%3A%5B%22%2FVolumes%2FUntitled%2FThe%20Clips%22%5D%2C%22label%22%3A%22test%22%7D%7D%5D
Set Destination
Sets a single Destination
offshoot://setDestination?path=/Volumes/BACKUP
path
Array
Required / URL encoded
Terminal examples:
open 'offshoot://actions?json=[{"setDestination":{"path":"/Volumes/Untitled/The Project"}}]'
Call with URL encoded json= value
open 'offshoot://actions?json=%5B%7B%22setDestination%22%3A%7B%22path%22%3A%22%2FVolumes%2FUntitled%2FThe%20Project%22%7D%7D%5D'
Add transfers
Creates transfers for all new combinations of Sources and Destinations. Identical to pressing the Add Transfers
button in OffShoot.
offshoot://addTransfers
Set Preferences
Sets a specific preference to a specific value. A complete list of all key names is available here: /Applications/OffShoot.app/Contents/Resources/SFIDefaults.plist
offshoot://setPreferences?preferences={"SFIDefaultsAutoSources":"0"}
preferences
JSON Object
Required
Last updated