Devices

Devices

Devices Meta information

End Points
Get device list
Get device details
Update device details
Get device Summary
Get Device Certificates
Get device restrictions
Get FileVault details
Get firmware details
Get firmware password
Get device location
Get device location with address
Device Location Request
Get device profiles
Associate profiles to devices
Disassociate Profiles To Device
Get a details of profiles on device
Get Device Configuration Profiles
Get device app list
Associate apps to device
Dissociate apps from devices
Get a details of apps on the device
Refresh App Status For Device
Next poll time for the device
Get device applicable actions
Perform Action on device
Get Scan Status
Get Device Privacy
Execute command for bulk resources
Get command history for device
Get last initiated command status for device
Apply Knox actions to the device
Remove action

Attribute

device_id
string
Unique identifer of the device
os_version
string
The OS version
is_lost_mode_enabled
boolean
Specify whether Lost Mode is enabled on the device
owned_by
string
Specify whether the device is corporate or personally-owned
is_removed
string
(Deprecated field) is device removed from management
product_name
string
Name of the product
device_name
string
Name of the device
platform_type
string
Platform type of the device
platform_type_id
string
Platform type ID
udid
string
Device Unique ID
serial_number
string
Holds the device serial number
model
string
Device Unique Model ID
user
object
The user object details
Show Sub-Attributes arrow
user_name
string
The user name
user_id
string
The user ID
user_email
string
The user email address
imei
long
International Mobile Equipment Identity
summary
object
The Summary of the device
Show Sub-Attributes arrow
profile_count
string
Profiles count of the device
app_count
string
Apps count of the device
doc_count
string
Document count on the device
group_count
string
Groups count of the device

Example

[ { "device_id": 9007199254741000, "os_version": "8.0.0", "is_lost_mode_enabled": false, "owned_by": 2, "is_removed": false, "product_name": "samsung", "device_name": "admin_SM-G935F", "platform_type": "android", "platform_type_id": 2, "udid": "f8c4071d394ef48e", "serial_number": "2321bkbkqgidga1", "model": "SM-G935F", "user": { "user_name": "admin", "user_id": 9007199254741000, "user_email": "admin@zylker.com" }, "imei": 357327071694307, "summary": { "profile_count": 5, "app_count": 10, "doc_count": 1, "group_count": 2 } } ]

Get device list

Get a list of managed devices
oauthscope : MDMOnDemand.MDMInventory.READ

GET - /api/v1/mdm/devices

Query Parameters

include_all
To display all the devices accessible to the users
group_id
Filter based on group ID as a member of the group
exclude_removed
To exclude the removed, unmanaged, retired, old and repaired device
imei
Filter devices based on the IMEI number
owned_by
To filter based on device owned either corporate or personal :
  1. Corporate
  2. Personal
device_type
To filter based on comma separated device type :
  1. smartphone
  2. Tablet
  3. Laptop
  4. Desktop
  5. Tv
serial_number
To filter based on serial number
email
The email address of the assigned user
platform
comma separated platform type
  1. iOS
  2. Android
  3. Windows

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.in") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v1/mdm/devices", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.mdm.manageengine.in/api/v1/mdm/devices") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
curl --request GET \ --url https://www.mdm.manageengine.in/api/v1/mdm/devices \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 200 OK
{ "devices": [ { "device_id": 9007199254741000, "os_version": "8.0.0", "is_lost_mode_enabled": false, "owned_by": 2, "is_removed": false, "product_name": "samsung", "device_name": "admin_SM-G935F", "platform_type": "android", "platform_type_id": 2, "udid": "f8c4071d394ef48e", "serial_number": "2321bkbkqgidga1", "model": "SM-G935F", "user": { "user_name": "admin", "user_id": 9007199254741000, "user_email": "admin@zylker.com" }, "imei": 357327071694307, "summary": { "profile_count": 5, "app_count": 10, "doc_count": 1, "group_count": 2 } } ] }

Get device details

Get Device
oauthscope : MDMOnDemand.MDMInventory.READ

GET - /api/v1/mdm/devices/{device_id}

Query Parameters

summary
boolean(If true provide the summary details like profile_count, apps_count, doc_count and group_count)

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.in") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v1/mdm/devices/9007199254741000", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
curl --request GET \ --url https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000 \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 200 OK
{ "warranty_number": "SJSU64728372", "cellular_technology": 1, "used_device_space": 12.86491, "is_ios_native_app_registered": false, "warranty_expiration_date": 1530057600000, "purchase_order_number": "SR2Ik56779", "model": "SM-G935F", "available_external_capacity": 20.47, "available_ram_memory": 983, "owned_by": 2, "warranty_type": "WithService", "modem_firmware_version": "10.10.00", "purchase_price": 65000, "purchase_date": 1527984000000, "managed_status": 2, "network_usage": { "outgoing_network_usage": 0, "incoming_wifi_usage": 0, "device_id": 9007199254741000, "outgoing_wifi_usage": 0, "incoming_network_usage": 0 }, "sims": [ { "subscriber_carrier_network": "--", "iccid": 8991400912981718000, "is_roaming": true, "sim_id": 9508000000013204, "current_mnc": 40, "subscriber_mnc": 40, "current_carrier_network": "--", "resource_id": 9508000000013120, "imei": 357327071694307, "subscriber_mcc": "in", "current_mcc": "in" } ], "external_capacity": 29.82, "knox_details": { "container_state": -1, "container_remarks": null, "container_status": 20004, "container_last_updated_time": -1, "knox_version": 2 }, "asset_owner": "Sysadmin", "apn_password": null, "battery_level": 22, "is_itunes_account_active": true, "is_supervised": false, "serial_number": "2321bkbkqgidga1", "last_cloud_backup_date": -1, "agent_version_code": -1, "meid": "SM-G935F", "is_dnd_in_effect": false, "office": "North Plaza,CA", "apn_username": "zylker", "model_name": "hero2ltexx", "registered_time": 1540655566627, "purchase_type": "Reseller", "asset_tag": "TestDevice", "is_activation_lock_enabled": true, "available_device_capacity": 13.200405, "product_name": "samsung", "agent_type": 1, "is_device_locator_enabled": true, "device_capacity": 24.81, "added_time": 1523370360750, "eas_device_identifier": "QEGJKADSR14D1AEAA4F29FM0IC", "description": "Belong to Zoho Corp", "is_lost_mode_enabled": false, "network": { "outgoing_network_usage": 0, "incoming_wifi_usage": 0, "resource_id": 9508000000013120, "outgoing_wifi_usage": 0, "incoming_network_usage": 0 }, "device_name": "admin_SM-G935F", "security": { "passcode_complaint": false, "external_storage_encryption": -1, "storage_encryption": false, "hardware_encryption_caps": -1, "passcode_complaint_profiles": true, "device_rooted": false, "passcode_present": false }, "udid": "f8c4071d394ef48e", "summary": { "profile_count": 5, "app_count": 10, "doc_count": 1, "group_count": 2 }, "os": { "platform_type": "android", "build_version": "NRD90M", "os_version": "8.0.0", "resource_id": 9508000000013120, "serial_number": "2321bkbkqgidga1" }, "is_cloud_backup_enabled": false, "model_type": 1, "model_id": 9007199254740996, "total_ram_memory": 3533, "used_external_space": 25.38, "remarks": "The app is not compatible for this platform", "unregistered_time": -1 }

Update device details

Update the value of device details such as device name, asset tag etc. This will update the value of the device details only if the existing field values are not affected. To revert to the default values, provide the empty string and -1.
oauthscope : MDMOnDemand.MDMDeviceMgmt.CREATE

PUT - /api/v1/mdm/devices/{device_id}

Arguments

purchase_type
string
Purchase type of the device
warranty_number
string
Warranty number of the device
apn_password
string
To configure the APN password for the device.
asset_tag
string
Asset Tag information of the device
description
string
Description of the profile
office
string
Office of the device
warranty_type
string
Warranty type of the device
apn_username
string
To configure the APN Username for the device. Such that it can be used as dynamic variable in APN Payloads.
warranty_expiration_date
long
Warranty number of the device. This should be given in milliseconds.
name
string
Name of the device
purchase_price
long
Purchase price for the device
asset_owner
string
Asset Owner of the device
purchase_order_number
string
Purchase order number of the device
purchase_date
long
Purchase date for the device. This should be given in milliseconds.

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.in") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("PUT", "/api/v1/mdm/devices/9007199254741000", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000") .put(body) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
curl --request PUT \ --url https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000 \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "purchase_type": "Reseller", "warranty_number": "SJSU64728372", "apn_password": null, "asset_tag": "TestDevice", "description": "Belong to Zoho Corp", "office": "North Plaza,CA", "warranty_type": "WithService", "apn_username": "zylker", "warranty_expiration_date": 1530057600000, "name": "zylker iPhone", "purchase_price": 65000, "asset_owner": "Sysadmin", "purchase_order_number": "SR2Ik56779", "purchase_date": 1527984000000 }

Response Example

HTTP/1.1 200 OK
{ "meid": "SM-G935F", "warranty_number": "SJSU64728372", "cellular_technology": 1, "office": "North Plaza,CA", "apn_username": "zylker", "model_name": "hero2ltexx", "warranty_expiration_date": 1530057600000, "purchase_order_number": "SR2Ik56779", "model": "SM-G935F", "purchase_type": "Reseller", "available_external_capacity": 20.47, "asset_tag": "TestDevice", "available_ram_memory": 983, "warranty_type": "WithService", "product_name": "samsung", "modem_firmware_version": "10.10.00", "purchase_price": 65000, "purchase_date": 1527984000000, "device_capacity": 24.81, "sims": [ { "subscriber_carrier_network": "--", "iccid": 8991400912981718000, "is_roaming": true, "sim_id": 9508000000013204, "current_mnc": 40, "subscriber_mnc": 40, "current_carrier_network": "--", "resource_id": 9508000000013120, "imei": 357327071694307, "subscriber_mcc": "in", "current_mcc": "in" } ], "is_lost_mode_enabled": false, "description": "Belong to Zoho Corp", "managed_device_id": 9508000000013120, "network": { "outgoing_network_usage": 0, "incoming_wifi_usage": 0, "resource_id": 9508000000013120, "outgoing_wifi_usage": 0, "incoming_network_usage": 0 }, "external_capacity": 29.82, "security": { "passcode_complaint": false, "external_storage_encryption": -1, "storage_encryption": false, "hardware_encryption_caps": -1, "passcode_complaint_profiles": true, "device_rooted": false, "passcode_present": false }, "processor_speed": 1586000, "asset_owner": "Sysadmin", "udid": "f8c4071d394ef48e", "apn_password": null, "battery_level": 22, "os": { "platform_type": "android", "build_version": "NRD90M", "os_version": "8.0.0", "resource_id": 9508000000013120, "serial_number": "2321bkbkqgidga1" }, "model_type": 1, "total_ram_memory": 3533, "used_external_space": 25.38, "os_name": "Android" }

Get device Summary

Get device Summary
oauthscope : MDMOnDemand.MDMDeviceMgmt.READ

GET - /api/v1/mdm/devices/{device_id}/summary

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.in") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v1/mdm/devices/9007199254741000/summary", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/summary") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
curl --request GET \ --url https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/summary \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 200 OK
{ "agent_version": "9.2.432.A", "device_name": "admin_SM-G935F", "doc_count": 1, "device_id": 9007199254741000, "group_count": 2, "platform_type": "android", "last_contact_time": 1557128715277, "profile_count": 5, "app_count": 10, "group": [ { "group_id": 9007199254741632, "group_name": "Test group 1557134860919" } ] }

Get Device Certificates

Get Device Certificates
oauthscope : MDMOnDemand.MDMInventory.READ

GET - /api/v1/mdm/devices/{device_id}/certificates

Query Parameters

expiry
filter

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.in") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v1/mdm/devices/9007199254741000/certificates", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/certificates") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
curl --request GET \ --url https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/certificates \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 200 OK
{ "certificates": { "unmanagedcertificates": [ { "signaturealgorithmoid": "1.2.840.113549.1.1.11", "certificatename": "ManageEngineCA", "certificatesubjectname": "CN=ManageEngineCA, O=Zoho Corporation, OU=ManageEngine, ST=CA, C=US", "serialnumber": 5482640642439599000, "certificateexpiry": 4696305454000, "isidentity": false, "certificateissuername": "CN=ManageEngineCA, O=Zoho Corporation, OU=ManageEngine, ST=CA, C=US", "signaturealgorithmname": "SHA256withRSA" } ], "managedcertificates": [ { "signaturealgorithmoid": "1.2.840.113549.1.1.11", "certificatename": "ManageEngineCA", "certificatesubjectname": "CN=ManageEngineCA, O=Zoho Corporation, OU=ManageEngine, ST=CA, C=US", "serialnumber": 5482640642439599000, "certificateexpiry": 4696305454000, "isidentity": false, "certificateissuername": "CN=ManageEngineCA, O=Zoho Corporation, OU=ManageEngine, ST=CA, C=US", "signaturealgorithmname": "SHA256withRSA" } ] } }

Get device restrictions

Get Device Restrictions
oauthscope : MDMOnDemand.MDMInventory.READ

GET - /api/v1/mdm/devices/{device_id}/restrictions

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.in") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v1/mdm/devices/9007199254741000/restrictions", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/restrictions") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
curl --request GET \ --url https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/restrictions \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 200 OK
{ "allow_inapp_purchase": 0, "developer_unlock": 0, "allow_app_removal": 1, "allow_news": 0, "show_notification_center": 0, "allow_radio_service": 1, "allow_profile_installation": 0, "request_to_leave_classroom": 1, "allow_managed_book_sync": 0, "allow_bluetooth_modification": 1, "allow_use_of_ibookstore": 1, "allow_open_doc_in_managed": 1, "allow_diagnostic_submission": 1, "private_store_only": 0, "force_classroom_auto_join": 1, "allow_airprint_credential_storage": 0, "allow_explicit_content": 0, "allow_itunes": 0, "knox_restricions": { "browser_allow_fraud_warning": 1, "allow_safe_mode": -1, "allow_s_beam": -1, "allow_video_record": 1, "allow_other_keypad": 1, "allow_sdcard_move": -1, "allow_app_notification_mode": 1, "resource_id": 9508000000013120, "allow_whitelist_wifi_only": 0, "allow_roaming_sync": -1, "allow_wifi_tethering": -1, "allow_roaming_data": -1, "allow_camera": 1, "browser_allow_javascript": 1, "allow_user_mobile_data_limit": -1, "allow_emergency_calls_only": -1, "app_permission_policy": -1, "allow_usb_tethering": -1, "allow_usb": -1, "allow_lock_screen_view": -1, "allow_user_creation": -1, "allow_factory_reset": -1, "allow_google_account_auto_sync": 1, "allow_voice_dialer": -1, "allow_smart_clip_mode": -1, "allow_outgoing_call": -1, "allow_lock_screen_menu": -1, "allow_date_time_change": -1, "allow_roaming_push": -1, "allow_install_app": 1, "allow_user_profile": -1, "allow_incoming_call": -1, "allow_power_off": -1, "allow_usb_debug": -1, "allow_statusbar_expansion": -1, "allow_android_browser": 1, "allow_you_tube": -1, "browser_allow_popups": 1, "allow_activation_lock": -1, "allow_disabling_gps": 3, "allow_outgoing_mms": -1, "browser_allow_cookies": 1, "allow_user_add_accounts": -1, "device_admin_enabled": -1, "allow_home_key": -1, "allow_mock_location": -1, "allow_android_market": 0, "allow_bt_discoverable": -1, "allow_bluetooth_tethering": -1, "allow_roaming_voice_calls": -1, "allow_airplane_mode": -1, "allow_sharelist": 1, "allow_bt_outgoing_calls": -1, "allow_sms": -1, "allow_disabling_cellular_data": -1, "allow_uninstall_app": 1, "allow_nfc": -1, "allow_use_network_time": -1, "allow_contacts_outside": 1, "scope": 1, "allow_clipboard": -1, "allow_background_process_limit": -1, "allow_s_finder": -1, "allow_s_voice": 1, "allow_audio_record": 1, "allow_microphone": 1, "allow_stop_system_app": 1, "allow_ota_upgrade": -1, "allow_clipboard_share": 1, "allow_bluetooth": -1, "allow_usb_host_storage": -1, "allow_cellular_data": -1, "allow_sd_card": -1, "allow_google_maps": -1, "allow_gmail": -1, "allow_call": -1, "allow_incoming_sms": -1, "allow_bt_data_transfer": -1, "allow_headphone": -1, "allow_tethering": -1, "allow_firmware_recovery": -1, "allow_google_backup": -1, "allow_outgoing_sms": -1, "allow_air_view": -1, "allow_non_market_apps": -1, "browser_allow_autofill": 1, "allow_kill_activity_on_leave": -1, "allow_vpn": -1, "allow_bt_pairing": -1, "allow_usb_media_player": -1, "allow_sd_card_write": -1, "allow_android_beam": -1, "allow_air_command": -1, "allow_mms": -1, "allow_background_data": -1, "allow_knox_app_store": 1, "allow_settings": -1, "allow_wifi_direct": -1, "allow_google_crash_report": -1, "allow_developer_mode": -1, "allow_incoming_mms": -1, "allow_wallpaper_change": -1, "allow_screen_capture": 0, "allow_bt_pc_connection": -1, "allow_wifi": -1 }, "force_airprint_tls": 1, "ms_acc_connection": 1, "show_control_center": 1, "allow_airprint": 0, "apps_rating_value": "--", "allow_developer_tools": 1, "store_img_from_vision_search": 0, "safari_allow_popups": 1, "safari_allow_autofill": 0, "allow_autofill": 0, "force_airplay_outgoing_pwd": 0, "allow_sync_while_roaming": 1, "allow_ibookstore_erotica_media": 1, "allow_play_protect_monitoring": 2, "store": 1, "allow_airdrop": 0, "allow_modifi_wallpaper": 0, "anti_theft_mode": 1, "smartscreen_files": 0, "trusted_apps_install": 1, "force_istore_pwd_entry": 0, "allow_predictive_keyboard": 0, "allow_cloud_backup": 1, "allow_camera_in_keyguard": 0, "allow_keyguard_notifications": 0, "edit_device_name": 1, "copy_paste": 0, "allow_smartscreen": 0, "allow_assistant": 1, "allow_untrust_tls_prompt": 0, "dev_encrypt": 0, "force_limited_ad_tracking": 0, "allow_find_my_friends_mod": 1, "sync_my_settings": 0, "allow_cloud_keychain_sync": 0, "toast": 0, "allow_podcasts": 1, "allow_dictation": 1, "force_watch_wrist_detect": 1, "allow_password_sharing": 1, "allow_personal_space_non_market_apps": 1, "allow_multiplayer_gameing": 0, "allow_shared_stream": 0, "allow_photo_stream": 1, "remove_prov_package": 0, "allow_spellcheck": 1, "add_prov_package": 1, "allow_address_bar_dropdown": 1, "allow_password_proximity": 0, "app_store_auto_update": 0, "bluetooth_prepairing": 1, "vpn": 1, "wifi_hotspot_reporting": 0, "allow_modifi_device_name": 1, "screen_capture": 0, "location": 1, "force_airplay_incoming_pwd": 0, "allow_face_time": 0, "allow_popups": 0, "allow_extensions": 0, "action_center_notifications": 1, "allow_donot_track": 1, "allow_diag_sub_modification": 0, "allow_host_pairing": 1, "allow_searchsuggest": 1, "allow_managed_book_backup": 1, "force_date_time": 1, "allow_keyboard_shortcut": 0, "wifi": 1, "allow_adding_game_friends": 0, "allow_managed_write_unmanaged_contact": 1, "allow_assist_when_locked": 0, "allow_game_center": 1, "allow_app_cellular_data": 1, "vpn_roaming": 1, "allow_backup_restore": 1, "allow_classroom_remoteview": 0, "force_wifi_whitelisting": 1, "telemetry": 1, "user_reset_phone": 0, "allow_open_doc_in_unmanaged": 1, "search_use_location": 1, "save_as_of_office_files": 1, "manual_mdm_unenrollment": 0, "allow_app_installation": 1, "run_flash_automatically": 0, "sd_card": 1, "allow_modifi_passcode": 0, "allow_touch_id": 0, "allow_music_service": 0, "allow_activity_continuation": 1, "allow_dictionary_lookup": 0, "allow_enabling_restriction": 1, "allow_unmanaged_read_managed_contact": 0, "camera": 1, "share_office_files": 0, "bluetooth_advertising": 1, "allow_passbook_when_locked": 0, "allow_safari": 0, "allow_erase_content_settings": 0, "allow_passmgr": 0, "allow_proximity_for_newdevice": 1, "allow_flash": 1, "allow_modify_touch_id": 0, "auto_connect_to_wifi_hotspot": 0, "net_sharing": 0, "allow_auto_app_download": 1, "force_classroom_appdevicelock": 1, "usb": 0, "allow_cloud_photo_lib": 0, "cortana": 1, "allow_imessage": 0, "allow_assistant_user_content": 0, "allow_cookies": 1, "safari_allow_java_script": 0, "date_time": 1, "allow_usb_restriction_mode": 1, "show_today_view": 1, "safe_search_permissions": 1, "authenticate_before_autofill": 0, "manual_root_cert_install": 1, "safari_force_fraud_warning": 1, "fips_policy": 1, "allow_vpn_creation": 1, "allow_spotlight_result": 1, "clear_browsing_data_exit": 0, "tv_shows_rating_value": "--", "allow_voice_recording": 0, "limit_appdata_to_sys_vol": 0, "allow_managed_app_trust": 0, "allow_voice_dialing": 0, "movies_rating_value": "--", "allow_password_autofill": 0, "data_roaming": 0, "force_assist_profanity_filter": 0, "allow_ota_pki_updates": 1, "ms_feedback_notif": 0, "allow_paired_watch": 1, "browser": 1, "safari_accept_cookies": 1, "allow_keyguard_trust_agents": 0, "manual_wifi_config": 1, "force_airdrop_unmanaged": 0, "limit_appinstall_to_sys_vol": 1, "about_flags_access": 1, "allow_auto_correction": 1, "vpn_setting": 1, "allow_inprivate": 1, "smartscreen_prompt": 1, "bluetooth_discoverable": 1, "cellular_data": 0, "allow_cloud_document_sync": 0, "bluetooth": 0, "allow_airprint_ibeacon_discovery": 1, "allow_managed_app_cloud_sync": 1, "non_ms_acc": 0, "force_classroom_remoteview": 1, "allow_account_modification": 0, "force_encrypted_backup": 0 }

Get FileVault details

Get FileVault details of the device
oauthscope : MDMOnDemand.MDMInventory.READ

GET - /api/v1/mdm/devices/{device_id}/filevault

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.in") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v1/mdm/devices/9007199254741000/filevault", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/filevault") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
curl --request GET \ --url https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/filevault \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 200 OK
{ "filevault": { "filevault_status": 10, "is_institution_recovery_key": true, "is_personal_recovery_key": true, "resource_id": 9508000000013120, "is_encryption_enabled": false } }

Get firmware details

Get Firmware details of the Mac machine
oauthscope : MDMOnDemand.MDMInventory.READ

GET - /api/v1/mdm/devices/{device_id}/firmware

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.in") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v1/mdm/devices/9007199254741000/firmware", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/firmware") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
curl --request GET \ --url https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/firmware \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 200 OK
{ "is_firmware_change_pending": false, "is_roms_allowed": false, "is_firmware_password_exists": false, "firmware_mode": 1, "managed_password_id": -1 }

Get firmware password

Get firmware password
oauthscope : MDMOnDemand.MDMInventory.READ

GET - /api/v1/mdm/devices/{device_id}/firmware/password

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.in") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v1/mdm/devices/9007199254741000/firmware/password", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/firmware/password") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
curl --request GET \ --url https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/firmware/password \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 200 OK
{ "firmware_password": "SampleFirmwarePassword@123", "resource_id": 9508000000013120 }

Get device location

Get the details of device location
oauthscope : MDMOnDemand.MDMInventory.READ

GET - /api/v1/mdm/devices/{device_id}/locations

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.in") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v1/mdm/devices/9007199254741000/locations", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/locations") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
curl --request GET \ --url https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/locations \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 200 OK
{ "locations": [ { "added_time": 1523370360750, "latitude": 12.8282, "longitude": 80.0512, "located_time": 1523370128573 } ] }

Get device location with address

Get result of the location with address requests submitted via POST method
oauthscope : MDMOnDemand.MDMInventory.READ

GET - /api/v1/mdm/devices/{device_id}/locations_with_address

Query Parameters

export_batch_id
Batch ID returned for location with address post request. Check POST request below.
id
ID of the managed device

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.in") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v1/mdm/devices/9007199254741000/locations_with_address", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/locations_with_address") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
curl --request GET \ --url https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/locations_with_address \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 200 OK
{ "locations": [ { "added_time": 1523370360750, "latitude": 12.8282, "longitude": 80.0512, "located_time": 1523370128573, "address": "Zoho Corporation Pvt Ltd, Estancia, Chennai" } ] }

Device Location Request

Request for the location of the device with address details (by default last 3 days information is provided in professional edition and last known location in standard edition)
oauthscope : MDMOnDemand.MDMInventory.CREATE

POST - /api/v1/mdm/devices/{device_id}/locations_with_address

Arguments

id
long
ID of the managed device
no_of_days
integer
Specify the number of days to retain location details. Default set to 3
from
long
Start date and time in milliseconds from where the location data for the device should be fetched
to
long
End date and time in milliseconds till when the location data for the device should be fetched

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.in") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/api/v1/mdm/devices/9007199254741000/locations_with_address", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/locations_with_address") .post(body) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
curl --request POST \ --url https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/locations_with_address \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "id": 9007199254741000, "no_of_days": 7, "from": 1522066653883, "to": 1557128715277 }

Response Example

HTTP/1.1 200 OK
{ "export_batch_id": 900234566788909, "wait": 500, "status": "SCHEDULED" }

Get device profiles

Get the list of profiles installed on the device
oauthscope : MDMOnDemand.MDMInventory.READ

GET - /api/v1/mdm/devices/{device_id}/profiles

Query Parameters

summary
The summary details if needed

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.in") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v1/mdm/devices/9007199254741000/profiles", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/profiles") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
curl --request GET \ --url https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/profiles \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 200 OK
{ "profiles": [ { "profile_id": 12354, "profile_name": "Test Profile", "status": "SCHEDULED", "remarks": "The app is not compatible for this platform", "localized_remarks": "Applied", "profile_description": "Test Profile", "applied_time": 1232132131, "group_count": 2, "device_count": 2, "created_user": "admin", "created_time": 2313123123, "last_modified_user": "admin", "last_modified_time": 1231231231, "platform_type": "android" } ] }

Associate profiles to devices

Associate profiles to devices
oauthscope : MDMOnDemand.MDMDeviceMgmt.CREATE

POST - /api/v1/mdm/devices/{device_id}/profiles

Arguments

profile_ids
string
(Required)
List of IDs of apps to be distributed

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.in") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/api/v1/mdm/devices/9007199254741000/profiles", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/profiles") .post(body) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
curl --request POST \ --url https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/profiles \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "profile_ids": [ 1 ] }

Response Example

HTTP/1.1 204 No Content

Disassociate Profiles To Device

Disassociate profiles from devices
oauthscope : MDMOnDemand.MDMDeviceMgmt.DELETE

DELETE - /api/v1/mdm/devices/{device_id}/profiles

Arguments

profile_ids
string
(Required)
List of IDs of apps to be distributed

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.in") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("DELETE", "/api/v1/mdm/devices/9007199254741000/profiles", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/profiles") .delete(body) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
curl --request DELETE \ --url https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/profiles \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "profile_ids": [ 1 ] }

Response Example

HTTP/1.1 204 No Content

Get a details of profiles on device

Get a details of profiles associated to the device
oauthscope : MDMOnDemand.MDMInventory.READ

GET - /api/v1/mdm/devices/{device_id}/profiles/{profile_id}

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.in") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v1/mdm/devices/9007199254741000/profiles/12354", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/profiles/12354") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
curl --request GET \ --url https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/profiles/12354 \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 200 OK
{ "created_time": 2313123123, "last_modified_user": "admin", "last_modified_time": 1231231231, "created_user": "admin", "associated_by_user_name": "admin", "remark": "Executed Successfully", "applied_time": 1232132131, "profile_description": "Test Profile", "associated_by_user_id": 1, "localized_remarks": "Applied", "profile_name": "Test Profile", "platform_type": "android", "latest_version": 5, "executed_version": 1, "profile_id": 12354, "associated_on": 1522066653883, "status": "SCHEDULED" }

Get Device Configuration Profiles

Returns all installed configuration profiles from the device. The list includes both user installed and MDM-installed profiles.
oauthscope : MDMOnDemand.MDMInventory.READ

GET - /api/v1/mdm/devices/{device_id}/configurationprofiles

Query Parameters

payload_identifier
To get the specific payload identifier
installed_source
Installed source of the profile. 1- MDM Installed 0 - User installed

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.in") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v1/mdm/devices/9007199254741000/configurationprofiles", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/configurationprofiles") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
curl --request GET \ --url https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/configurationprofiles \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 200 OK
{ "configuration_profiles": [ { "payload_uuid": "unknown-uuid", "payload_identifier": "com.apple.applebetasoftware", "payload_description": "No description available", "payload_organization": "Unknown", "payload_type": "com.apple.defaults.managed", "payload_version": 1, "payload_has_rem_password": false, "payload_is_encrypted": false, "payload_display_name": "iOS Configuration Payload", "payload_unremovable": false, "payloadcontent": [ { "payload_uuid": "unknown-uuid", "payload_identifier": "com.apple.applebetasoftware", "payload_description": "No description available", "payload_organization": "Unknown", "payload_type": "com.apple.defaults.managed", "payload_version": 1, "payload_display_name": "iOS Configuration Payload" } ] } ] }

Get device app list

Get the list of apps installed on the device
oauthscope : MDMOnDemand.MDMInventory.READ

GET - /api/v1/mdm/devices/{device_id}/apps

Query Parameters

include
Include the apps details
  • details

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.in") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v1/mdm/devices/9007199254741000/apps", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/apps") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
curl --request GET \ --url https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/apps \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 200 OK
{ "installed_apps": [ { "release_label_details": { "release_label_name": "Production", "release_label_id": 90086789628394940 }, "app_version": "0.1.187945513", "platform_type": "android", "identifier": "com.google.android.apps.googleassistant", "app_name": "Red Ball 4 (Ad Supported)", "app_id": 9007199254740996, "app_version_code": 187945513 } ], "release_label_details": { "release_label_name": "Production", "release_label_id": 90086789628394940 }, "apps": [ { "app_version": "0.1.187945513", "app_version_code": 187945513, "platform_type": "android", "identifier": "com.google.android.apps.googleassistant", "app_name": "Red Ball 4 (Ad Supported)", "app_id": 9007199254740996, "added_time": 1523370360750, "modified_time": 1231231231, "platform": 2, "icon": "https://zylker.com/icon.png" } ] }

Associate apps to device

Associate apps to devices
oauthscope : MDMOnDemand.MDMDeviceMgmt.CREATE

POST - /api/v1/mdm/devices/{device_id}/apps

Arguments

invite_user
boolean
(Required)
Send enrollment request to user if device not present (only user groups)
do_not_uninstall
boolean
(Required)
Restrict app uninstallation
id
long
ID of the managed device
app_details
array
(Required)
List of apps to be distributed
Show Sub-Attributes arrow
app_id
string
The app id
release_label_id
string
Release label ID
notify_user_via_email
boolean
(Required)
Notify user via email when a new app is pushed
silent_install
boolean
(Required)
Should app be installed silently if possible

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.in") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/api/v1/mdm/devices/9007199254741000/apps", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/apps") .post(body) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
curl --request POST \ --url https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/apps \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "invite_user": true, "do_not_uninstall": true, "id": 9007199254741000, "app_details": [ { "app_id": 9007199254740996, "release_label_id": 90086789628394940 } ], "notify_user_via_email": true, "silent_install": true }

Response Example

HTTP/1.1 204 No Content

Dissociate apps from devices

Dissociate apps from devices
oauthscope : MDMOnDemand.MDMDeviceMgmt.DELETE

DELETE - /api/v1/mdm/devices/{device_id}/apps

Arguments

app_ids
string
(Required)
List of IDs of apps to be distributed

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.in") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("DELETE", "/api/v1/mdm/devices/9007199254741000/apps", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/apps") .delete(body) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
curl --request DELETE \ --url https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/apps \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "app_ids": [ 1, 2, 3 ] }

Response Example

HTTP/1.1 204 No Content

Get a details of apps on the device

Get a details of app on the device distributed through MDM
oauthscope : MDMOnDemand.MDMInventory.READ

GET - /api/v1/mdm/devices/{device_id}/apps/{app_id}

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.in") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v1/mdm/devices/9007199254741000/apps/9007199254740996", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/apps/9007199254740996") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
curl --request GET \ --url https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/apps/9007199254740996 \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 200 OK
{ "islatestver": true, "localized_remark": "--", "app_type": 1, "app_category_name": "Games", "is_paid_app": false, "app_name": "Red Ball 4 (Ad Supported)", "release_label_details": { "release_label_name": "Production", "release_label_id": 90086789628394940 }, "platform_type": "android", "latest_version": 5, "executed_version": 1, "associated_by": "admin", "app_id": 9007199254740996, "associated_on": 1522066653883, "remarks": "The app is not compatible for this platform", "status": "SCHEDULED" }

Refresh App Status For Device

Refresh app status for device
oauthscope : MDMOnDemand.MDMDeviceMgmt.CREATE

POST - /api/v1/mdm/devices/{device_id}/apps/refreshstatus

Arguments

app_ids
string
(Required)
List of IDs of apps to be distributed

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.in") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/api/v1/mdm/devices/9007199254741000/apps/refreshstatus", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/apps/refreshstatus") .post(body) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
curl --request POST \ --url https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/apps/refreshstatus \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "app_ids": [ 1, 2, 3 ] }

Response Example

HTTP/1.1 204 No Content

Next poll time for the device

Returns next poll time for the device
oauthscope : MDMOnDemand.MDMInventory.READ

GET - /api/v1/mdm/devices/{device_id}/polltime

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.in") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v1/mdm/devices/9007199254741000/polltime", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/polltime") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
curl --request GET \ --url https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/polltime \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 200 OK
{ "next_poll_time": 1542869208225 }

Get device applicable actions

Get Applicable actions for the device
oauthscope : MDMOnDemand.MDMInventory.READ

GET - /api/v1/mdm/devices/{device_id}/actions

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.in") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v1/mdm/devices/9007199254741000/actions", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/actions") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
curl --request GET \ --url https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/actions \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 200 OK
{ "knox_actions": [ { "is_enabled": true, "localized_name": "Create container", "name": "zylker iPhone", "localized_action_info": "--", "action_info": "--" } ], "actions": [ { "is_enabled": true, "localized_name": "Create container", "name": "zylker iPhone", "localized_action_info": "--", "status_code": 2, "action_info": "--", "localized_status_description": "Command Initiated", "status_description": "Command Success" } ] }

Perform Action on device

Apply action to the device

POST - /api/v1/mdm/devices/{device_id}/actions/{action_name}

Arguments

send_email_to_user
boolean
A message for audit purposes when enabling lost mode
lock_message
string
A message for audit purposes when enabling lost mode
clear_data_for_all_apps
boolean
Clear all app data
re_enter_time
long
Specify the duration after which Kiosk Mode should be re-enabled.
email_sent_to_user
boolean
Email sent to the admin. Required field for reset_password
email_sent_to_admin
boolean
Email sent to the admin. Required field for reset_password
wipe_but_retain_mdm
boolean
Specify whether the device should be completely wiped by management should be retained. Optional field for complete wipe
description
string
Description of the profile
wipe_sd_card
boolean
Specify whether the device should be completely wiped by management should be retained. Optional field for complete wipe
audit_message
string
A message for audit purposes when enabling lost mode
ticket_id
string
A message for audit purposes when enabling lost mode
unlock_pin
string
A message for audit purposes when enabling lost mode
inclusion
boolean
Determines whether to include/exclude the listed app_ids(required field for clear_app_data if clear_data_for_all_apps is false)
action_name
string
(Required)
Name of the action :
  • scan
  • lock
  • remote_control
  • remote_view
  • remote_alarm
  • complete_wipe
  • corporate_wipe
  • clear_passcode
  • reset_passcode
  • fetch_location
  • shutdown
  • restart
  • enable_lost_mode
  • disable_lost_mode
  • pause_kiosk
  • re_apply_kiosk
  • remote_debug
  • unlock_user_account
phone_number
string
Holds the phone number of the managed user. A message for audit purposes will be displayed when enabling lost mode
wipe_lock_pin
string
Specify whether the device should be completely wiped by management should be retained. Optional field for complete wipe
passcode
string
Email sent to the admin. Required field for reset_password
retry
boolean
To retry the remote debug command - required field for remote_debug
remarks
string
The remarks for the App associated to the group
email_address_list
string
The email address list. Required field for remote_debug when retry is set to false

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.in") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/api/v1/mdm/devices/9007199254741000/actions/scan", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/actions/scan") .post(body) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
curl --request POST \ --url https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/actions/scan \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "send_email_to_user": true, "lock_message": "--", "clear_data_for_all_apps": false, "re_enter_time": 3600000, "email_sent_to_user": true, "email_sent_to_admin": true, "wipe_but_retain_mdm": true, "description": "Belong to Zoho Corp", "wipe_sd_card": true, "audit_message": "--", "ticket_id": "--", "unlock_pin": "--", "inclusion": true, "action_name": "scan", "phone_number": "+91 987*****00", "wipe_lock_pin": 123456, "passcode": 123456, "retry": true, "remarks": "The app is not compatible for this platform", "email_address_list": "--" }

Response Example

HTTP/1.1 202 Accepted

Get Scan Status

Gets last scan status for device
oauthscope : MDMOnDemand.MDMInventory.READ

GET - /api/v1/mdm/devices/{device_id}/scan

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.in") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v1/mdm/devices/9007199254741000/scan", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/scan") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
curl --request GET \ --url https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/scan \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 200 OK
{ "status_description": "Command Success", "status_code": 2, "kb_url": "https://zylker.com/kb" }

Get Device Privacy

Get Device Privacy
oauthscope : MDMOnDemand.MDMInventory.READ

GET - /api/v1/mdm/devices/{device_id}/privacy

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.in") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v1/mdm/devices/9007199254741000/privacy", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/privacy") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
curl --request GET \ --url https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/privacy \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 200 OK
{ "fetch_location": 0, "view_privacy_settings": true, "disable_wipe": 0, "fetch_device_name": 0, "fetch_installed_app": 0, "disable_bug_report": 2, "applicable_for": [ 1, 2 ], "disable_remote_control": 1, "fetch_phone_number": 0 }

Execute command for bulk resources

Execute bulk device commands

POST - /api/v1/mdm/actions/{command_name}

Arguments

devices
array
(Required)
Array of device IDs
command_name
string
(Required)
Name of last command invoked
groups
string
(Required)
List of groups for which command has to been executed

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.in") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/api/v1/mdm/actions/AssetScan", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://www.mdm.manageengine.in/api/v1/mdm/actions/AssetScan") .post(body) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
curl --request POST \ --url https://www.mdm.manageengine.in/api/v1/mdm/actions/AssetScan \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "devices": [ 9508000000013120, 9508000000013692 ], "command_name": "AssetScan", "groups": [ "9007199254741597", "9007199254741595" ] }

Response Example

HTTP/1.1 200 OK
{ "success_list": [ { "device_id": 9007199254741000, "remarks": "The app is not compatible for this platform", "status": "SCHEDULED" } ], "total_count": 3, "not_applicable_count": 1, "success_count": 1, "na_list": [ { "device_id": 9007199254741000, "remarks": "The app is not compatible for this platform", "status": "SCHEDULED" } ] }

Get command history for device

Get command history for device
oauthscope : MDMOnDemand.MDMInventory.READ

GET - /api/v1/mdm/devices/{device_id}/commandhistory

Query Parameters

start_time
Custom range start time
limit
To get the specified set / length of commands to devices
end_time
Custom range end time
days
No of days for which command history has to be fetched
id
device ID for device

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.in") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v1/mdm/devices/9007199254741000/commandhistory", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/commandhistory") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
curl --request GET \ --url https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/commandhistory \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 200 OK
{ "metadata": { "total_record_count": 4 }, "paging": { "next": "http://localhost:9020/api/v1/mdm/profiles/scepsettings?skip-token=MjozOjE6MTU0Mjk1NDkxMzkxOA%3D%3D", "previous": "http://localhost:9020/api/v1/mdm/profiles/scepsettings?skip-token=Aexzsjk6nkL1psqmWdKigzGxOA%3D%3D" }, "delta-token": "aHR0cDovL2xvY2FsaG9zdDo5MDIwL2FwaS92MS9tZG0vcHJvZmlsZXMvc2NlcHNldHRpbmdzOjoxNTQyOTU0OTEzOTI0", "commands": [ { "command_status": 2, "managed_status": 2, "command_id": 9007199254741304, "command_name": "AssetScan", "added_time": 1523370360750, "device_id": 9007199254741000, "added_by": 9007199254740996, "command_history_id": 9007199254740996, "added_by_name": "admin", "command_life": [ { "updated_time": 1560141503246, "status_description": "Command Success", "command_id": 9007199254741304, "status_code": 2, "added_by": 9007199254740996, "command_name": "AssetScan", "added_by_name": "admin", "remarks": "The app is not compatible for this platform" } ], "remarks_args": null, "remarks": "The app is not compatible for this platform" } ] }

Get last initiated command status for device

Gets last initiated command status for device
oauthscope : MDMOnDemand.MDMInventory.READ

GET - /api/v1/mdm/devices/{device_id}/actions/recent_command

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.in") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v1/mdm/devices/9007199254741000/actions/recent_command", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/actions/recent_command") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
curl --request GET \ --url https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/actions/recent_command \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 200 OK
{ "status_description": "Command Success", "status_code": 2, "command_name": "AssetScan", "kb_url": "https://zylker.com/kb" }

Apply Knox actions to the device

Apply Knox actions to the device

POST - /api/v1/mdm/devices/{device_id}/knox_actions/{action_name}

Arguments

action_name
string
Name of the action :
  • scan
  • lock
  • remote_control
  • remote_view
  • remote_alarm
  • complete_wipe
  • corporate_wipe
  • clear_passcode
  • reset_passcode
  • fetch_location
  • shutdown
  • restart
  • enable_lost_mode
  • disable_lost_mode
  • pause_kiosk
  • re_apply_kiosk
  • remote_debug
  • unlock_user_account

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.in") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/api/v1/mdm/devices/9007199254741000/knox_actions/scan", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/knox_actions/scan") .post(body) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
curl --request POST \ --url https://www.mdm.manageengine.in/api/v1/mdm/devices/9007199254741000/knox_actions/scan \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "action_name": "scan" }

Response Example

HTTP/1.1 202 Accepted

Remove action

Remove action if it is not peformed on the device
oauthscope : MDMOnDemand.MDMInventory.DELETE

DELETE - /devices/{device_id}/actions/{action_name}

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.in") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("DELETE", "/devices/9007199254741000/actions/scan", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.mdm.manageengine.in/devices/9007199254741000/actions/scan") .delete(null) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
curl --request DELETE \ --url https://www.mdm.manageengine.in/devices/9007199254741000/actions/scan \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 204 No Content