API¶
Client API¶
-
class
sciencelogic.client.
Client
(username, password, uri, auto_connect=True, verify_ssl=False)[source]¶ -
devices
(details=False, limit=100)[source]¶ Get a list of devices
Parameters: - details (
int
) – Get the details of the devices - limit – Number of devices to retrieve
Return type: list
ofDevice
- details (
-
Device API¶
-
class
sciencelogic.device.
Device
(device, uri, client, has_details=False, fetch_details=False)[source]¶ Represents a monitored device
-
get_logs
(extended_fetch=0, hide_filter_info=1, link_disp_field=None, limit=1000, offset=None)[source]¶ Get logs for this device
Parameters: - extended_fetch (
bool
) – Fetch entire resource if 1 (true), or resource link only if 0 (false). - hide_filter_info (
bool
) – Suppress filterspec and current filter info - link_disp_field (
list
) – When not using extended_fetch, this determines which field is used for the “description” of the resource link - limit (
int
) – Number of records to retrieve - offset (
int
) – Specifies the index of the first returned resource within the entire result set
Return type: list
ofdict
- extended_fetch (
-
Performance Data API¶
Presentation API¶
-
class
sciencelogic.presentations.
Presentation
(presentation_dict, client)[source]¶ A presentation of a monitor’s data
-
get_data
(beginstamp=None, endstamp=None, insert_nulls=1, fetch_indexes=0, duration=None, idx_list=None, idx_max=None, hide_options=1)[source]¶ Get the data for this presentation
Parameters: - beginstamp (
str
) – timestamp for the beginning of the desired range of data - endstamp (
str
) – timestamp for the end of the desired range of data - insert_nulls (
bool
) – insert NULLs for all poll dates within the specified date range that do not have polled values - fetch_indexes (
bool
) – fetch the list of collection indexes (and their string labels, if any exist) for the date range instead of actual data. - duration (
str
) – human readable short-hand, such as 24h, 5d, 90m where h=HOUR, d=DAY, m=MINUTE. Used to specify the amount of data to fetch - idx_list (
list
) – a list of collection indexes for which to fetch data (when not specified, all indexes up to idx.max will be fetched) - idx_max (
int
) – limits the maximum number of collection indexes to return for the requested presentation data - hide_options (
bool
) – hide the available request parameters from the response
Return type: dict
Note
if fetch_indexes is enabled, idx.max and idx.list will be ignored.
- beginstamp (
-