Profiles

Attribute

creation_time
long
Creation time
last_modified_time
long
Last modified time
profile_version
integer
Current version of the profile
payloads
array
list of payloads in the profile
last_modified_by
integer
User ID of the user who last modified the profile
profile_description
string
Description
created_by
integer
User ID of the user who created the profile
collection_id
integer
Collection ID of the profile
profile_name
string
Name of the profile
profile_status
string
Status of the profile
platform_type
integer
Profile platform type:
  1. iOS
  2. Android
  3. Windows
  4. Chrome
is_moved_to_trash
boolean
Is profile trashed
profile_id
integer
Unique identifier for the profile
scope
integer
Scope of the profile (default - 0): Android Profile : ( 0 - devices, 1 - knox container)
Chrome Profile : (0 - devices, 2 - user)
profile_status_id
integer
Status ID for the profile : 1 - Yet to Deploy, 110 - Published

Example

[ { "creation_time": 12312321312312, "last_modified_time": 213123213123, "profile_version": 1, "payloads": [ "restrictionspolicy", "passcodepolicy" ], "last_modified_by": 21312312312312, "profile_description": "Test IOS Restrictions Policy", "created_by": 21321312312, "collection_id": 2132131231241, "profile_name": "IOS Restrictions Policy", "profile_status": "Yet To Deploy", "platform_type": 1, "is_moved_to_trash": false, "profile_id": 12321312312, "scope": 0, "profile_status_id": 1 } ]

Get List of profiles

Get List of profiles
oauthscope : MDMOnDemand.MDMDeviceMgmt.READ

GET - /api/v1/mdm/profiles

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.com") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v1/mdm/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.com/api/v1/mdm/profiles") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
curl --request GET \ --url https://www.mdm.manageengine.com/api/v1/mdm/profiles \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 200 Create
{ "profiles": [ { "creation_time": 12312321312312, "last_modified_time": 213123213123, "profile_version": 1, "payloads": [ "restrictionspolicy", "passcodepolicy" ], "last_modified_by": 21312312312312, "profile_description": "Test IOS Restrictions Policy", "created_by": 21321312312, "collection_id": 2132131231241, "profile_name": "IOS Restrictions Policy", "profile_status": "Yet To Deploy", "platform_type": 1, "is_moved_to_trash": false, "profile_id": 12321312312, "scope": 0, "profile_status_id": 1 } ] }

Create a profile

Create a profile
oauthscope : MDMOnDemand.MDMDeviceMgmt.CREATE

POST - /api/v1/mdm/profiles

Arguments

profile_name
string
(Required)
Name of the profile
profile_description
string
Description
platform_type
integer
(Required)
Profile platform type:
  1. iOS
  2. Android
  3. Windows
  4. Chrome
scope
integer
Scope of the profile (default - 0): Android Profile : ( 0 - devices, 1 - knox container)
Chrome Profile : (0 - devices, 2 - user)

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/api/v1/mdm/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.com/api/v1/mdm/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.com/api/v1/mdm/profiles \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "profile_name": "IOS Restrictions Policy", "profile_description": "Test IOS Restrictions Policy", "platform_type": 1, "scope": 0 }

Response Example

HTTP/1.1 200 Create
{ "creation_time": 12312321312312, "last_modified_time": 213123213123, "profile_version": 1, "payloads": [ "restrictionspolicy", "passcodepolicy" ], "last_modified_by": 21312312312312, "profile_description": "Test IOS Restrictions Policy", "created_by": 21321312312, "collection_id": 2132131231241, "profile_name": "IOS Restrictions Policy", "profile_status": "Yet To Deploy", "platform_type": 1, "is_moved_to_trash": false, "profile_id": 12321312312, "scope": 0, "profile_status_id": 1 }

Trash or delete profile

On first API call the profile is trashed, if profile is already trashed it will be deleted permanently
oauthscope : MDMOnDemand.MDMDeviceMgmt.DELETE

DELETE - /api/v1/mdm/profiles

Arguments

profile_ids
array
(Required)
List of profile IDs

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("DELETE", "/api/v1/mdm/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.com/api/v1/mdm/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.com/api/v1/mdm/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, 2, 3 ] }

Response Example

HTTP/1.1 204 No Content

Get Particular profile details

Get Particular profile details
oauthscope : MDMOnDemand.MDMDeviceMgmt.READ

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

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.com") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v1/mdm/profiles/12321312312", 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.com/api/v1/mdm/profiles/12321312312") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
curl --request GET \ --url https://www.mdm.manageengine.com/api/v1/mdm/profiles/12321312312 \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 200 Read
{ "creation_time": 12312321312312, "last_modified_time": 213123213123, "profile_version": 1, "payloads": [ "restrictionspolicy", "passcodepolicy" ], "last_modified_by": 21312312312312, "profile_description": "Test IOS Restrictions Policy", "created_by": 21321312312, "collection_id": 2132131231241, "profile_name": "IOS Restrictions Policy", "profile_status": "Yet To Deploy", "platform_type": 1, "is_moved_to_trash": false, "profile_id": 12321312312, "scope": 0, "profile_status_id": 1 }

Modify a profile

Modify a profile
oauthscope : MDMOnDemand.MDMDeviceMgmt.UDPATE

PUT - /api/v1/mdm/profiles/{profile_id}

Arguments

profile_name
string
Name of the profile
profile_description
string
Description

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("PUT", "/api/v1/mdm/profiles/12321312312", 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.com/api/v1/mdm/profiles/12321312312") .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.com/api/v1/mdm/profiles/12321312312 \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "profile_name": "IOS Restrictions Policy", "profile_description": "Test IOS Restrictions Policy" }

Response Example

HTTP/1.1 202 Accepted

Get List of payloads

Get List of payloads for profile.
oauthscope : MDMOnDemand.MDMDeviceMgmt.READ

GET - /api/v1/mdm/profiles/{profile_id}/payloads

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.com") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v1/mdm/profiles/12321312312/payloads", 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.com/api/v1/mdm/profiles/12321312312/payloads") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
curl --request GET \ --url https://www.mdm.manageengine.com/api/v1/mdm/profiles/12321312312/payloads \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 200 Read
{ "payloads": [ "restrictionspolicy", "passcodepolicy" ] }

Get payload IDs for particular payload type

Get payload IDs for particular payload type. refer here for payload details
oauthscope : MDMOnDemand.MDMDeviceMgmt.READ

GET - /api/v1/mdm/profiles/{profile_id}/payloads/{payload_name}

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.com") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v1/mdm/profiles/12321312312/payloads/restrictionspolicy", 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.com/api/v1/mdm/profiles/12321312312/payloads/restrictionspolicy") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
curl --request GET \ --url https://www.mdm.manageengine.com/api/v1/mdm/profiles/12321312312/payloads/restrictionspolicy \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 200 Read
{ "payload_name": "restrictionspolicy", "payloaditems": [ "9007199254741295" ] }

Add a payload to the profile

For information regarding the payload request JSON of each payload type please refer here. Example of IOS Passocde Payload is given here.
oauthscope : MDMOnDemand.MDMDeviceMgmt.CREATE

POST - /api/v1/mdm/profiles/{profile_id}/payloads/{payload_name}

Arguments

max_passcode_age
integer
Maximum Passcode Age in days. Allowed values : 1-170
require_alphanumeric
boolean
Mandates the use of alphanumeric values as passcode.
max_failed_attempts
integer
Maximum number of failed attempts. The device will be factory reset when the maximum number is exceeded. Allowed values 3-9
min_passcode_length
integer
Minimum passcode length. The user must configure a password longer than the length configured here. Allowed values : 1-16
min_complex_chars
integer
Mandates the minimum number of special characters to be used in the passcode. Allowed values : 1-4
no_of_passcode_maintained
integer
Number of passcodes to be maintained in the history. The user cannot reuse the passcode stored in the history. Allowed values: 1-50
allow_simple_value
boolean
Allow numerical values to be configured as passcode.
auto_lock_idle_for
integer
Maximum idle time allowed before auto-lock. The device user can select any value less than the value configured here. (Allowed valued - 1,2,3,4,5,10,15)
max_grace_period
integer
Maximum time to unlock device without prompting for a passcode (in minutes). Allowed values: 0-240

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/api/v1/mdm/profiles/12321312312/payloads/restrictionspolicy", 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.com/api/v1/mdm/profiles/12321312312/payloads/restrictionspolicy") .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.com/api/v1/mdm/profiles/12321312312/payloads/restrictionspolicy \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "max_passcode_age": 150, "require_alphanumeric": true, "max_failed_attempts": 9, "min_passcode_length": 5, "min_complex_chars": 2, "no_of_passcode_maintained": 50, "allow_simple_value": false, "auto_lock_idle_for": 3, "max_grace_period": 0 }

Response Example

HTTP/1.1 200 Read
{ "max_passcode_age": 150, "require_alphanumeric": true, "max_failed_attempts": 9, "min_passcode_length": 5, "min_complex_chars": 2, "no_of_passcode_maintained": 50, "allow_simple_value": false, "auto_lock_idle_for": 3, "max_grace_period": 0, "payload_id": 123123123 }

Remove Particular payload from profile.

Remove Particular payload from profile. refer here for payload details
oauthscope : MDMOnDemand.MDMDeviceMgmt.DELETE

DELETE - /api/v1/mdm/profiles/{profile_id}/payloads/{payload_name}

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.com") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("DELETE", "/api/v1/mdm/profiles/12321312312/payloads/restrictionspolicy", 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.com/api/v1/mdm/profiles/12321312312/payloads/restrictionspolicy") .delete(null) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
curl --request DELETE \ --url https://www.mdm.manageengine.com/api/v1/mdm/profiles/12321312312/payloads/restrictionspolicy \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 204 No Content

Get particular payload details

Get particular payload details. For information regarding the payload JSON of each payload type please refer here.
Example of IOS Passocde Payload is given here.
oauthscope : MDMOnDemand.MDMDeviceMgmt.READ

GET - /api/v1/mdm/profiles/{profile_id}/payloads/{payload_name}/payloaditems/{payload_id}

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.com") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v1/mdm/profiles/12321312312/payloads/restrictionspolicy/payloaditems/123123123", 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.com/api/v1/mdm/profiles/12321312312/payloads/restrictionspolicy/payloaditems/123123123") .get() .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
curl --request GET \ --url https://www.mdm.manageengine.com/api/v1/mdm/profiles/12321312312/payloads/restrictionspolicy/payloaditems/123123123 \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 200 Read
{ "max_passcode_age": 150, "require_alphanumeric": true, "max_failed_attempts": 9, "min_passcode_length": 5, "min_complex_chars": 2, "no_of_passcode_maintained": 50, "allow_simple_value": false, "auto_lock_idle_for": 3, "max_grace_period": 0, "payload_id": 123123123 }

Modify a payload in the profile

Modify a payload in the profile,For information regarding the payload request JSON of each payload type please refer here. Example of IOS Passocde Payload is given here.
oauthscope : MDMOnDemand.MDMDeviceMgmt.CREATE

PUT - /api/v1/mdm/profiles/{profile_id}/payloads/{payload_name}/payloaditems/{payload_id}

Arguments

max_passcode_age
integer
Maximum Passcode Age in days. Allowed values : 1-170
require_alphanumeric
boolean
Mandates the use of alphanumeric values as passcode.
max_failed_attempts
integer
Maximum number of failed attempts. The device will be factory reset when the maximum number is exceeded. Allowed values 3-9
min_passcode_length
integer
Minimum passcode length. The user must configure a password longer than the length configured here. Allowed values : 1-16
min_complex_chars
integer
Mandates the minimum number of special characters to be used in the passcode. Allowed values : 1-4
no_of_passcode_maintained
integer
Number of passcodes to be maintained in the history. The user cannot reuse the passcode stored in the history. Allowed values: 1-50
allow_simple_value
boolean
Allow numerical values to be configured as passcode.
auto_lock_idle_for
integer
Maximum idle time allowed before auto-lock. The device user can select any value less than the value configured here. (Allowed valued - 1,2,3,4,5,10,15)
max_grace_period
integer
Maximum time to unlock device without prompting for a passcode (in minutes). Allowed values: 0-240

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("PUT", "/api/v1/mdm/profiles/12321312312/payloads/restrictionspolicy/payloaditems/123123123", 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.com/api/v1/mdm/profiles/12321312312/payloads/restrictionspolicy/payloaditems/123123123") .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.com/api/v1/mdm/profiles/12321312312/payloads/restrictionspolicy/payloaditems/123123123 \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "max_passcode_age": 150, "require_alphanumeric": true, "max_failed_attempts": 9, "min_passcode_length": 5, "min_complex_chars": 2, "no_of_passcode_maintained": 50, "allow_simple_value": false, "auto_lock_idle_for": 3, "max_grace_period": 0 }

Response Example

HTTP/1.1 200 Read
{ "max_passcode_age": 150, "require_alphanumeric": true, "max_failed_attempts": 9, "min_passcode_length": 5, "min_complex_chars": 2, "no_of_passcode_maintained": 50, "allow_simple_value": false, "auto_lock_idle_for": 3, "max_grace_period": 0, "payload_id": 123123123 }

Remove Particular payload item

Remove Particular payload item. refer here for payload details
oauthscope : MDMOnDemand.MDMDeviceMgmt.DELETE

DELETE - /api/v1/mdm/profiles/{profile_id}/payloads/{payload_name}/payloaditems/{payload_id}

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.com") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("DELETE", "/api/v1/mdm/profiles/12321312312/payloads/restrictionspolicy/payloaditems/123123123", 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.com/api/v1/mdm/profiles/12321312312/payloads/restrictionspolicy/payloaditems/123123123") .delete(null) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
curl --request DELETE \ --url https://www.mdm.manageengine.com/api/v1/mdm/profiles/12321312312/payloads/restrictionspolicy/payloaditems/123123123 \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 204 No Content

Publish a profile

Publish a profile. Every profile needs to published so that it can be distributed
oauthscope : MDMOnDemand.MDMDeviceMgmt.CREATE

POST - /api/v1/mdm/profiles/{profile_id}/publish

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.com") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("POST", "/api/v1/mdm/profiles/12321312312/publish", 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.com/api/v1/mdm/profiles/12321312312/publish") .post(null) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
curl --request POST \ --url https://www.mdm.manageengine.com/api/v1/mdm/profiles/12321312312/publish \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 204 No Content

Profile Update all

Update a profiles to all devices and groups
oauthscope : MDMOnDemand.MDMDeviceMgmt.CREATE

PUT - /api/v1/mdm/profiles/{profile_id}/update_all

Request Example

Click to copy
import http.client conn = http.client.HTTPSConnection("www.mdm.manageengine.com") headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("PUT", "/api/v1/mdm/profiles/12321312312/update_all", 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.com/api/v1/mdm/profiles/12321312312/update_all") .put(null) .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
curl --request PUT \ --url https://www.mdm.manageengine.com/api/v1/mdm/profiles/12321312312/update_all \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 202 Accepted