All URIs are relative to https://<sub_domain>.api.kandji.io
| Method | HTTP request | Description |
|---|---|---|
| clear_passcode | POST /api/v1/devices/{device_id}/action/clearpasscode | Clear Passcode |
| delete_device | DELETE /api/v1/devices/{device_id} | Delete Device |
| delete_user | POST /api/v1/devices/{device_id}/action/deleteuser | Delete User |
| erase_device | POST /api/v1/devices/{device_id}/action/erase | Erase Device |
| get_device_commands | GET /api/v1/devices/{device_id}/commands | Get Device Commands |
| lock_device | POST /api/v1/devices/{device_id}/action/lock | Lock Device |
| perform_daily_checkin | POST /api/v1/devices/{device_id}/action/dailycheckin | Perform Daily Check-in |
| reinstall_agent | POST /api/v1/devices/{device_id}/action/reinstallagent | Reinstall Agent |
| remote_desktop | POST /api/v1/devices/{device_id}/action/remotedesktop | Remote Desktop |
| renew_mdm_profile | POST /api/v1/devices/{device_id}/action/renewmdmprofile | Renew MDM Profile |
| restart_device | POST /api/v1/devices/{device_id}/action/restart | Restart Device |
| send_blankpush | POST /api/v1/devices/{device_id}/action/blankpush | Send Blankpush |
| set_name | POST /api/v1/devices/{device_id}/action/setname | Set Name |
| shutdown | POST /api/v1/devices/{device_id}/action/shutdown | Shutdown |
| unlock_account | POST /api/v1/devices/{device_id}/action/unlockaccount | Unlock Account |
| update_inventory | POST /api/v1/devices/{device_id}/action/updateinventory | Update Inventory |
clear_passcode(device_id)
Clear Passcode
This endpoint sends an MDM command to clear a device passcode. Available for iPhone and iPad.
- Bearer (API Token) Authentication (bearer):
import kandji
from kandji.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://<sub_domain>.api.kandji.io
# See configuration.py for a list of all supported configuration parameters.
configuration = kandji.Configuration(
host = "https://<sub_domain>.api.kandji.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (API Token): bearer
configuration = kandji.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with kandji.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = kandji.DeviceActionsApi(api_client)
device_id = 'device_id_example' # str |
try:
# Clear Passcode
api_instance.clear_passcode(device_id)
except Exception as e:
print("Exception when calling DeviceActionsApi->clear_passcode: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| device_id | str |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | * Allow - * Connection - * Content-Length - * Content-Security-Policy - * Date - * Feature-Policy - * Referrer-Policy - * Server - * Strict-Transport-Security - * Vary - * X-Content-Type-Options - * X-Frame-Options - * X-XSS-Protection - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_device(device_id)
Delete Device
This endpoint deletes a device, which will remove the device record and unenroll the device from MDM.
For macOS and Windows devices, the agent will automatically uninstall on the next agent checkin.
- Bearer (API Token) Authentication (bearer):
import kandji
from kandji.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://<sub_domain>.api.kandji.io
# See configuration.py for a list of all supported configuration parameters.
configuration = kandji.Configuration(
host = "https://<sub_domain>.api.kandji.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (API Token): bearer
configuration = kandji.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with kandji.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = kandji.DeviceActionsApi(api_client)
device_id = 'device_id_example' # str |
try:
# Delete Device
api_instance.delete_device(device_id)
except Exception as e:
print("Exception when calling DeviceActionsApi->delete_device: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| device_id | str |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 204 | No Content | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_user(device_id, body=body)
Delete User
This endpoint sends an MDM command to delete a local user account on macOS and Shared iPad (Device Supervision via Automated Device Enrollment is required).
Request Body Parameters: application/json
DeleteAllUsers - boolean
ForceDeletion - boolean
UserName - string
- Bearer (API Token) Authentication (bearer):
import kandji
from kandji.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://<sub_domain>.api.kandji.io
# See configuration.py for a list of all supported configuration parameters.
configuration = kandji.Configuration(
host = "https://<sub_domain>.api.kandji.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (API Token): bearer
configuration = kandji.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with kandji.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = kandji.DeviceActionsApi(api_client)
device_id = 'device_id_example' # str |
body = {"DeleteAllUsers":false,"ForceDeletion":false,"UserName":"testuser"} # str | (optional)
try:
# Delete User
api_instance.delete_user(device_id, body=body)
except Exception as e:
print("Exception when calling DeviceActionsApi->delete_user: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| device_id | str | ||
| body | str | [optional] |
void (empty response body)
- Content-Type: application/json
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
erase_device(device_id, body=body)
Erase Device
This endpoint sends an MDM command to erase a device.
Request Body Parameters: application/json
| Key | Type | Description |
|---|---|---|
PIN |
string |
The six-character PIN for Find My. This value is available in macOS 10.8 and later. Note: This value will be ignored for iOS, iPadOS, and tvOS devices. |
PreserveDataPlan |
boolean |
If true, preserve the data plan on an iPhone or iPad with eSIM functionality, if one exists. This value is available in iOS 11 and later. Default: true |
DisallowProximitySetup |
boolean |
If true, disable Proximity Setup on the next reboot and skip the pane in Setup Assistant. This value is available in iOS 11 and later. Prior to iOS 14, don’t use this option with any other option. Default: false |
ReturnToService |
object |
(iOS 17 and later and iPadOS 17 and later and with Shared iPad ) When sending the erase device command to mobile devices, use this key to enable Return to Service. Include an optional Wi-Fi payload ProfileId to allow the device to connect to a Wi-Fi network automatically after being erased. If a Wi-Fi ProfileId is not provided and the mobile device is not tethered to a Mac to share the network connection, the end-user will be required to select a Wi-Fi network to complete the setup. If sent to any macOS computer or to mobile devices on iOS 16 or iPadOS 16 and below, the RTS keys will be ignored, and only the erase device command will be issued to the device. |
- Enabled |
boolean |
(Required) If true, the device tries to re-enroll itself automatically after erasure. The user needs to deactivate all activation locks for this feature to work correctly. |
- ProfileId |
string |
Profile ID value associated with a Wi-Fi profile payload. This is required when the device doesn’t have ethernet access. |
erase_mode |
string |
For Windows devices, the following modes are supported: WIPE - Equivalent to running Reset this PC > Remove everything from the Settings app, with Clean Data set to No and Delete Files set to Yes. WIPE_CLOUD - Perform a cloud-based remote wipe on the device. WIPE_PROTECTED - Performs a remote wipe on the device and fully cleans the internal drive. In some device configurations, this command may leave the device unable to boot. This is similar to WIPE but cannot be circumvented by power cycling the device. |
erase_flags |
string |
Optional erase options for Android devices, provided as a single comma separated list of the following strings: WIPE_EXTERNAL_STORAGE - Additionally wipe the device's external storage (such as SD cards). WIPE_ESIMS - For company-owned devices, this removes all eSIMs from the device when the device is wiped. Example value: WIPE_EXTERNAL_STORAGE,WIPE_ESIMS |
- Bearer (API Token) Authentication (bearer):
import kandji
from kandji.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://<sub_domain>.api.kandji.io
# See configuration.py for a list of all supported configuration parameters.
configuration = kandji.Configuration(
host = "https://<sub_domain>.api.kandji.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (API Token): bearer
configuration = kandji.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with kandji.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = kandji.DeviceActionsApi(api_client)
device_id = 'device_id_example' # str |
body = {"DisallowProximitySetup":false,"PIN":"123456","PreserveDataPlan":true,"ReturnToService":{"Enabled":false,"ProfileId":""}} # str | (optional)
try:
# Erase Device
api_instance.erase_device(device_id, body=body)
except Exception as e:
print("Exception when calling DeviceActionsApi->erase_device: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| device_id | str | ||
| body | str | [optional] |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Bad Request | * Content-Type - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeviceActionsGetDeviceCommands200Response get_device_commands(device_id, limit, offset=offset)
Get Device Commands
This endpoint sends a request to get information about the commands sent to a given Apple device.
1 : Command is Pending
2 : Command is running
3 : Command completed
4 : Command failed
5 : Command received "Not Now" response
- Bearer (API Token) Authentication (bearer):
import kandji
from kandji.models.device_actions_get_device_commands200_response import DeviceActionsGetDeviceCommands200Response
from kandji.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://<sub_domain>.api.kandji.io
# See configuration.py for a list of all supported configuration parameters.
configuration = kandji.Configuration(
host = "https://<sub_domain>.api.kandji.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (API Token): bearer
configuration = kandji.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with kandji.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = kandji.DeviceActionsApi(api_client)
device_id = 'device_id_example' # str |
limit = '300' # str | 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 = '' # str | Specify the starting record to return (optional)
try:
# Get Device Commands
api_response = api_instance.get_device_commands(device_id, limit, offset=offset)
print("The response of DeviceActionsApi->get_device_commands:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DeviceActionsApi->get_device_commands: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| device_id | str | ||
| limit | str | 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 | str | Specify the starting record to return | [optional] |
DeviceActionsGetDeviceCommands200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | * Content-Type - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeviceActionsLockDevice200Response lock_device(device_id, body=body)
Lock Device
This endpoint sends an MDM command to remotely lock an Apple or Android device.
For macOS clients, an unlock PIN will be created, and returned in the response.
Caution !!!
For a Mac with Apple silicon running a version of macOS before 11.5 will deactivate the Mac. To reactivate, the Mac requires a network connection and authentication by a Secure Token enabled local administrator.
Optionally, a JSON payload can be sent in the request to set a lock message and phone number on the target Mac.
Note: For macOS, although the lock message is displayed on all types of Mac computers, the phone number is displayed only on a Mac with Apple silicon.
| Property | Description | Type |
|---|---|---|
| PIN | Six digit pin code used to unlock a Mac. | String |
- Bearer (API Token) Authentication (bearer):
import kandji
from kandji.models.device_actions_lock_device200_response import DeviceActionsLockDevice200Response
from kandji.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://<sub_domain>.api.kandji.io
# See configuration.py for a list of all supported configuration parameters.
configuration = kandji.Configuration(
host = "https://<sub_domain>.api.kandji.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (API Token): bearer
configuration = kandji.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with kandji.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = kandji.DeviceActionsApi(api_client)
device_id = 'device_id_example' # str |
body = {"Message":"This device is locked!","PhoneNumber":"1234567890"} # str | (optional)
try:
# Lock Device
api_response = api_instance.lock_device(device_id, body=body)
print("The response of DeviceActionsApi->lock_device:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DeviceActionsApi->lock_device: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| device_id | str | ||
| body | str | [optional] |
DeviceActionsLockDevice200Response
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | * Allow - * Connection - * Content-Length - * Content-Security-Policy - * Content-Type - * Date - * Feature-Policy - * Referrer-Policy - * Server - * Strict-Transport-Security - * Vary - * X-Content-Type-Options - * X-Frame-Options - * X-XSS-Protection - |
| 400 | Bad Request | * Allow - * Connection - * Content-Length - * Content-Security-Policy - * Content-Type - * Date - * Feature-Policy - * Referrer-Policy - * Server - * Strict-Transport-Security - * Vary - * X-Content-Type-Options - * X-Frame-Options - * X-XSS-Protection - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
perform_daily_checkin(device_id)
Perform Daily Check-in
This endpoint runs the daily MDM commands and MDM logic for Apple devices and initiates a full daily CSP sync for Windows devices.
- Bearer (API Token) Authentication (bearer):
import kandji
from kandji.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://<sub_domain>.api.kandji.io
# See configuration.py for a list of all supported configuration parameters.
configuration = kandji.Configuration(
host = "https://<sub_domain>.api.kandji.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (API Token): bearer
configuration = kandji.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with kandji.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = kandji.DeviceActionsApi(api_client)
device_id = 'device_id_example' # str |
try:
# Perform Daily Check-in
api_instance.perform_daily_checkin(device_id)
except Exception as e:
print("Exception when calling DeviceActionsApi->perform_daily_checkin: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| device_id | str |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | * Allow - * Connection - * Content-Length - * Content-Security-Policy - * Date - * Feature-Policy - * Referrer-Policy - * Server - * Strict-Transport-Security - * Vary - * X-Content-Type-Options - * X-Frame-Options - * X-XSS-Protection - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
reinstall_agent(device_id)
Reinstall Agent
This endpoint sends an MDM command reinstall the Kandji Agent on macOS devices.
- Bearer (API Token) Authentication (bearer):
import kandji
from kandji.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://<sub_domain>.api.kandji.io
# See configuration.py for a list of all supported configuration parameters.
configuration = kandji.Configuration(
host = "https://<sub_domain>.api.kandji.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (API Token): bearer
configuration = kandji.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with kandji.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = kandji.DeviceActionsApi(api_client)
device_id = 'device_id_example' # str |
try:
# Reinstall Agent
api_instance.reinstall_agent(device_id)
except Exception as e:
print("Exception when calling DeviceActionsApi->reinstall_agent: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| device_id | str |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | * Allow - * Connection - * Content-Length - * Content-Security-Policy - * Date - * Feature-Policy - * Referrer-Policy - * Server - * Strict-Transport-Security - * Vary - * X-Content-Type-Options - * X-Frame-Options - * X-XSS-Protection - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
remote_desktop(device_id, body=body)
Remote Desktop
This endpoint sends an MDM command to control the Remote Management status on a Mac. This MDM command turns on (or turns off) Remote Management with Observe and Control permissions given to all users*.*
Request Body Parameters: application/json
EnableRemoteDesktop - boolean
- Bearer (API Token) Authentication (bearer):
import kandji
from kandji.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://<sub_domain>.api.kandji.io
# See configuration.py for a list of all supported configuration parameters.
configuration = kandji.Configuration(
host = "https://<sub_domain>.api.kandji.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (API Token): bearer
configuration = kandji.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with kandji.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = kandji.DeviceActionsApi(api_client)
device_id = 'device_id_example' # str |
body = {"EnableRemoteDesktop":true} # str | (optional)
try:
# Remote Desktop
api_instance.remote_desktop(device_id, body=body)
except Exception as e:
print("Exception when calling DeviceActionsApi->remote_desktop: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| device_id | str | ||
| body | str | [optional] |
void (empty response body)
- Content-Type: application/json
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
renew_mdm_profile(device_id)
Renew MDM Profile
This endpoint sends an MDM command to re-install the existing root MDM profile for a given Apple device. This command will not impact any existing configurations, apps, or profiles.
- Bearer (API Token) Authentication (bearer):
import kandji
from kandji.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://<sub_domain>.api.kandji.io
# See configuration.py for a list of all supported configuration parameters.
configuration = kandji.Configuration(
host = "https://<sub_domain>.api.kandji.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (API Token): bearer
configuration = kandji.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with kandji.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = kandji.DeviceActionsApi(api_client)
device_id = 'device_id_example' # str |
try:
# Renew MDM Profile
api_instance.renew_mdm_profile(device_id)
except Exception as e:
print("Exception when calling DeviceActionsApi->renew_mdm_profile: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| device_id | str |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
restart_device(device_id, body=body)
Restart Device
This endpoint sends an MDM command to remotely restart an iPhone, iPad, Apple TV, or Mac.
RebuildKernelCache- Iftrue, the system rebuilds the kernel cache during a device restart. IfBootstrapTokenAllowedForAuthenticationistrueinSecurityInfoResponse.SecurityInfo, the device requests the bootstrap token from MDM before executing this command. This value is available in macOS 11 and later. Default: falseNotifyUser- Iftrue, notifies the user to restart the device at their convenience. Forced restart if the device is atloginwindowwith no logged-in users. The user can dismiss the notification and ignore the request. No further notifications display unless you resend the command. This value is available in macOS 11.3 and later. Default: false
- Bearer (API Token) Authentication (bearer):
import kandji
from kandji.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://<sub_domain>.api.kandji.io
# See configuration.py for a list of all supported configuration parameters.
configuration = kandji.Configuration(
host = "https://<sub_domain>.api.kandji.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (API Token): bearer
configuration = kandji.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with kandji.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = kandji.DeviceActionsApi(api_client)
device_id = 'device_id_example' # str |
body = {"NotifyUser":false,"RebuildKernelCache":false} # str | (optional)
try:
# Restart Device
api_instance.restart_device(device_id, body=body)
except Exception as e:
print("Exception when calling DeviceActionsApi->restart_device: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| device_id | str | ||
| body | str | [optional] |
void (empty response body)
- Content-Type: application/json
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | * Allow - * Connection - * Content-Length - * Content-Security-Policy - * Date - * Feature-Policy - * Referrer-Policy - * Server - * Strict-Transport-Security - * Vary - * X-Content-Type-Options - * X-Frame-Options - * X-XSS-Protection - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
send_blankpush(device_id)
Send Blankpush
This endpoint sends an MDM command to initiate a blank push for an Apple device.
Using the Blank Push command
- Bearer (API Token) Authentication (bearer):
import kandji
from kandji.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://<sub_domain>.api.kandji.io
# See configuration.py for a list of all supported configuration parameters.
configuration = kandji.Configuration(
host = "https://<sub_domain>.api.kandji.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (API Token): bearer
configuration = kandji.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with kandji.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = kandji.DeviceActionsApi(api_client)
device_id = 'device_id_example' # str |
try:
# Send Blankpush
api_instance.send_blankpush(device_id)
except Exception as e:
print("Exception when calling DeviceActionsApi->send_blankpush: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| device_id | str |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | * Allow - * Connection - * Content-Length - * Content-Security-Policy - * Date - * Feature-Policy - * Referrer-Policy - * Server - * Strict-Transport-Security - * Vary - * X-Content-Type-Options - * X-Frame-Options - * X-XSS-Protection - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
set_name(device_id, body=body)
Set Name
This endpoint sends an MDM command to set the device name for an Apple device.
Request Body Parameters: application/json
DeviceName - string
- Bearer (API Token) Authentication (bearer):
import kandji
from kandji.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://<sub_domain>.api.kandji.io
# See configuration.py for a list of all supported configuration parameters.
configuration = kandji.Configuration(
host = "https://<sub_domain>.api.kandji.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (API Token): bearer
configuration = kandji.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with kandji.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = kandji.DeviceActionsApi(api_client)
device_id = 'device_id_example' # str |
body = {"DeviceName":"Test Mac Mini"} # str | (optional)
try:
# Set Name
api_instance.set_name(device_id, body=body)
except Exception as e:
print("Exception when calling DeviceActionsApi->set_name: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| device_id | str | ||
| body | str | [optional] |
void (empty response body)
- Content-Type: application/json
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | * Allow - * Connection - * Content-Length - * Content-Security-Policy - * Date - * Feature-Policy - * Referrer-Policy - * Server - * Strict-Transport-Security - * Vary - * X-Content-Type-Options - * X-Frame-Options - * X-XSS-Protection - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
shutdown(device_id)
Shutdown
This endpoint sends an MDM command to shutdown an iPhone, iPad, or Mac.
- Bearer (API Token) Authentication (bearer):
import kandji
from kandji.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://<sub_domain>.api.kandji.io
# See configuration.py for a list of all supported configuration parameters.
configuration = kandji.Configuration(
host = "https://<sub_domain>.api.kandji.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (API Token): bearer
configuration = kandji.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with kandji.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = kandji.DeviceActionsApi(api_client)
device_id = 'device_id_example' # str |
try:
# Shutdown
api_instance.shutdown(device_id)
except Exception as e:
print("Exception when calling DeviceActionsApi->shutdown: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| device_id | str |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | * Allow - * Connection - * Content-Length - * Content-Security-Policy - * Date - * Feature-Policy - * Referrer-Policy - * Server - * Strict-Transport-Security - * Vary - * X-Content-Type-Options - * X-Frame-Options - * X-XSS-Protection - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
unlock_account(device_id, body=body)
Unlock Account
This endpoint sends an MDM command to unlock a user account that locked by the system because of too many failed password attempts. Available for Mac.
Request Body Parameters: application/json
UserName - string
- Bearer (API Token) Authentication (bearer):
import kandji
from kandji.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://<sub_domain>.api.kandji.io
# See configuration.py for a list of all supported configuration parameters.
configuration = kandji.Configuration(
host = "https://<sub_domain>.api.kandji.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (API Token): bearer
configuration = kandji.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with kandji.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = kandji.DeviceActionsApi(api_client)
device_id = 'device_id_example' # str |
body = {"UserName":"LocalUserToUnlock"} # str | (optional)
try:
# Unlock Account
api_instance.unlock_account(device_id, body=body)
except Exception as e:
print("Exception when calling DeviceActionsApi->unlock_account: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| device_id | str | ||
| body | str | [optional] |
void (empty response body)
- Content-Type: application/json
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | * Allow - * Connection - * Content-Length - * Content-Security-Policy - * Date - * Feature-Policy - * Referrer-Policy - * Server - * Strict-Transport-Security - * Vary - * X-Content-Type-Options - * X-Frame-Options - * X-XSS-Protection - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
update_inventory(device_id)
Update Inventory
This endpoint runs the daily MDM commands and MDM logic for Apple devices.
Note: The newer dailycheckin endpoint can be used instead and also supports Windows devices.
- Bearer (API Token) Authentication (bearer):
import kandji
from kandji.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://<sub_domain>.api.kandji.io
# See configuration.py for a list of all supported configuration parameters.
configuration = kandji.Configuration(
host = "https://<sub_domain>.api.kandji.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (API Token): bearer
configuration = kandji.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with kandji.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = kandji.DeviceActionsApi(api_client)
device_id = 'device_id_example' # str |
try:
# Update Inventory
api_instance.update_inventory(device_id)
except Exception as e:
print("Exception when calling DeviceActionsApi->update_inventory: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| device_id | str |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | * Allow - * Connection - * Content-Length - * Content-Security-Policy - * Date - * Feature-Policy - * Referrer-Policy - * Server - * Strict-Transport-Security - * Vary - * X-Content-Type-Options - * X-Frame-Options - * X-XSS-Protection - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]