For the complete documentation index, see llms.txt. This page is also available as Markdown.

API

Automate transfers, remotely set settings, and control licenses.

This feature requires an OffShoot Pro license. Upgrade via the License Manager, or via OffShoot > Settings > License. Check out all Pro features here.

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 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 PowerShell

start 'offshoot://open'

Using a script

AppleScript:

do shell script ("open 'offshoot://open'")

Python:

import os
os.system("open 'offshoot://open'")

Python

import os
os.system("start '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.

Location: C:\Users\$username\AppData\Roaming\Hedge\HedgeCallback.log

This is a multi-line log. It's emptied on app start and after each call.

$time | $id | $arguments_passed

$time | $id | $call_result

OffShoot API calls

Control OffShoot's application state.

Open

Quit

Restart

Check for updates

Activate

URL Parameter
Type
Description

key

String

Required

Deactivate

Chain Actions

The actions call allows you to pass multiple API calls in a single request:

Example

URL Parameter
Type
Description

json

Array containing JSON object(s)

Required

<action>

String

An API action

<property>

String

An action property

<value>

Various

The value of the property

API call not working? URL-encode the JSON string.

Actions without properties are passed as {}.

Chained Actions can create timing issues. Keep this in mind when debugging. If you run into timing issues, cut up your chained action into multiple calls and proceed based on timers/OffShoot Events or logging output.

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.

URL Parameter
Type
Description

type

Sting

Optional (sources or destinations).

Set Source

Sets a single Source or a collection of paths and applies a Label when defined.

URL Parameter
Type
Description

paths

Array

Required

label

String

Optional

Terminal examples:

Call with URL encoded json= value

PowerShell examples:

Call with escaped quotes

Call with URL encoded json= value (don't escape quotes)

Set Destination

Sets a single Destination

URL Parameter
Type
Description

path

Array

Required / URL encoded

Terminal examples:

Call with URL encoded json= value

PowerShell examples:

Call with escaped quotes

Call with URL encoded json= value (don't escape quotes)

Reload Presets

Reloads all presets. Call this after making changes to preset files.

Add Transfers

Creates transfers for all new combinations of Sources and Destinations. Identical to pressing the Add Transfers button in OffShoot.

Restart Transfer

Restarts a stopped or failed transfer. Uses the ID found in FileCopyCompleted_id

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

Not sure which key name to use? Try changing the setting in OffShoot, then verifying the modified values in: ~/Library/Preferences/nl.syncfactory.Hedge.Mac.plist

URL Parameter
Type
Description

preferences

JSON Object

Required

The SetPreferences action is for macOS only.

On Windows, you can set the corresponding keys and values in the Windows Registry under <current-user>\Software\Hedge.

Last updated