Enrollment Settings
Enrollment Settings
End Points
Get Enrollment Settings
Save Enrollment settings
Save Inactive Device Policy Settings
Delete Inactive Device Policy Settings
Attribute
is_authentication_handling_available
boolean
Specify whether Zoho Authentication is available. Applicable only for Cloud. Set to False for on-premises
selected_ad
string
The AD name when AD is integrated in Cloud
directory_authentication
string
When AD/Zoho Account auth mode is chosen, Need to give if AD auth or Zoho account auth. Values to be given for ZOHO Account: "Zoho Authentication"; Azure AD: "Azure Authentication" ; On Premise AD: "Microsoft On-Premises AD Authentication". This is required only in cloud
auth_mode
integer
Authentication method for enrolling devices using invites
- OTP
- AD/Zoho Account
- Combination of both
email_unmanaged_alerts
string
email addresses to be notified when device gets unmanaged
notify_device_unmanaged
boolean
Specify whether a mail notification should be triggered when devices are unmanaged
is_ad_integrated
boolean
Specify whether AD is integrated
{
"is_authentication_handling_available": true,
"selected_ad": "Azure Authentication",
"directory_authentication": "Azure Authentication",
"auth_mode": 1,
"email_unmanaged_alerts": "mdmzoho@zylker.com",
"notify_device_unmanaged": true,
"is_ad_integrated": true
}
Get Enrollment Settings
Get enrollment settingsoauthscope : MDMOnDemand.MDMAdmin.CREATE
GET - /api/v1/mdm/enrollmentsettings
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.mdm.manageengine.com/api/v1/mdm/enrollmentsettings")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("X-CUSTOMER", "9007199254740995")
.build();
Response response = client.newCall(request).execute();
import http.client
conn = http.client.HTTPSConnection("www.mdm.manageengine.com")
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'X-CUSTOMER': "9007199254740995"
}
conn.request("GET", "/api/v1/mdm/enrollmentsettings", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
curl --request GET \
--url https://www.mdm.manageengine.com/api/v1/mdm/enrollmentsettings \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-CUSTOMER: 9007199254740995'
HTTP/1.1 200 OK{
"is_authentication_handling_available": true,
"selected_ad": "Azure Authentication",
"directory_authentication": "Azure Authentication",
"auth_mode": 1,
"email_unmanaged_alerts": "mdmzoho@zylker.com",
"notify_device_unmanaged": true,
"is_ad_integrated": true
}
Save Enrollment settings
Save enrollment settings for on-premisesoauthscope : MDMOnDemand.MDMAdmin.CREATE
POST - /api/v1/mdm/enrollmentsettings
Arguments
auth_mode
integer
(Required)
Authentication method for enrolling devices using invites
- OTP
- AD/Zoho Account
- Combination of both
email_unmanaged_alerts
string
(Required)
email addresses to be notified when device gets unmanaged
notify_device_unmanaged
boolean
(Required)
Specify whether a mail notification should be triggered when devices are unmanaged
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.com/api/v1/mdm/enrollmentsettings")
.post(body)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("X-CUSTOMER", "9007199254740995")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
import http.client
conn = http.client.HTTPSConnection("www.mdm.manageengine.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'X-CUSTOMER': "9007199254740995",
'content-type': "application/json"
}
conn.request("POST", "/api/v1/mdm/enrollmentsettings", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
curl --request POST \
--url https://www.mdm.manageengine.com/api/v1/mdm/enrollmentsettings \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-CUSTOMER: 9007199254740995' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"auth_mode": 1,
"email_unmanaged_alerts": "mdmzoho@zylker.com",
"notify_device_unmanaged": true
}
HTTP/1.1 200 OK{
"status": "acknowledged"
}
Save Inactive Device Policy Settings
Save inactive device policy settingsoauthscope : MDMOnDemand.MDMAdmin.CREATE
PUT - /api/v1/mdm/inactive_device_policy_settings
Arguments
action_type
integer
(Required)
Action type to perform
- No Action (default)
- Remove Device
- Retire Device
- Unassign MDM License for Device
action_threshold
long
(Required)
threshold period to perform action on inactive device (default - 0 milliseconds)
inactive_threshold
long
(Required)
threshold period to move the device to new state
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.com/api/v1/mdm/inactive_device_policy_settings")
.put(body)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("X-CUSTOMER", "9007199254740995")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
import http.client
conn = http.client.HTTPSConnection("www.mdm.manageengine.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'X-CUSTOMER': "9007199254740995",
'content-type': "application/json"
}
conn.request("PUT", "/api/v1/mdm/inactive_device_policy_settings", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
curl --request PUT \
--url https://www.mdm.manageengine.com/api/v1/mdm/inactive_device_policy_settings \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-CUSTOMER: 9007199254740995' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"action_type": 1,
"action_threshold": 1814400000,
"inactive_threshold": 1728000000
}
HTTP/1.1 204 No Content{
"status": "acknowledged"
}
Delete Inactive Device Policy Settings
Delete devices that have not contacted the MDM server for a specified durationoauthscope : MDMOnDemand.MDMAdmin.DELETE
DELETE - /api/v1/mdm/inactive_device_policy_settings
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.mdm.manageengine.com/api/v1/mdm/inactive_device_policy_settings")
.delete(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("X-CUSTOMER", "9007199254740995")
.build();
Response response = client.newCall(request).execute();
import http.client
conn = http.client.HTTPSConnection("www.mdm.manageengine.com")
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'X-CUSTOMER': "9007199254740995"
}
conn.request("DELETE", "/api/v1/mdm/inactive_device_policy_settings", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
curl --request DELETE \
--url https://www.mdm.manageengine.com/api/v1/mdm/inactive_device_policy_settings \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-CUSTOMER: 9007199254740995'
HTTP/1.1 204 No Content