List Drive Space History

Use this API Call to query our Data Extraction API to extract data gathered by N-sight RMM.This section shows the service name and parameters needed in the API Call query, and provides examples of some queries and system responses. For more information, see Data Extraction API.

Service name: list_drive_space_history

URL

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

&required_parameters=required_parameters

[&optional_parameters=optional_parameters]

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

Post Variable

Description

Type

Required

Options

Default

describe

Optional. Returns a description of the service.

boolean

no

true

0

deviceid

The deviceid must be a valid id.

integer

yes

0

0

interval

Interval length:

DAY

WEEK

MONTH

string

yes

DAY

WEEK

MONTH

0

since

Only obtain data since this date/time (inclusive); otherwise all available data is returned. All UTC, ISO-8601; format depends on interval:

interval

format

e.g.

DAY

[year]-[month]-[day]

2013-10-21

WEEK

[year]W[week number]

2013W43

MONTH

[year]-[month]

2013-10

string

no

0

0

Example Service Call =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 & 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 day]

 <week>2013W31</week>[only if interval=WEEK. UTC ISO-8601 year week]

 <month>2013-08</month>[only if interval=MONTH. UTC ISO-8601 year 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>

Fields Description

A drive_space element containing drive elements (or none if no data available) for each drive which has a corresponding check on the device; each drive element contains:

key

description

drive_letter

only for Windows devices

drive letter for the drive being monitored

mount_point

only for Linux and Mac devices

mount point of the drive being monitored

check_id

the check which populated this data

history

a list (in XML output these will be data elements), each entry containing:

day

only if interval=DAY

the day this data is for; format: [year]-[month]-[day]

week

only if interval=WEEK

the week this data is for; format: [year]W[week number]

month

only if interval=MONTH

the month this data is for; format: [year]-[month]

space_used

integer; drive space used (megabytes)

Notes

Data is available for a maximum of 61 intervals (for each possible interval), if you need data for longer you must store a copy yourself then - for efficiency - provide the since parameter to only request new data

 

Example Associated Service Calls
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