Software: Device API

Follow

Scope

This article provides a list of API calls supported by Datto appliances.  The current Datto API is an XML feed, which you can read using an XML parser.

Prerequisites

Required parameters for all calls:
user: Username used on web interface to login
pass: Password for web interface user

API Calls

Agent Listing

Command: agentList
Parameters: NONE
What it does: Returns a list of all agents paired to the device on separate lines.
Example: http://deviceHostname/deviceAPI.php?user=myUser&pass=myPass&command=agentList

Snap Listing

Command: snapList
Parameters: agent (hostname as paired)
What it does: Returns a list of all snapshots - excluding devSnapshots, on separate lines. (Unix Timestamps)
Example: http://deviceHostname/deviceAPI.php?user=myUser&pass=myPass&command=snapList&agent=agentIPorHostname 

Latest Snap

Command: latestSnap
Parameters: agent (hostname as paired)
What it does: Returns the last snapshot time of an agent in the local date/time format. (Adheres to timezone settings)
Example: http://deviceHostname/deviceAPI.php?user=myUser&pass=myPass&command=latestSnap&agent=agentIPorHostname 

Mount VMDK

Command: mountVMDK
Parameters: agent (hostname as paired), [OPTIONAL] snap (Unix Timestamp)
What it does: Mounts a VMDK share for either the latest snap (if no snap is specified) or the specified snapshot.
Example: http://deviceHostname/deviceAPI.php?user=myUser&pass=myPass&command=mountVMDK&agent=agentIPorHostname&snap=snapUnixTimestamp 

Unmount VMDK

Command: unmountVMDK
Parameters: agent (hostname as paired)
What it does: Unmounts the VMDK share for that agent. As usual, only one share of each type may be active per agent so no snap parameter is necessary.
Example: http://deviceHostname/deviceAPI.php?user=myUser&pass=myPass&command=unmountVMDK&agent=agentIPorHostname 

Mount VHD

Command: mountVHD
Parameters: agent (hostname as paired), [OPTIONAL] snap (Unix Timestamp)
What it does: Mounts a VHD share for either the latest snap (if no snap is specified) or the specified snapshot.
Example: http://deviceHostname/deviceAPI.php?user=myUser&pass=myPass&command=mountVHD&agent=agentIPorHostname&snap=snapUnixTimestamp 

Unmount VHD

Command: unmountVHD
Parameters: agent (hostname as paired)
What it does: Unmounts the VHD share for that agent. As usual, only one share of each type may be active per agent so no snap parameter is necessary.
Example: http://deviceHostname/deviceAPI.php?user=myUser&pass=myPass&command=unmountVHD&agent=agentIPorHostname 

Start Backup

Command: startBackup
Parameters: agent (hostname as paired)
What it does: Starts a backup for specified agent.
Example: http://deviceHostname/deviceAPI.php?user=myUser&pass=myPass&command=startBackup&agent=agentIPorHostname 

Stop Backup

Command: stopBackup
Parameters: agent (hostname as paired)
What it does: Stops (forcefully if necessary) the backup for the specified agent.
Example: http://deviceHostname/deviceAPI.php?user=myUser&pass=myPass&command=stopBackup&agent=agentIPorHostname 

Backup Status

Command: backupStatus
Parameters: agent (hostname as paired)
What it does: Returns the current status string and/or transfer percentage of specified backup.
Example: http://deviceHostname/deviceAPI.php?user=myUser&pass=myPass&command=backupStatus&agent=agentIPorHostname


Was this article helpful?

0 out of 0 found this helpful

You must sign in before voting on this article.

Want to talk about it? Head on over to our Community Forum!