Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/jamf_school/mod.ts>DeviceGroup

A simple, secure, correct, and modern Jamf School API wrapper. (Unofficial)
Latest
interface DeviceGroup
Re-export
import { type DeviceGroup } from "https://deno.land/x/jamf_school@0.5.0/mod.ts";

DeviceGroup represents a named collection of devices.

Properties

readonly
type: "DeviceGroup"

Discriminator for type checks.

readonly
id: number

The Jamf-assigned ID of the device group.

readonly
name: string

The name of the device group.

readonly
description: string

A description of the structure or contents of the device group. This may be empty.

readonly
information: string

Additional relevant information. This may be empty.

readonly
imageUrl: string | null

The URL used for the device group image, or null if not set.

readonly
isSmart: boolean

Whether the group is a "smart group". Smart groups are assigned devices based on specific criteria. These criteria must be set in the web interface.

readonly
locationId: number

The ID of this device group's location.

readonly
count: number

The number of devices in this group.

readonly
isShared: boolean

Whether the device group is shared with all locations.

readonly
isClass: boolean

Whether the device group belongs to a class.

Methods

toJSON(): unknown

Return the data used to create this object.

toString(): string

The name of the device group.

update(): Promise<void>

(Read) Update this device group's data.

Other device groups created from the same data will not be updated.

getDevices(): Promise<Device[]>

(Read) Get all the devices in the device group.

getLocation(): Promise<Location | null>

(Read) Get the location this device group belongs to.

setName(name: string): Promise<void>

(Edit) Set this device group's name.

This method will not update the object. To update it, call DeviceGroup.update().

This method is a no-op if the name is the same as the device group's current name.

setDescription(text: string): Promise<void>

(Edit) Set this device group's description.

This method will not update the object. To update it, call DeviceGroup.update().

This method is a no-op if the description is the same as the device group's current description.

restartDevices(): Promise<void>

(Read, Add) Restart all the devices in this device group.

Note that failing to restart a device will not throw an exception.