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]
| Parameter | Type | Description | Options | Required |
|---|---|---|---|---|
deviceid | Integer | A valid device ID. | 0 | Yes |
interval | String | Interval length. | DAY, WEEK, MONTH | Yes |
since | String | Returns data from this date/time (inclusive). Use UTC ISO 8601. If omitted, all available data is returned. | 0 | No |
since formats
since formats| Interval | Format | Example |
|---|---|---|
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]
| Parameter | Description | Type | Options | Default |
|---|---|---|---|---|
| describe | Returns a description of the service. | boolean | true | 0 |
Determine parameter values
Use the following associated service calls to determine parameter values.
| Parameter | Call | URL Format |
|---|---|---|
| deviceid | list_devices_at_client | https://{SERVER}/api/?apikey={yourAPIkey}&service=list_devices_at_client&clientid=CLIENTID&devicetype=server |
| list_servers | https://{SERVER}/api/?apikey={yourAPIkey}&service=list_servers&siteid=SITEID | |
| list_workstations | https://{SERVER}/api/?apikey={yourAPIkey}&service=list_workstations&siteid=SITEID | |
| siteid | list_sites | https://{SERVER}/api/?apikey={yourAPIkey}&service=list_sites&clientid=CLIENTID |
| clientid | list_clients | https://{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.
| Key | Condition | Description |
|---|---|---|
drive_letter | Windows devices only | Drive letter for the monitored drive. |
mount_point | Linux and Mac devices only | Mount point for the monitored drive. |
check_id | None | Check that populated the data. |
history | None | List 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.
Updated 12 days ago