Skip to content
Alberto Gonzalez edited this page Jun 19, 2017 · 5 revisions

Unitrends API Document

Revision June 2017

API Endpoint

https://{applianceaddress}/

Authentication

In working with the Unitrends RESTful APIs, clients must first be authenticated to the appliance. This is accomplished by providing the username and password of a valid system user. The authentication token returned must then be passed in for every subsequent API call. Details of the authentication API are here.

Conventions

There is a standard set of URL parameters supported for filtering of API results. For example, if a system ID is not specified, APIs will return aggregate results for all of the managed systems this user can see. Each object will include an "sid" key with the value the value of the system on which the results are associated. However, if a system filter is specified in the request, the API will return results for only that specified system and no "sid" key is included in the results.

Filter Description
sid={system ID} Return results for the specified system ID
start_date={date} For time-based APIs, return results starting with the specified date
end_date={date} For time-based APIs, return results ending with the specified date

Return Values

Each request will return an HTTP status code of 200 or 201 on success or an error status on failure. If an error is returned, the message to be displayed will be returned in a corresponding JSON "result" array that contains one or more additional details.

Status Codes

There are over 70 HTTP status codes, but the REST APIs will use only eight of them. These are defined here.

Result format

PUT, POST, and DELETE APIs modify, add, or delete a system object. They return a result to indicate whether or not the operation were successful, and messages to display on error or warning. In addition, depending on the object created, additional information, such as the id of the created object, will be returned. The return codes are more deatileda bout the failure (codes to be implemented) and may also include a link for more information (to be implemented).

GET APIs return data to the caller. If an API fails, the HTTP status code will indicate the failure type, and a result object will be returned with the code and any message(s) to be displayed to the user.

Sample Return Objects

Error, with 2 messages for the user.

HTTP Status: 500 (Internal Server Error)

Result Object:

{
   "result": [
       {
           "code": 1345,
           "message":  "The license could not be updated.",
           "link": "http://kb.unitrends.com/342"
       },
       {
           "message":  "The format of the license string is invalid."
       },
   ]
}

Successful creation of a schedule job, and the id of the new schedule is 234:

HTTP Status: 201 (Created)

Result Object:

{
   "result": [
       {
           "id": 234
       }
   ]
}

The operation succeeded, but with warnings:

HTTP Status: 200 (OK)

Result Object:

{
   "result": [
       {
           "code": 43584,
           "message": "The operation succeeded, but you need to be aware of this.",
           "link": "http://kb.unitrends.com/45"
       }
   ]
}

Resources

Type URI GET POST PUT DELETE
active-directory /active-directory Get AD info - Modify AD info Delete AD info
advisor /advisor Get information about Satori - Change default UI -
alerts /alerts Get alerts - - Dismiss alert
applications /applications Get list of applications - - -
archive /archive Get archive info Create archive Update archive configuration Delete archive configuration
assets /assets Get assets info - - -
audits /audits Get audits - - -
backups /backups Get list of backups Runs a backup Update backup Delete backup
backup-copy /backup-copy Get backup-copy info
capabilities /capabilities Get platform capabilities - - -
catalog /catalog Get catalog - - -
certification /certification Get certification info Create certification info Update certification info Delete certification info
clients /clients Get list of clients Add client Update client Delete client
commands /commands - Run a pre-defined command - -
credentials /credentials Get credentials list Add credentials Update credentials Delete credentials
date-time /date-time Get date/time and TZ info - Update date/time and TZ info Delete ntp servers
drtest /drtest Get backup-copy(Hot) target type Send DR test request to Unitrends CloudOps - -
encryption /encryption Get encryption info Save encryption keys Update encryption state
feedback /feedback - Mail feedback to Unitrends - -
forum /forum Get forum info Create forum info Update forum info Delete forum info
hostname /hostname Get hostname - Update hostname -
hosts /hosts Get hosts Add host Update host Delete host
inventory /inventory Get inventory - Start inventory update -
joborders /joborders Get joborders Create joborder Update joborder Delete joborder
jobs /jobs Get job list Create job Update job Cancel job
license /license Get license - Update License -
login /login - Log into the system - -
logout /logout - Log off the system - -
mail-config /mail-config Get mail server and recipients - Update mail info Delete mail info
networks /networks Get networks - Update network info -
optimize /optimize Get optimization settings - Update settings, move db -
ports /ports Get port info - Modify port info -
preferences /preferences Get user preferences Add preferences Modify preferences -
replication /replication Get replication info Create replication configuration Update replication configuration Delete replication configuration
reports /reports Get report data Create custom report Update custom report Delete custom report
restore /restore Get restore targets Start a restore job - -
retention /retention Get retention policy Create a retention policy Update retention policy Delete retention policy
settings /settings Get settings info - Update settings -
sla-policies /sla-policies Get policies Add policy Update policy Delete Policy
snmpd /snmpd Get SNMP daemon configuration - Modify SNMP daemon configuration -
storage /storage Get storage list Add storage Update storage Delete storage
summary /summary Get system summary - - -
systems /systems Get list of systems Add system Update system Delete system
traps /traps Get traps, destination, configuration Send trap Modify trap destination Delete destination
updates /updates Get update info - Apply updates -
users /users Get list of users Add user Update user Delete user
virtual_clients /virtual_clients Get list of virtual clients Add virtual client Update virtual client Delete virtual client

Clone this wiki locally