Models¶
Application¶
-
class
labstats_api.models.
Application
(requester, attributes)¶ Bases:
labstats_api.models.LabStatsObject
Represents a LabStats application
-
description
= None¶ User-defined Application description
-
endpoint
¶ The LabStats REST API endpoint that represents this object
-
get_versions
(limit=300, after_id=1, **kwargs)¶ Gets a list of detected versions for this application
Parameters: - limit – See Limit
- after_id – See The After ID
-
id
= None¶ Integer unique identifier
-
is_tracked
= None¶ Whether LabStats is tracking usage of this Application
-
name
= None¶ Human-readable name of the Application, such as
"Notepad"
-
source
= None¶ "catalog"
,"inventory"
, or"user_defined"
. Used astype
parameter for the/apps
endpoint.
-
tracking_pattern_match
= None¶ "wildcard"
or"reg_ex"
-
type
= None¶ "desktop"
or"webapp"
-
vendor
= None¶ Human-readable name of the Application’s vendor
-
ApplicationVersion¶
-
class
labstats_api.models.
ApplicationVersion
(requester, attributes)¶ Bases:
labstats_api.models.LabStatsObject
Represents a single version of an Application tracked by LabStats
-
application_id
= None¶ The ID of the Application which this Version pertains to
-
id
= None¶ Integer unique identifier
-
install_count
= None¶ The number of computers that this version was detected on
-
name
= None¶ Human-readable name of the application at this version
-
operating_system
= None¶ The platform that this version was detected on
-
version
= None¶ The application’s version string, such as
1.0.0
-
Group¶
-
class
labstats_api.models.
Group
(requester, attributes)¶ Bases:
labstats_api.models.LabStatsObject
Represents a group of Stations or Groups
-
contents
= None¶ "stations"
or"groups"
-
description
= None¶ Optional longer description
-
endpoint
¶ The LabStats REST API endpoint that represents this object
-
get_child_groups
(**kwargs)¶ Gets a list of Groups which are children of this Group
Returns: list of Group
-
get_stations
(status=None, limit=200, after_id=1, **kwargs)¶ Returns all Stations inside this group.
If this group contains groups, returns the status of all stations within the groups within this group. Recursively.
Parameters: - status – Filter based on the state of the machine. Valid values
are
"powered_on"
,"offline"
,"in_use"
, orNone
. - limit – See Limit
- after_id – See The After ID
Return type: list of
Station
Calls: /groups/{id}/stations
- status – Filter based on the state of the machine. Valid values
are
-
get_status
(**kwargs)¶ Returns the status of all stations inside this group.
If this group contains groups, returns the status of all stations within the groups within this group. Recursively.
Return type: GroupStatus
-
has_lab_features_enabled
= None¶ Whether Lab Features are enabled
-
id
= None¶ Integer unique identifier
-
name
= None¶ Human-readable group name
-
parent_group_id
= None¶ Identifier of the group containing this group
-
schedule_id
= None¶ Identifier of the Schedule assigned to this Group
-
GroupStatus¶
-
class
labstats_api.models.
GroupStatus
(offline, powered_on, in_use)¶ Represents the status of Stations in a Group.
-
offline
¶ Count of the stations which are have not checked in for a while, for example because they are off or asleep.
-
powered_on
¶ Count of the stations which are checking in but not in use.
-
in_use
¶ Count of the stations which are checking in and have an active user logged in.
-
Station¶
-
class
labstats_api.models.
Station
(requester, attributes)¶ Bases:
labstats_api.models.LabStatsObject
Represents a computer Station.
-
allow_student_routing
= None¶ Whether the LabFind app should allow users to navigate to this lab.
-
client_version
= None¶ Version of LabStats client
-
description
= None¶ Optional user-defined description
-
endpoint
¶ The LabStats REST API endpoint that represents this object
-
form_factor
= None¶ "Desktop"
or"Laptop"
-
get_apps
(limit=300, after_id=1, **kwargs)¶ Gets all the apps installed on this station.
Parameters: - limit – See Limit
- after_id – See The After ID
Returns: list of
Application
Calls: /stations/{id}/apps
-
get_metadata
(**kwargs)¶ Gets a list of
StationMetadataAttribute
for this Station.Return type: list of StationMetadataAttribute
Calls: /stations/{id}/metadata
-
get_status
(**kwargs)¶ Gets this station’s status, whether it’s on and in use.
Return type: StationStatus
Calls: /stations/{id}/status
-
group_id
= None¶ Group which this Station belongs to
-
host_name
= None¶ Network hostname.
Not necessarily the same as name. May be a FQDN or not depending on the client’s operating system or configuration.
-
id
= None¶ Unique identifier
-
ip_addresses
= None¶ List of IPv4 addresses currently granted
-
ip_v6_addresses
= None¶ List of IPv6 addresses currently granted
-
mac_addresses
= None¶ List of MAC addresses used by this station
-
manufacturer
= None¶ The machine’s detected manufacturer
-
model
= None¶ The machine’s detected model
-
name
= None¶ Human-readable machine name. Not necessarily the hostname!
-
operating_systems
= None¶ List of operating systems the machine has reported with.
An operating system dict looks like this:
{ "name": "windows", "version": "10.0.177653" }
A Station may have one or more operating systems, but the only supported ones are
"windows"
and"macos"
.
-
serial_number
= None¶ The machine’s detected serial number
-
subnets
= None¶ List of IPv4 subnet masks for ip_addresses
-
StationMetadataAttribute¶
-
class
labstats_api.models.
StationMetadataAttribute
(name, value, is_user_defined)¶ Represents a single attribute of extra or user-defined metadata on a Station.
-
name
¶ The name of the attribute, such as
"HardDisk_TotalBytes"
.
-
value
¶ The value contained by the attribute, such as
"250 GB"
.
-
is_user_defined
¶ A boolean value for whether this attribute was imported by the user or created by the LabStats client.
-
StationStatus¶
-
class
labstats_api.models.
StationStatus
¶ Represents whether a station is powered on and in use
-
in_use
= 'in_use'¶ The station is turned on and a user is actively using it
-
offline
= 'offline'¶ The station is turned off or is otherwise not checking in to LabStats
-
powered_on
= 'powered_on'¶ The station is turned on and has no active user
-
StationTagGroup¶
-
class
labstats_api.models.
StationTagGroup
(requester, name)¶ Represents a group of tags which may be applied to a Station
-
endpoint
¶ The endpoint which may be used to get this tag group
-
name
¶ Unique name. Also the unique identifier for the tag group.
The tags which this tag group contains
Calls: /stations/tags_groups/{tag_group}/tags
-