List Drive Space History

Service name: list_drive_space_history

Base URL

https://{SERVER}/api/?apikey={yourAPIkey}&service=list_drive_space_history

Description

Returns the daily (interval=DAY), weekly (interval=WEEK) or monthly (interval=MONTH) disk space usage information for a device. Only available for devices which have active FREE_DRIVE_SPACE check(s).

Parameters

Required parameters

Add required parameters immediately after the base URL.

https://SERVER/api/?apikey=yourAPIkey&service=list_drive_space_history&required_parameters=required_parameters[&optional_parameters=optional_parameters]
ParameterTypeDescriptionOptionsRequired
deviceidIntegerA valid device ID.0Yes
intervalStringInterval length.DAY, WEEK, MONTHYes
sinceStringReturns data from this date/time (inclusive). Use UTC ISO 8601. If omitted, all available data is returned.0No

since formats

IntervalFormatExample
DAY[year]-[month]-[day]2013-10-21
WEEK[year]W[week number]2013W43
MONTH[year]-[month]2013-10

Optional parameters

Add optional parameters immediately after the base URL.

https://SERVER/api/?apikey=yourAPIkey&service=list_drive_space_history&required_parameters=required_parameters[&optional_parameters=optional_parameters]
ParameterDescriptionTypeOptionsDefault
describeReturns a description of the service.booleantrue0

Determine parameter values

Use the following associated service calls to determine parameter values.

ParameterCallURL Format
deviceidlist_devices_at_clienthttps://{SERVER}/api/?apikey={yourAPIkey}&service=list_devices_at_client&clientid=CLIENTID&devicetype=server
list_servershttps://{SERVER}/api/?apikey={yourAPIkey}&service=list_servers&siteid=SITEID
list_workstationshttps://{SERVER}/api/?apikey={yourAPIkey}&service=list_workstations&siteid=SITEID
siteidlist_siteshttps://{SERVER}/api/?apikey={yourAPIkey}&service=list_sites&clientid=CLIENTID
clientidlist_clientshttps://{SERVER}/api/?apikey={yourAPIkey}&service=list_clients

Examples

List Drive Space History

https://SERVER/api/?apikey=yourAPIkey&service=list_drive_space_history&deviceid=DEVICEID&interval=INTERVAL&since=SINCE

Example response

<?xml version="1.0" ?>
<example>
  <result created="2013-09-26T11:49:41+01:00" host="SERVER" status="OK">
    <drive>
      <drive_letter>E</drive_letter> <!-- Windows only -->
      <mount_point>/mnt/something</mount_point> <!-- Linux and Mac only -->
      <check_id>11037</check_id> <!-- Check responsible for populating this data -->
      <history>
        <data>
          <day>2013-08-05</day> <!-- Only if interval=DAY. UTC ISO 8601 year, month, and day. -->
          <week>2013W31</week> <!-- Only if interval=WEEK. UTC ISO 8601 year and week. -->
          <month>2013-08</month> <!-- Only if interval=MONTH. UTC ISO 8601 year and month. -->
          <space_used>270361</space_used> <!-- Megabytes -->
        </data>
        <data>
          <day>2013-08-06</day>
          <space_used>270774</space_used>
        </data>
        <data>
          <day>2013-08-07</day>
          <space_used>270784</space_used>
        </data>
        <!-- More data elements -->
      </history>
    </drive>
    <!-- More drive elements, if applicable -->
  </result>
</example>

Returned fields

The response contains a drive_space element. This element contains a drive element for each drive that has a corresponding check on the device. It contains no drive elements when data is unavailable.

KeyConditionDescription
drive_letterWindows devices onlyDrive letter for the monitored drive.
mount_pointLinux and Mac devices onlyMount point for the monitored drive.
check_idNoneCheck that populated the data.
historyNoneList of entries. In XML output, each entry is a data element.

Notes

Data is available for a maximum of 61 intervals for each interval type. To retain data for a longer period, store a copy. For efficiency, use the since parameter to request only new data.


Did this page help you?