Skip to content

Latest commit

 

History

History
511 lines (363 loc) · 26.7 KB

DeviceInformationAPI.md

File metadata and controls

511 lines (363 loc) · 26.7 KB

DeviceInformationAPI

All URIs are relative to https://<sub_domain>.api.kandji.io

Method HTTP request Description
cancelLostMode DELETE /api/v1/devices/{device_id}/details/lostmode Cancel Lost Mode
getDeviceActivity GET /api/v1/devices/{device_id}/activity Get Device Activity
getDeviceApps GET /api/v1/devices/{device_id}/apps Get Device Apps
getDeviceDetails GET /api/v1/devices/{device_id}/details Get Device Details
getDeviceLibraryItems GET /api/v1/devices/{device_id}/library-items Get Device Library Items
getDeviceLostModeDetails GET /api/v1/devices/{device_id}/details/lostmode Get Device Lost Mode details
getDeviceParameters GET /api/v1/devices/{device_id}/parameters Get Device Parameters
getDeviceStatus GET /api/v1/devices/{device_id}/status Get Device Status
listDevices GET /api/v1/devices List Devices

cancelLostMode

    open class func cancelLostMode(deviceId: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void)

Cancel Lost Mode

This endpoint can be used to send a cancelation request if Lost Mode is in an error state for a given iOS or iPadOS device.

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import kandji_sdk

let deviceId = "deviceId_example" // String | 

// Cancel Lost Mode
DeviceInformationAPI.cancelLostMode(deviceId: deviceId) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
deviceId String

Return type

Void (empty response body)

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getDeviceActivity

    open class func getDeviceActivity(deviceId: String, limit: String, offset: String? = nil, completion: @escaping (_ data: AnyCodable?, _ error: Error?) -> Void)

Get Device Activity

This request returns the device activity for a specified Device ID.

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import kandji_sdk

let deviceId = "deviceId_example" // String | 
let limit = "limit_example" // String | A hard upper <code>limit</code> is set at 300 device records returned per request. If more device records are expected, pagination should be used using the <code>limit</code> and <code>offset</code> parameters. Additionally, parameter queries can be added to a request to limit the results.
let offset = "offset_example" // String | Specify the starting record to return (optional)

// Get Device Activity
DeviceInformationAPI.getDeviceActivity(deviceId: deviceId, limit: limit, offset: offset) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
deviceId String
limit String A hard upper <code>limit</code> is set at 300 device records returned per request. If more device records are expected, pagination should be used using the <code>limit</code> and <code>offset</code> parameters. Additionally, parameter queries can be added to a request to limit the results.
offset String Specify the starting record to return [optional]

Return type

AnyCodable

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getDeviceApps

    open class func getDeviceApps(deviceId: String, completion: @escaping (_ data: AnyCodable?, _ error: Error?) -> Void)

Get Device Apps

This request returns a list of all installed apps for a specified Device ID.

For iPhone and iPad, the preinstalled Apple apps are not reported.

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import kandji_sdk

let deviceId = "deviceId_example" // String | 

// Get Device Apps
DeviceInformationAPI.getDeviceApps(deviceId: deviceId) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
deviceId String

Return type

AnyCodable

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getDeviceDetails

    open class func getDeviceDetails(deviceId: String, completion: @escaping (_ data: AnyCodable?, _ error: Error?) -> Void)

Get Device Details

This request returns the device details for a specified Device ID.

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import kandji_sdk

let deviceId = "deviceId_example" // String | 

// Get Device Details
DeviceInformationAPI.getDeviceDetails(deviceId: deviceId) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
deviceId String

Return type

AnyCodable

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getDeviceLibraryItems

    open class func getDeviceLibraryItems(deviceId: String, completion: @escaping (_ data: AnyCodable?, _ error: Error?) -> Void)

Get Device Library Items

This request gets all library items and their statuses for a specified Device ID

Possible library item status values

Value Type Additional Info
AVAILABLE string Library item available in Self Service
CACHED string Library item downloaded for install but not yet installed
CHANGE_PENDING string Recovery Password library item has changes that have not yet been applied
DOWNLOADING string Library item downloading
ERROR string Audit failure
EXCLUDED string Not in scope for assignment rule
INCOMPATIBLE string Not compatible with device or OS version
INSTALLING string Library item installing
PASS string Device meets requirements
PENDING string Waiting on device, not yet installed (All library items except for config profiles)
failed string Configuration profile failed to install
pending string Waiting on device, Configuration profile not yet installed
success string Configuration profile installed

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import kandji_sdk

let deviceId = "deviceId_example" // String | 

// Get Device Library Items
DeviceInformationAPI.getDeviceLibraryItems(deviceId: deviceId) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
deviceId String

Return type

AnyCodable

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getDeviceLostModeDetails

    open class func getDeviceLostModeDetails(deviceId: String, completion: @escaping (_ data: AnyCodable?, _ error: Error?) -> Void)

Get Device Lost Mode details

This request returns the device lost mode details for a specified Device ID.

Note: Lost Mode is is only available for iOS and iPadOS. For more information, please see this Kandji support artilcle.

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import kandji_sdk

let deviceId = "deviceId_example" // String | 

// Get Device Lost Mode details
DeviceInformationAPI.getDeviceLostModeDetails(deviceId: deviceId) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
deviceId String

Return type

AnyCodable

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getDeviceParameters

    open class func getDeviceParameters(deviceId: String, completion: @escaping (_ data: AnyCodable?, _ error: Error?) -> Void)

Get Device Parameters

This request returns the parameters and their statuses for a specified Device ID

This endpoint is only applicable to macOS clients.

The parameters will be returned as a list of IDs. These IDs can be correlated with the parameter names available here: https://github.com/kandji-inc/support/wiki/Devices-API---Parameter-Correlations

Possible parameter status values

Value Type Additional Info
ERROR string Audit failure
INCOMPATIBLE string Not compatible with device or OS version
PASS string Device meets requirements
PENDING string Waiting on device. Not yet run.
REMEDIATED string Parameter remediated
WARNING string Muted alert

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import kandji_sdk

let deviceId = "deviceId_example" // String | 

// Get Device Parameters
DeviceInformationAPI.getDeviceParameters(deviceId: deviceId) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
deviceId String

Return type

AnyCodable

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getDeviceStatus

    open class func getDeviceStatus(deviceId: String, completion: @escaping (_ data: AnyCodable?, _ error: Error?) -> Void)

Get Device Status

This request returns the full status (parameters and library items) for a specified Device ID.

The parameters will be returned as a list of IDs. These IDs can be correlated with the parameter names available here: https://github.com/kandji-inc/support/wiki/Devices-API---Parameter-Correlations

Possible status values

Library items

Value Type Additional Info
AVAILABLE string Library item available in Self Service
ERROR string Audit failure
EXCLUDED string Not in scope for assignment rule
INCOMPATIBLE string Not compatible with device or OS version
PASS string Device meets requirements
PENDING string Waiting on device, not yet installed (All library items except for config profiles)
failed string Configuration profile failed to install
pending string Waiting on device, Configuration profile not yet installed
success string Configuration profile installed

Parameters

Value Type Additional Info
ERROR string Audit failure
INCOMPATIBLE string Not compatible with device or OS version
PASS string Device meets requirements
PENDING string Waiting on device. Not yet run.
REMEDIATED string Parameter remediated
WARNING string Muted alert

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import kandji_sdk

let deviceId = "deviceId_example" // String | 

// Get Device Status
DeviceInformationAPI.getDeviceStatus(deviceId: deviceId) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
deviceId String

Return type

AnyCodable

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listDevices

    open class func listDevices(limit: String, assetTag: String? = nil, blueprintId: String? = nil, deviceId: String? = nil, deviceName: String? = nil, filevaultEnabled: String? = nil, macAddress: String? = nil, model: String? = nil, ordering: String? = nil, osVersion: String? = nil, platform: String? = nil, serialNumber: String? = nil, tagName: String? = nil, tagNameIn: String? = nil, tagId: String? = nil, tagIdIn: String? = nil, user: String? = nil, userEmail: String? = nil, userId: String? = nil, userName: String? = nil, offset: String? = nil, completion: @escaping (_ data: AnyCodable?, _ error: Error?) -> Void)

List Devices

This request returns a list of devices in a Kandji tenant. Optionally. query parameters can be used to filter results.

There is a hard upper limit of 300 results per request. To return addtional results pagination must be used. Pagination examples can be found in the Kandji support GitHub.

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import kandji_sdk

let limit = "limit_example" // String | A hard upper <code>limit</code> is set at 300 device records returned per request. If more device records are expected, pagination should be used using the <code>limit</code> and <code>offset</code> parameters. Additionally, parameter queries can be added to a request to limit the results.
let assetTag = "assetTag_example" // String |  (optional)
let blueprintId = "blueprintId_example" // String | Return results &quot;containing&quot; the specified blueprint id (optional)
let deviceId = "deviceId_example" // String |  (optional)
let deviceName = "deviceName_example" // String |  (optional)
let filevaultEnabled = "filevaultEnabled_example" // String | <p>Query for devices that either have FileVault on (true) or off (false). This parameter only applies to macOS. </p> <p>An empty list <code>[]</code> will be returned if no devices are found with the given parameter value.</p> (optional)
let macAddress = "macAddress_example" // String | Search for a specific device by MAC address (optional)
let model = "model_example" // String | Return model results &quot;containing&quot; the specified model string. (optional)
let ordering = "ordering_example" // String | <p>The <code>ordering</code> parameter can be used to define how the device records are ordered in the response. Prepending a dash (-) to the parameter value will reverse the order of the returned results.</p> <p><code>?ordering=-serial_number</code> will order the response by serial_number in descending order.</p> <p><strong>Possible values</strong></p> <ul> <li><code>asset_tag</code></li> <li><code>blueprint_id</code></li> <li><code>device_id</code></li> <li><code>device_name</code></li> <li><code>last_check_in</code> - agent checkin</li> <li><code>model</code></li> <li><code>platform</code></li> <li><code>os_version</code></li> <li><code>serial_number</code></li> <li><code>user</code></li> </ul> <p>Additionally, multiple values can be combined in a comma separated list to further customize the ordering of the response.</p> <p><code>?ordering=serial_number,platform</code></p> (optional)
let osVersion = "osVersion_example" // String | Return all device records with the specified OS version (optional)
let platform = "platform_example" // String | Return all records matching a specific platform. Possible values:<code>Mac</code>, <code>iPad</code>, <code>iPhone</code>, <code>AppleTV</code> (optional)
let serialNumber = "serialNumber_example" // String | Search for a specific device by Serial Number. If partial serial number is provided in the query, all device containing the partial string will be returned. (optional)
let tagName = "tagName_example" // String | Return results for given tag name. Case sensitive. (optional)
let tagNameIn = "tagNameIn_example" // String | Return results for given tag names separate by commas. Case sensitive. (optional)
let tagId = "" // String | Search for a tag by its ID. Case sensitive. (optional)
let tagIdIn = "" // String | Return results for given tag IDs separated by commas. Case sensitive. (optional)
let user = "user_example" // String | Return results &quot;containing&quot; the user name (optional)
let userEmail = "userEmail_example" // String | Return results &quot;containing&quot; search on email address (optional)
let userId = "userId_example" // String | &quot;exact&quot; match on kandji user ID number (optional)
let userName = "userName_example" // String | Return results &quot;containing&quot; the assigned user Display Name (optional)
let offset = "offset_example" // String | Specify the starting record to return (optional)

// List Devices
DeviceInformationAPI.listDevices(limit: limit, assetTag: assetTag, blueprintId: blueprintId, deviceId: deviceId, deviceName: deviceName, filevaultEnabled: filevaultEnabled, macAddress: macAddress, model: model, ordering: ordering, osVersion: osVersion, platform: platform, serialNumber: serialNumber, tagName: tagName, tagNameIn: tagNameIn, tagId: tagId, tagIdIn: tagIdIn, user: user, userEmail: userEmail, userId: userId, userName: userName, offset: offset) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
limit String A hard upper <code>limit</code> is set at 300 device records returned per request. If more device records are expected, pagination should be used using the <code>limit</code> and <code>offset</code> parameters. Additionally, parameter queries can be added to a request to limit the results.
assetTag String [optional]
blueprintId String Return results &quot;containing&quot; the specified blueprint id [optional]
deviceId String [optional]
deviceName String [optional]
filevaultEnabled String <p>Query for devices that either have FileVault on (true) or off (false). This parameter only applies to macOS. </p> <p>An empty list <code>[]</code> will be returned if no devices are found with the given parameter value.</p> [optional]
macAddress String Search for a specific device by MAC address [optional]
model String Return model results &quot;containing&quot; the specified model string. [optional]
ordering String <p>The <code>ordering</code> parameter can be used to define how the device records are ordered in the response. Prepending a dash (-) to the parameter value will reverse the order of the returned results.</p> <p><code>?ordering=-serial_number</code> will order the response by serial_number in descending order.</p> <p><strong>Possible values</strong></p> <ul> <li><code>asset_tag</code></li> <li><code>blueprint_id</code></li> <li><code>device_id</code></li> <li><code>device_name</code></li> <li><code>last_check_in</code> - agent checkin</li> <li><code>model</code></li> <li><code>platform</code></li> <li><code>os_version</code></li> <li><code>serial_number</code></li> <li><code>user</code></li> </ul> <p>Additionally, multiple values can be combined in a comma separated list to further customize the ordering of the response.</p> <p><code>?ordering=serial_number,platform</code></p> [optional]
osVersion String Return all device records with the specified OS version [optional]
platform String Return all records matching a specific platform. Possible values:<code>Mac</code>, <code>iPad</code>, <code>iPhone</code>, <code>AppleTV</code> [optional]
serialNumber String Search for a specific device by Serial Number. If partial serial number is provided in the query, all device containing the partial string will be returned. [optional]
tagName String Return results for given tag name. Case sensitive. [optional]
tagNameIn String Return results for given tag names separate by commas. Case sensitive. [optional]
tagId String Search for a tag by its ID. Case sensitive. [optional]
tagIdIn String Return results for given tag IDs separated by commas. Case sensitive. [optional]
user String Return results &quot;containing&quot; the user name [optional]
userEmail String Return results &quot;containing&quot; search on email address [optional]
userId String &quot;exact&quot; match on kandji user ID number [optional]
userName String Return results &quot;containing&quot; the assigned user Display Name [optional]
offset String Specify the starting record to return [optional]

Return type

AnyCodable

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]