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 |
GetDevice | Get /api/v1/devices/{device_id} | Get Device |
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 |
UpdateDevice | Patch /api/v1/devices/{device_id} | Update Device |
CancelLostMode(ctx, deviceId).Execute()
Cancel Lost Mode
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/MScottBlake/kandji-go-sdk"
)
func main() {
deviceId := "deviceId_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.DeviceInformationAPI.CancelLostMode(context.Background(), deviceId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceInformationAPI.CancelLostMode``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
deviceId | string |
Other parameters are passed through a pointer to a apiCancelLostModeRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeviceInformationGetDevice200Response GetDevice(ctx, deviceId).Execute()
Get Device
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/MScottBlake/kandji-go-sdk"
)
func main() {
deviceId := "deviceId_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceInformationAPI.GetDevice(context.Background(), deviceId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceInformationAPI.GetDevice``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDevice`: DeviceInformationGetDevice200Response
fmt.Fprintf(os.Stdout, "Response from `DeviceInformationAPI.GetDevice`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
deviceId | string |
Other parameters are passed through a pointer to a apiGetDeviceRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
DeviceInformationGetDevice200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeviceInformationGetDeviceActivity200Response GetDeviceActivity(ctx, deviceId).Limit(limit).Offset(offset).Execute()
Get Device Activity
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/MScottBlake/kandji-go-sdk"
)
func main() {
deviceId := "deviceId_example" // string |
limit := "300" // 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 := "0" // string | Specify the starting record to return (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceInformationAPI.GetDeviceActivity(context.Background(), deviceId).Limit(limit).Offset(offset).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceInformationAPI.GetDeviceActivity``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDeviceActivity`: DeviceInformationGetDeviceActivity200Response
fmt.Fprintf(os.Stdout, "Response from `DeviceInformationAPI.GetDeviceActivity`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
deviceId | string |
Other parameters are passed through a pointer to a apiGetDeviceActivityRequest struct via the builder pattern
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. | offset | string | Specify the starting record to return |
DeviceInformationGetDeviceActivity200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeviceInformationGetDeviceApps200Response GetDeviceApps(ctx, deviceId).Execute()
Get Device Apps
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/MScottBlake/kandji-go-sdk"
)
func main() {
deviceId := "deviceId_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceInformationAPI.GetDeviceApps(context.Background(), deviceId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceInformationAPI.GetDeviceApps``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDeviceApps`: DeviceInformationGetDeviceApps200Response
fmt.Fprintf(os.Stdout, "Response from `DeviceInformationAPI.GetDeviceApps`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
deviceId | string |
Other parameters are passed through a pointer to a apiGetDeviceAppsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
DeviceInformationGetDeviceApps200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeviceInformationGetDeviceDetails200Response GetDeviceDetails(ctx, deviceId).Execute()
Get Device Details
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/MScottBlake/kandji-go-sdk"
)
func main() {
deviceId := "deviceId_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceInformationAPI.GetDeviceDetails(context.Background(), deviceId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceInformationAPI.GetDeviceDetails``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDeviceDetails`: DeviceInformationGetDeviceDetails200Response
fmt.Fprintf(os.Stdout, "Response from `DeviceInformationAPI.GetDeviceDetails`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
deviceId | string |
Other parameters are passed through a pointer to a apiGetDeviceDetailsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
DeviceInformationGetDeviceDetails200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeviceInformationGetDeviceLibraryItems200Response GetDeviceLibraryItems(ctx, deviceId).Execute()
Get Device Library Items
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/MScottBlake/kandji-go-sdk"
)
func main() {
deviceId := "deviceId_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceInformationAPI.GetDeviceLibraryItems(context.Background(), deviceId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceInformationAPI.GetDeviceLibraryItems``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDeviceLibraryItems`: DeviceInformationGetDeviceLibraryItems200Response
fmt.Fprintf(os.Stdout, "Response from `DeviceInformationAPI.GetDeviceLibraryItems`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
deviceId | string |
Other parameters are passed through a pointer to a apiGetDeviceLibraryItemsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
DeviceInformationGetDeviceLibraryItems200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeviceInformationGetDeviceLostModeDetails200Response GetDeviceLostModeDetails(ctx, deviceId).Execute()
Get Device Lost Mode details
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/MScottBlake/kandji-go-sdk"
)
func main() {
deviceId := "deviceId_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceInformationAPI.GetDeviceLostModeDetails(context.Background(), deviceId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceInformationAPI.GetDeviceLostModeDetails``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDeviceLostModeDetails`: DeviceInformationGetDeviceLostModeDetails200Response
fmt.Fprintf(os.Stdout, "Response from `DeviceInformationAPI.GetDeviceLostModeDetails`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
deviceId | string |
Other parameters are passed through a pointer to a apiGetDeviceLostModeDetailsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
DeviceInformationGetDeviceLostModeDetails200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeviceInformationGetDeviceParameters200Response GetDeviceParameters(ctx, deviceId).Execute()
Get Device Parameters
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/MScottBlake/kandji-go-sdk"
)
func main() {
deviceId := "deviceId_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceInformationAPI.GetDeviceParameters(context.Background(), deviceId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceInformationAPI.GetDeviceParameters``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDeviceParameters`: DeviceInformationGetDeviceParameters200Response
fmt.Fprintf(os.Stdout, "Response from `DeviceInformationAPI.GetDeviceParameters`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
deviceId | string |
Other parameters are passed through a pointer to a apiGetDeviceParametersRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
DeviceInformationGetDeviceParameters200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeviceInformationGetDeviceStatus200Response GetDeviceStatus(ctx, deviceId).Execute()
Get Device Status
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/MScottBlake/kandji-go-sdk"
)
func main() {
deviceId := "deviceId_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceInformationAPI.GetDeviceStatus(context.Background(), deviceId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceInformationAPI.GetDeviceStatus``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDeviceStatus`: DeviceInformationGetDeviceStatus200Response
fmt.Fprintf(os.Stdout, "Response from `DeviceInformationAPI.GetDeviceStatus`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
deviceId | string |
Other parameters are passed through a pointer to a apiGetDeviceStatusRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
DeviceInformationGetDeviceStatus200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
map[string]interface{} ListDevices(ctx).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).Execute()
List Devices
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/MScottBlake/kandji-go-sdk"
)
func main() {
limit := "300" // 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 := "23245" // string | (optional)
blueprintId := "91f97957-2353-4f86-a1ab-64d2b044a596" // string | Return results "containing" the specified blueprint id (optional)
deviceId := "2cfeb3ac-3b5d-423e-bcff-e2676a3a32da" // string | (optional)
deviceName := "Johnny's MacBook Pro" // string | (optional)
filevaultEnabled := "true" // 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 := "00:0c:29:05:43:b6" // string | Search for a specific device by MAC address (optional)
model := "MacBook Air (M1, 2020)" // string | Return model results "containing" the specified model string. (optional)
ordering := "device_id" // 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 := "13.2.3" // string | Return all device records with the specified OS version (optional)
platform := "iPad" // string | Return all records matching a specific platform. Possible values:<code>Mac</code>, <code>iPad</code>, <code>iPhone</code>, <code>AppleTV</code> (optional)
serialNumber := "VMC5qeJ5pDkp" // 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 := "accuhive_01" // string | Return results for given tag name. Case sensitive. (optional)
tagNameIn := "accuhive_01, accuhive_02" // string | Return results for given tag names separate by commas. Case sensitive. (optional)
tagId := "tagId_example" // string | Search for a tag by its ID. Case sensitive. (optional)
tagIdIn := "tagIdIn_example" // string | Return results for given tag IDs separated by commas. Case sensitive. (optional)
user := "Art Vandelay" // string | Return results "containing" the user name (optional)
userEmail := "someUser@Kandji.io" // string | Return results "containing" search on email address (optional)
userId := "1" // string | "exact" match on kandji user ID number (optional)
userName := "Vandelay" // string | Return results "containing" the assigned user Display Name (optional)
offset := "0" // string | Specify the starting record to return (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceInformationAPI.ListDevices(context.Background()).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).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceInformationAPI.ListDevices``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListDevices`: map[string]interface{}
fmt.Fprintf(os.Stdout, "Response from `DeviceInformationAPI.ListDevices`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiListDevicesRequest struct via the builder pattern
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 | ||
blueprintId | string | Return results "containing" the specified blueprint id | |
deviceId | string | ||
deviceName | string | ||
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> | |
macAddress | string | Search for a specific device by MAC address | |
model | string | Return model results "containing" the specified model string. | |
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> | |
osVersion | string | Return all device records with the specified OS version | |
platform | string | Return all records matching a specific platform. Possible values:<code>Mac</code>, <code>iPad</code>, <code>iPhone</code>, <code>AppleTV</code> | |
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. | |
tagName | string | Return results for given tag name. Case sensitive. | |
tagNameIn | string | Return results for given tag names separate by commas. Case sensitive. | |
tagId | string | Search for a tag by its ID. Case sensitive. | |
tagIdIn | string | Return results for given tag IDs separated by commas. Case sensitive. | |
user | string | Return results "containing" the user name | |
userEmail | string | Return results "containing" search on email address | |
userId | string | "exact" match on kandji user ID number | |
userName | string | Return results "containing" the assigned user Display Name | |
offset | string | Specify the starting record to return |
map[string]interface{}
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeviceInformationUpdateDevice200Response UpdateDevice(ctx, deviceId).Body(body).Execute()
Update Device
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/MScottBlake/kandji-go-sdk"
)
func main() {
deviceId := "deviceId_example" // string |
body := "{"user":"5344c996-8823-4b37-8d6e-8515fc7c3a0a","asset_tag":"1040","blueprint_id":"be1a4d67-91d8-4d19-a927-c8be6e77b6b2","tags":["tag1","tag2","tag3","tag4","tag5"]}" // string | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DeviceInformationAPI.UpdateDevice(context.Background(), deviceId).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DeviceInformationAPI.UpdateDevice``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateDevice`: DeviceInformationUpdateDevice200Response
fmt.Fprintf(os.Stdout, "Response from `DeviceInformationAPI.UpdateDevice`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
deviceId | string |
Other parameters are passed through a pointer to a apiUpdateDeviceRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
body | string | |
DeviceInformationUpdateDevice200Response
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]