Skip to main content
Module

x/jamf_school/api.ts>APIGetDevicesOptions

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

Properties

optional
includeApps: boolean

Specify whether each device should include its apps in the response. Apps will not be included in the response unless this is true.

If you have a lot of devices with a lot of apps, this may substantially increase the size of the response. As such, on slow internet connections, this may cause the response to time out.

optional
serialNumber: string

Select a single device by its serial number (case insensitive). The serial number must be complete; it cannot be partial.

optional
assetTag: string

Select only devices that match a given asset tag.

{ assetTag: "admin" }
optional
modelIdentifier: AnyIdentifier

Select only devices that match the given model identifier.

{ modelIdentifier: "iPad11,6" }

Any string is valid, but not all strings are identifiers. If an invalid identifier is given, no devices will be returned. Currently known valid identifiers will be suggested in your editor.

optional
locationId: number

Select devices based on which location they have been assigned to.

{ locationId: 0 }
optional
groupIds: number[]

Select devices based on their groups. Devices that are in any of the groups will be returned.

{ groupIds: [0, 1] }
optional
ownerGroupIds: number[]

Select devices based on the user groups the device owner is in. Devices with an owner in any of the groups are returned.

{ ownerGroupIds: [0, 1, 2] }
optional
ownerId: number

Select devices that belong to this user.

{ ownerId: 36 }
optional
ownerName: string

Select devices that have an owner that matches this name. This name can be partial.

{ ownerName: "John" }
{ ownerName: "John Doe" }
optional
isOwned: boolean

Select only devices that have an owner assigned.

optional
isManaged: boolean

NOTE: Due to buggy API behaviour, it is better to filter the returned array instead of using this option.

const devices = await api.getDevices();
const managed = devices.filter((device) => device.isManaged);

Select based on each device's management status. If this option is omitted, both managed and unmanaged device will be returned.

Management relates to whether a device has checked in with Jamf School in the past 7 days, regardless of if it is supervised.

optional
isSupervised: boolean

Select based on each device's supervision status. If this option is omitted, both supervised and unsupervised devices will be returned.

Supervision relates to whether the MDM can remotely manage the device, such as installing apps and profiles (regardless of if it is managed).

optional
isTrashed: boolean

Select only trashed or untrashed devices.

NOTE: This doesn't seem to do anything, more investigation is needed.

optional
enrollmentType:
| "manual"
| "dep"
| "depPending"
| "ac2"
| "ac2Pending"

Select only devices with the given enrollment type.