Introduction

Introduction

API Base URL


Cloud

  https://mdm.manageengine.com/api/v1    

On-Premises

  {ServerURL}/api/v1/mdm    

MDM's APIs allow you to perform all the basic management done with the MDM web client.

ManageEngine MDM APIs are built using REST principles which ensures predictable URLs that makes writing applications easy. This API follows HTTP rules, enabling a wide range of HTTP clients can be used to interact with the API.

Every resource is exposed as a URL. The URL of each resource can be obtained by accessing the API Root Endpoint.

Getting Started

Example

    
$ curl https://mdm.manageengine.com/api/v1/devices -H 'Authorization: Zoho-authtoken ba4604e8e433g9c892e360d53463oec5'

To use our API you must satisfy these prerequistes

  1. A valid Zoho username and password.(MDM Cloud)
  2. An API Key (MDM On-Premises)

Authentication

In case of MDM On-Premises, the authentication is done using using the API key.

Generating an API key

  1. On the MDM server, click on Admin tab from the top menu and select API Key Generation, present under Integrations.
  2. Follow the on-screen instructions to generate an API key.

Calling An API

API key can be passed only in header and cannot be passed in the request param.

OAuth

In case of MDM Cloud Zoho REST APIs are used, where the authorization and authentication done using OAuth 2.0. It provides secure access to protect resources thereby reducing the hassle of asking for a username and password every time a user logs in. Follow the steps listed here, to access Zoho’s APIs using OAuth 2.0

Step 1: Registering New Client

You will have to first register your application with Zoho's Developer console in order get your Client ID and Client Secret.

To register your application, login to Zoho Developer's Console and click on Add Client ID. Provide the required details to register your application.

On successful registration, you will be provided with a set of OAuth 2.0 credentials such as a Client ID and Client Secret , known to both Zoho and your application. Do not share this credentials

Step 2: Generating Grant Token

Redirect to the following authorization URL with the given params

https://accounts.zoho.com/oauth/v2/auth?

Request Example

https://accounts.zoho.com/oauth/v2/auth?scope=MDMOnDemand.MDMInventory.CREATE,MDMOnDemand.MDMInventory.READ&client_id=1000.0SRSZSY37WMZ69405H3TMYI2239V&state=testing&response_type=code&redirect_uri=http://www.mdm.manageengine.com&access_type=offline
Parameter Description
scope * SCOPE for which the token to be generated. Multiple scopes can be given which has to be separated by commas. Ex : MDMOnDemand.fullaccess.all
client_id * Client ID obtained during Client Registration
state An opaque string that is round-tripped in the protocol; ie., whatever value given to this will be passed back to you.
response_type * code
redirect_uri * One of the redirect URI given in above step. This param should be same redirect url mentioned while registering the Client
access_type The allowed values are offline and online. The online access_type gives your application only the access_token which is valid for one hour. The offline access_type will give the application an access_token as well as a refresh_token. By default it is taken as online
prompt Prompts for user consent each time your app tries to access user credentials. Ex: Consent

Note: Fields marked with * are mandatory

On this request, you will be shown with a "user consent page".

Upon clicking “Accept”, Zoho will redirect to the given redirect_uri with code and state param. This code value is mandatory to get the access token in the next step and this code is valid for 60 seconds.

On clicking “Deny”, the server returns an error

Step 3: Generate Access and Refresh Token

After getting code from the above step, make a POST request for the following URL with given params, to generate the access_token.

https://accounts.zoho.com/oauth/v2/token?

Request Example

https://accounts.zoho.com/oauth/v2/token?code=1000.dd7e47321d48b8a7e312e3d6eb1a9bb8.b6c07ac766ec11da98bf6a261e24dca4&client_id=1000.0SRSZSY37WMZ69405H3TMYI2239V&client_secret=fb0196010f2b70df8db2a173ca2cf59388798abf&redirect_uri=http://www.mdm.manageengine.com&grant_type=authorization_code
Parameter Description
code * code which is obtained in the above step
client_id * Client ID obtained during Client Registration
client_secret * Client secret obtained during Client Registration
redirect_uri * This param should be same redirect url mentioned while adding Client
grant_type * authorization_code
scope SCOPE for which token to be generated. Ex : MDMOnDemand.fullaccess.all. Multiple scopes has to be separated by commas.
state An opaque string that is round-tripped in the protocol; that is to say, value will be passed back to you.

Note: Fields with * are mandatory

In the response, you will get both access_token and refresh_token.

1. The access_token will expire after a particular period (as given in expires_in param in the response).

2. The refresh_token is permanent and will be used to regenerate new access_token, if the current access token is expired.

Note: Each time a re-consent page is accepted, a new refresh token is generated. The maximum limit is 20 refresh tokens per user. If this limit is crossed, the first refresh token is automatically deleted to accommodate the latest one. This is done irrespective of whether the first refresh token is in use or not.

Step 4: Generate Access Token From Refresh Token

Access Tokens have limited validity. In most general cases the access tokens expire in one hour. Until then, the access token has unlimited usage. Once it expires, your app will have to use the refresh token to request for a new access token. Redirect to the following POST URL with the given params to get a new access token

https://accounts.zoho.com/oauth/v2/token?

Request Example

https://accounts.zoho.com/oauth/v2/token?code=1000.dd7e47321d48b8a7e312e3d6eb1a9bb8.b6c07ac766ec11da98bf6a261e24dca4&client_id=1000.0SRSZSY37WMZ69405H3TMYI2239V&client_secret=fb0196010f2b70df8db2a173ca2cf59388798abf&redirect_uri=http://www.mdm.manageengine.com&grant_type=authorization_code
Parameter Description
refresh_token REFRESH TOKEN which is obtained in the above step
client_id Client ID obtained during Client Registration
client_secret Client secret obtained during Client Registration
redirect_uri This param should be same redirect url mentioned while registering Client
grant_type refresh_token

Step 5: Revoking a Refresh Token

To revoke a refresh token, call the following POST URL with the given params

https://accounts.zoho.com/oauth/v2/token/revoke?

Request Example

https://accounts.zoho.com/oauth/v2/token/revoke?refresh_token=1000.8ecd474019e31d522f94aad6c5cb7.4638677ebc14f2f2ee0b6dfb6cebdc
Parameter Description
refresh_token REFRESH TOKEN which is to be revoked

Step 6: Calling An API

Access Token can be passed only in header and cannot be passed in the request param.

List of scopes available :

Scope Description
Inventory To access inventory related APIs
Availabe types: MDMOnDemand.MDMInventory.Create, MDMOnDemand.MDMInventory.UPDATE, MDMOnDemand.MDMInventory.READ, MDMOnDemand.MDMInventory.DELETE
Device Management To access profiles, apps, groups and user_groups related APIs
Availabe types: MDMOnDemand.MDMDeviceMgmt.Create, MDMOnDemand.MDMDeviceMgmt.UPDATE, MDMOnDemand.MDMDeviceMgmt.READ, MDMOnDemand.MDMDeviceMgmt.DELETE
User To access user related APIs
Availabe types: MDMOnDemand.MDMUser.Create, MDMOnDemand.MDMUser.UPDATE, MDMOnDemand.MDMUser.READ, MDMOnDemand.MDMUser.DELETE

Errors

Error Response Example

    
HTTP/1.1 404 Not Found Content-Type: application/json;charset=UTF-8 { "error_code": 1002, "error_description": "Unknown ID", "localized_error_description" : "Unknown ID" }

In general, status codes in the 2xx range means success, 4xx range means there was an error in the provided information, and those in the 5xx range indicate server side errors. Commonly used HTTP status codes are listed below.

HTTP Status Codes

Status Code Descriptions
2xx Success
4xx Bad request sent to server
5xx Server side error
Status Code Description
200 Success The request was successfully completed.
201 Created The request was a success and one or more resources have been created.
400 Bad request The request cannot be performed. Usually because of malformed parameter or missing parameter.
401 Unauthorized (Invalid AuthToken) Request was rejected because of invalid AuthToken.
403 Forbidden The user does not have enough permission or possibly not an user of the respective organization to access the resource.
404 URL Not Found The URL you’ve sent is wrong. It’s possible that the resource you’ve requested has been moved to another URL.
405 Method Not Allowed The requested resource does not support the HTTP method used. For example, requesting List of all customers API with PUT as the HTTP method.
406 Not Acceptable The requested response type is not supported by the client.
429 Too many requests Too many requests within a certain time frame. To know more about api call limits, click here.
500 Server errorA Server error has occurred.

Common Error codes

The error codes returned by the server is listed below.

Error Code HTTP status Error Description
COM0001 405 Method not implemented / Invalid URL
COM0002 429 API Limit Exceeded
COM0003 400 Invalid paging params
COM0004 500 Internal server error, Please try again in a moment
COM0005 400 Parameters in post were invalid or missing
COM0006 400 No request data recieved
COM0007 412 Assist is not Integrated.
COM0008 404 Unknown Resource
COM0009 422 Insufficient Data for Processing Request
COM0010 409 Resource Already Exists
COM0011 422 Invalid / Missing headers
COM0012 400 Invalid API version
COM0013 401 Not Authorised/ Invalid auth token
COM0014 400 Bad Request
LOC0001 412 Location Fetch error
SDE0003 412 Assign User failed
CMD0001 412 Command not applicable for Device
CMD0002 412 Unable to suspend command
APP0001 400 App Upload Regected
APP0002 412 Unable to delete app or profile
COM00020 400 Device license limit reached
FIL0001 400 File upload rejected
COM0015 412 Precondition Failed
COM0021 400 Invalid delta token
PAY0001 400 The image uploaded must be less than the size specified!
PAY0002 400 Specify all the requisite fields to proceed further!
PAY0004 400 Verify the values specified for the requisite fields!

API Call Limit

API calls are limited to provide better quality of service and availability to all the users. The limits on total calls are illustrated below:

Devices

Device Meta Information

Example

{ "device_id": 9007199254741000, "device_capacity": 15.8, "os_version": "4.4.2", "is_lost_mode_enabled": false, "platform_type": "android", "platform_type_id": 2, "model": "Nexus 7", "device_name": "admin_Nexus 7", "product_name": "asus", "user": { "user_id": 9007199254741020, "user_name": "user", "user_email": "example@mdm.manageengine.com" } }

Attribute

device_id
long
Resource ID associated to the device
device_capacity
Double
Internal Storage of the device
os_version
String
Device OS version
is_lost_mode_enabled
boolean
Lost Mode enabled/disabled on the device
platform_type
string
Device Platform: One of
  • ios
  • android
  • windows
platform_type_id
integer
ID for platform:
  1. IOS
  2. Android
  3. Windows
model
string
Device model details
device_name
String
Device name
product_name
string
Product device name.
object
User Object
user_id
long
Resource ID associated to the user
user_name
string
User Name
user_email
string
User Email

Get device list

Get List of managed devices
oauthscope : MDMOnDemand.MDMInventory.READ

GET /devices

Request Example

  
$ curl {BaseURL}/devices -H "Authorization: Zoho-authtoken ba4604e8e433g9c892e360d53463oec5" -H "Content-Type: application/json;charset=UTF-8"

Response Example

  
HTTP/1.1 200 OK Content-Type:application/json;charset=UTF-8 { "devices": [ { "device_id": 9007199254741000, "device_capacity": 15.8, "os_version": "4.4.2", "is_lost_mode_enabled": false, "platform_type": "android", "platform_type_id": 2, "model": "Nexus 7", "device_name": "admin_Nexus 7", "product_name": "asus", "user": { "user_id": 9007199254741020, "user_name": "user", "user_email": "example@mdm.manageengine.com" } } ] }

Get device device details

Get complete information of a particular device.
oauthscope : MDMOnDemand.MDMInventory.READ

GET /devices/{device_id}

Request Example

  
$ curl {BaseURL}/devices/{device_id} -H "Authorization: Zoho-authtoken ba4604e8e433g9c892e360d53463oec5" -H "Content-Type: application/json;charset=UTF-8"

Response Example

  
HTTP/1.1 200 OK Content-Type:application/json;charset=UTF-8 { "meid": "--", "warranty_number": "--", "agent_version_code": "--", "cellular_technology": "1", "is_dnd_in_effect": "--", "used_device_space": "12.4", "is_profileowner": "--", "office": "--", "google_play_service_id": "3ad8caab1cda8495", "platform_type": "android", "model_name": "hero2ltexx", "registered_time": "--", "warranty_expiration_date": "", "purchase_order_number": "--", "model": "Nexus 7", "purchase_type": "--", "asset_tag": "--", "available_external_capacity": "0.0", "is_activation_lock_enabled": "--", "available_device_capacity": "--", "resource_type": "--", "owned_by": "2", "available_ram_memory": "2.6", "warranty_type": "--", "product_name": "asus", "agent_type": "3", "modem_firmware_version": "G935FXXU2ERD6", "user_id": 9007199254741020, "is_device_locator_enabled": "false", "name": "admin_SM-G935F", "purchase_price": "--", "purchase_date": "--", "is_modified": "--", "device_capacity": 15.8, "processor_type": "--", "managed_status": "--", "apn_user_name": "--", "added_time": 1534406564170, "processor_architecture": "--", "network_usage": { "outgoing_network_usage": "0.0", "incoming_wifi_usage": "0.0", "outgoing_wifi_usage": "0.0", "incoming_network_usage": "0.0" }, "eas_device_identifier": "JQ7V9FB4JL6ETBUT6A32MSVFD0", "is_inactive": "--", "sims": [ { "is_roaming": "--", "current_mnc": "in", "subscriber_mnc": "--", "current_carrier_network": "--", "subscriber_carrier_network": "--", "iccid": "--", "carrier_setting_version": "--", "resource_id": "2", "imei": "357327071694307", "subscriber_mcc": "--", "phone_number": "5954646764", "current_mcc": "in" } ], "is_lost_mode_enabled": false, "description": "--", "managed_device_id": "2", "firmware_version": "--", "domain_netbios_name": "--", "network": { "is_personal_hotspot_enabled": "--", "is_roaming": "--", "voice_roaming_enabled": "true", "current_mnc": "in", "subscriber_mnc": "--", "current_carrier_network": "--", "ethernet_ip": "--", "data_roaming_enabled": "true", "ethernet_macs": "--", "subscriber_carrier_network": "--", "wifi_ip": "172.23.123.198, FE80::4E66:41FF:FE2F:910", "iccid": "--", "bluetooth_mac": "--", "carrier_setting_version": "--", "resource_id": "2", "wifi_mac": "4C:66:41:2F:09:10", "subscriber_mcc": "--", "phone_number": "5954646764", "current_mcc": "in" }, "external_capacity": "0.0", "security": { "passcode_complaint": false, "external_storage_encryption": -1, "storage_encryption": "true", "hardware_encryption_caps": "-1", "passcode_complaint_profiles": "true", "resource_id": "2", "device_rooted": "false", "passcode_present": "true" }, "processor_speed": "--", "asset_owner": "--", "udid": "--", "apn_password": "--", "last_modified_time": "--", "battery_level": "--", "is_itunes_account_active": "--", "os": { "meid": "--", "agent_version_code": "--", "processor_type": "--", "managed_status": "--", "added_time": 1534406564170, "processor_architecture": "--", "cellular_technology": "1", "is_dnd_in_effect": "--", "eas_device_identifier": "JQ7V9FB4JL6ETBUT6A32MSVFD0", "used_device_space": "12.4", "is_profileowner": "--", "firmware_version": "--", "google_play_service_id": "3ad8caab1cda8495", "external_capacity": "0.0", "processor_speed": "--", "platform_type": "android", "registered_time": "--", "udid": "--", "available_external_capacity": "0.0", "is_activation_lock_enabled": "--", "battery_level": "--", "is_itunes_account_active": "--", "build_version": "R16NW", "is_cloud_backup_enabled": "false", "is_supervised": "--", "available_device_capacity": "--", "os_version": "4.4.2", "owned_by": "2", "serial_number": "RZ8H60ASLHR", "available_ram_memory": "2.6", "model_id": "1", "last_cloud_backup_date": "--", "agent_type": "3", "agent_version": "--", "modem_firmware_version": "G935FXXU2ERD6", "is_device_locator_enabled": "false", "total_ram_memory": "3533.0", "used_external_space": "0.0", "resource_id": "2", "os_name": "OREO", "imei": "357327071694307", "notified_agent_version": "--", "device_capacity": 15.8 }, "build_version": "R16NW", "is_cloud_backup_enabled": "false", "is_supervised": "--", "os_version": "4.4.2", "model_type": "1", "serial_number": "RZ8H60ASLHR", "model_id": "1", "last_cloud_backup_date": "--", "db_added_time": "--", "agent_version": "--", "total_ram_memory": "3533.0", "used_external_space": "0.0", "resource_id": "2", "os_name": "OREO", "imei": "357327071694307", "customer_id": "--", "notified_agent_version": "--" }

Get device app list

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

GET /devices/{device_id}/apps

Request Example

  
$ curl {BaseURL}/devices/{device_id}/apps -H "Authorization: Zoho-authtoken ba4604e8e433g9c892e360d53463oec5" -H "Content-Type: application/json;charset=UTF-8"

Response Example

  
HTTP/1.1 200 OK Content-Type:application/json;charset=UTF-8 { "apps": [ { "app_name": "ZVoice", "identifier": "com.zoho.inhouse.zvoice", "app_version": "1.0.6", "app_id": 9007199254741340 } ], "installed_apps": [ { "app_name": "ZVoice", "identifier": "com.zoho.inhouse.zvoice", "app_version": "1.0.6", "app_id": 9007199254741340 } ] }

Get device profiles

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

GET /devices/{device_id}/profiles

Request Example

  
$ curl {BaseURL}/devices/{device_id}/profiles -H "Authorization: Zoho-authtoken ba4604e8e433g9c892e360d53463oec5" -H "Content-Type: application/json;charset=UTF-8"

Response Example

  
HTTP/1.1 200 OK Content-Type:application/json;charset=UTF-8 { "provisioning_profiles": [ { "prov_expiry_date": 1539348973000, "prov_name": "Zoho Card Scanner iMessage Exension", "prov_uuid": "df78b94e-1652-4c6e-8a0b-f9d9e395a55c", "installed_source": 0 } ], "configuration_profiles": [ { "payload_has_rem_password": false, "payload_is_encrypted": false, "payload_unremovable": false, "payload_type": "Configuration", "payload_version": 1, "payload_identifier": "com.zohocorp.mdm", "payload_uuid": "4b665f25-b8f0-4b03-b5d7-586c8da14f68", "payload_organization": "zohocorp", "payload_description": "This is a test Profile", "payload_display_name": "MDM Profile", "payloadcontent": [ { "payload_type": "Configuration", "payload_version": 1, "payload_identifier": "com.zohocorp.mdm", "payload_uuid": "4b665f25-b8f0-4b03-b5d7-586c8da14f68", "payload_organization": "zohocorp", "payload_description": "This is a test Profile", "payload_display_name": "MDM Profile" } ] } ] }

Get device location

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

GET /devices/{device_id}/locations

Request Example

  
$ curl {BaseURL}/devices/{device_id}/locations -H "Authorization: Zoho-authtoken ba4604e8e433g9c892e360d53463oec5" -H "Content-Type: application/json;charset=UTF-8"

Response Example

  
HTTP/1.1 200 OK Content-Type:application/json;charset=UTF-8 { "locations": [ { "located_time": 1534406564167, "added_time": 1534406564170, "latitude": 12.8308, "longitude": 80.0491 } ] }

Groups

Simplify device management by organizing devices into groups.

Example

{ "group_id": 99731238129, "name": "MDM", "description": "Group for MDM", "group_type": 1, "domain": "ZOHOCORP" }

Attribute

group_id
long
Unique Identifier for the group
name
string
Name of the group
description
string
Description of the group
group_type
integer
Type of group:
  1. Device Group
domain
String
Domain in which the group exists (if AD is synced)

Get group list

Get a list of groups
oauthscope : MDMOnDemand.MDMDeviceMgmt.READ

GET /groups

Request Example

  
$ curl {BaseURL}/groups -H "Authorization: Zoho-authtoken ba4604e8e433g9c892e360d53463oec5" -H "Content-Type: application/json;charset=UTF-8"

Response Example

  
HTTP/1.1 200 OK Content-Type:application/json;charset=UTF-8 { "groups": [ { "group_id": 99731238129, "name": "MDM", "group_type": 1, "domain": "ZOHOCORP" } ] }

Get group details

Get details of a particular group
oauthscope : MDMOnDemand.MDMDeviceMgmt.READ

GET /groups/{group_id}

Request Example

  
$ curl {BaseURL}/groups/{group_id} -H "Authorization: Zoho-authtoken ba4604e8e433g9c892e360d53463oec5" -H "Content-Type: application/json;charset=UTF-8"

Response Example

  
HTTP/1.1 200 OK Content-Type:application/json;charset=UTF-8 { "group_id": 99731238129, "name": "MDM", "group_type": 1, "domain": "ZOHOCORP", "description": "Group for MDM" }

Create a group

Create a group for managing devices
oauthscope : MDMOnDemand.MDMDeviceMgmt.CREATE

POST /groups

Request Example

  
$ curl {BaseURL}/groups -X POST -H "Authorization: Zoho-authtoken ba4604e8e433g9c892e360d53463oec5" -H "Content-Type: application/json;charset=UTF-8" -d '{ "name": "MDM", "group_type": 1, "domain": "ZOHOCORP", "description": "Group for MDM" }'

Response Example

  
HTTP/1.1 200 OK Content-Type:application/json;charset=UTF-8 { "group_id": 99731238129, "name": "MDM", "group_type": 1, "domain": "ZOHOCORP", "description": "Group for MDM" }

ARGUMENTS

name
Required
Name of the group
group_type
Required
Type of group:
  1. Device Group
domain
Optional
Domain in which the group exists (if AD is synced)
description
Optional
Description of the group

Get members present in a group

Get a list of members present in a particular group
oauthscope : MDMOnDemand.MDMDeviceMgmt.READ

GET /groups/{group_id}/members

Request Example

  
$ curl {BaseURL}/groups/{group_id}/members -H "Authorization: Zoho-authtoken ba4604e8e433g9c892e360d53463oec5" -H "Content-Type: application/json;charset=UTF-8"

Response Example

  
HTTP/1.1 200 OK Content-Type:application/json;charset=UTF-8 { "member_ids": [ 12, 213123, 21312 ] }

Add members to a group

Add multiple members simultaneously to an existing group
oauthscope : MDMOnDemand.MDMDeviceMgmt.CREATE

POST /groups/{group_id}/members

Request Example

  
$ curl {BaseURL}/groups/{group_id}/members -X POST -H "Authorization: Zoho-authtoken ba4604e8e433g9c892e360d53463oec5" -H "Content-Type: application/json;charset=UTF-8" -d '{ "member_ids": [ 12, 213123, 21312 ] }'

Response Example

  
HTTP/1.1 200 OK Content-Type:application/json;charset=UTF-8 { "member_ids": [ 12, 213123, 21312 ] }

ARGUMENTS

member_ids
Required
List of member IDs

Add a member to a group

Add a particular member to a selected group
oauthscope : MDMOnDemand.MDMDeviceMgmt.CREATE

POST /groups/{group_id}/members/{member_id}

Request Example

  
$ curl {BaseURL}/groups/{group_id}/members/{member_id} -X POST -H "Authorization: Zoho-authtoken ba4604e8e433g9c892e360d53463oec5" -H "Content-Type: application/json;charset=UTF-8"

Response Example

  
HTTP/1.1 202 Accepted

Remove a member from a group

Remove a member from a particular group
oauthscope : MDMOnDemand.MDMDeviceMgmt.DELETE

DELETE /groups/{group_id}/members/{member_id}

Request Example

  
$ curl {BaseURL}/groups/{group_id}/members/{member_id} -X DELETE -H "Authorization: Zoho-authtoken ba4604e8e433g9c892e360d53463oec5" -H "Content-Type: application/json;charset=UTF-8"

Response Example

  
HTTP/1.1 204 No Content

Delete an existing MDM group

Delete a group available in MDM
oauthscope : MDMOnDemand.MDMDeviceMgmt.DELETE

DELETE /groups/{group_id}

Request Example

  
$ curl {BaseURL}/groups/{group_id} -X DELETE -H "Authorization: Zoho-authtoken ba4604e8e433g9c892e360d53463oec5" -H "Content-Type: application/json;charset=UTF-8"

Response Example

  
HTTP/1.1 204 No Content

Files

Add a file to MDM for usage in other API.

Example

{ "content_type": "image/png", "file_name": "check.png", "file_id": 123124, "expiry_time": 15987913528, "content_length": 1479 }

Attribute

content_type
string
Content Type of file
file_name
string
Name of File
file_id
long
Unique Identifier for the file
expiry_time
long
Timestamp until when the file is valid
content_length
integer
Length of the file (in bytes)

Upload a file to MDM

Upload a file
oauthscope : MDMOnDemand.MDMDeviceMgmt.CREATE

POST /files

Request Example

  
$ curl {BaseURL}/files -X POST -H "Authorization: Zoho-authtoken ba4604e8e433g9c892e360d53463oec5" -H "Content-Type: {Content type of file}" -H "Content-Disposition: filename={file_name}" -d '{ "stream": "1231231234916349eq" }'

Response Example

  
HTTP/1.1 200 OK Content-Type:application/json;charset=UTF-8 { "content_type": "image/png", "file_name": "check.png", "file_id": 123124, "expiry_time": 15987913528, "content_length": 1479 }

ARGUMENTS

stream
Required
bytestream of the file

Apps

Add Store or enterprise apps to the App Repository for simpler app management.

Example

{ "app_id": 99731238129, "app_name": "ME MDM", "app_category": "Education", "app_type": 2, "bundle_identifier": "com.manageengine.mdm.iosagent", "version": "1.1.1", "platform_type": 2, "description": "The is an enterprise app", "icon": "https://mdm.manageengine.com/mdm-logo.png", "store_url": "https://itunes.apple.com/in/app/manageengine-mdm/id720111835?mt=8", "is_app_paid": false, "country_code": "US", "store_id": "720111835", "added_time": 192031023091, "modified_time": 192831120931 }

Attribute

app_id
long
A unique identifier for the app
app_name
string
Name of the app
app_category
string
Category of the app
app_type
integer
App type:
  1. Free Store App
  2. Paid Store App
  3. Enterprise App
bundle_identifier
string
App's bundle identifier
version
string
Version of the app
platform_type
integer
The platform for which the app is available:
  1. iOS
  2. Android
  3. Windows
description
string
A custom description of the app
icon
string
A link for the icon image (if available)
store_url
string
Store URL for the app (iOS Only)
is_app_paid
boolean
Select 'True' if the app is a paid app (In case of Store apps)
country_code
string
The country code for App Store (iOS only)
store_id
string
Identifier for the App Store (iOS Only)
added_time
long
Time when the app was added to the MDM server
modified_time
long
Time when the app was last modified

Get App List

Get a list of apps available in the App Repository on the MDM server.
oauthscope : MDMOnDemand.MDMDeviceMgmt.READ

GET /apps

Request Example

  
$ curl {BaseURL}/apps -H "Authorization: Zoho-authtoken ba4604e8e433g9c892e360d53463oec5" -H "Content-Type: application/json;charset=UTF-8"

Response Example

  
HTTP/1.1 200 OK Content-Type:application/json;charset=UTF-8 { "apps": [ { "app_id": 99731238129, "app_name": "ME MDM", "app_category": "Education", "app_type": 2, "version": "1.1.1", "platform_type": 2, "description": "The is an enterprise app", "icon": "https://mdm.manageengine.com/mdm-logo.png", "added_time": 192031023091, "modified_time": 192831120931 } ] }

Get App Details

Get details of a particular app
oauthscope : MDMOnDemand.MDMDeviceMgmt.READ

GET /apps/{app_id}

Request Example

  
$ curl {BaseURL}/apps/{app_id} -H "Authorization: Zoho-authtoken ba4604e8e433g9c892e360d53463oec5" -H "Content-Type: application/json;charset=UTF-8"

Response Example

  
HTTP/1.1 200 OK Content-Type:application/json;charset=UTF-8 { "app_id": 99731238129, "app_name": "ME MDM", "app_category": "Education", "app_type": 2, "bundle_identifier": "com.manageengine.mdm.iosagent", "version": "1.1.1", "platform_type": 2, "description": "The is an enterprise app", "icon": "https://mdm.manageengine.com/mdm-logo.png", "store_url": "https://itunes.apple.com/in/app/manageengine-mdm/id720111835?mt=8", "is_app_paid": false, "country_code": "US", "store_id": "720111835", "added_time": 192031023091, "modified_time": 192831120931 }

Add an app to MDM server

Add either a Store app or enterprise app to the MDM Server
oauthscope : MDMOnDemand.MDMDeviceMgmt.CREATE

POST /apps

Request Example

  
$ curl {BaseURL}/apps -X POST -H "Authorization: Zoho-authtoken ba4604e8e433g9c892e360d53463oec5" -H "Content-Type: application/json;charset=UTF-8" -d '{ "app_name": "ME MDM", "app_type": 2, "app_file": 91273987129, "app_category_id": 2, "supported_devices": 3, "display_image": 91273987129, "description": "The is an enterprise app", "app_store_country_code": "US", "bundle_identifier": "com.manageengine.mdm.iosagent", "prevent_backup": false, "full_image": 91273987129 }'

Response Example

  
HTTP/1.1 200 OK Content-Type:application/json;charset=UTF-8 { "app_id": 99731238129, "app_name": "ME MDM", "app_category": "Education", "app_type": 2, "bundle_identifier": "com.manageengine.mdm.iosagent", "version": "1.1.1", "platform_type": 2, "description": "The is an enterprise app", "icon": "https://mdm.manageengine.com/mdm-logo.png", "store_url": "https://itunes.apple.com/in/app/manageengine-mdm/id720111835?mt=8", "is_app_paid": false, "country_code": "US", "store_id": "720111835", "added_time": 192031023091, "modified_time": 192831120931 }

ARGUMENTS

app_name
Required
Name of the app
app_type
Required
App type:
  1. Free Store App
  2. Paid Store App
  3. Enterprise App
app_file
Required
File ID of the app package file uploaded to MDM using Files endpoint (Required for enterprise apps only)
app_category_id
Required
Identifier for the app category
supported_devices
Required
Supported Devices
  1. Smartphone
  2. Tablet
  3. Both Smartphone and tablet
display_image
Optional
File ID of the image uploaded to MDM using Files endpoint (Used for app icon)
description
Optional
A custom description of the app
app_store_country_code
Optional
Country code for the App Store (iOS Only)
bundle_identifier
Optional
App's bundle identifier
prevent_backup
Optional
Prevent app data backup during device backup.
full_image
Optional
File ID of the image uploaded to MDM using Files endpoint (Used for app icon)

Associate an app to a device

Associate an app to a particular device
oauthscope : MDMOnDemand.MDMDeviceMgmt.CREATE

POST /apps/{app_id}/devices/{device_id}

Request Example

  
$ curl {BaseURL}/apps/{app_id}/devices/{device_id} -X POST -H "Authorization: Zoho-authtoken ba4604e8e433g9c892e360d53463oec5" -H "Content-Type: application/json;charset=UTF-8" -d '{ "silent_install": true, "notify_user_via_email": true }'

Response Example

  
HTTP/1.1 202 Accepted

ARGUMENTS

silent_install
Optional
To allow silent installation of the app. Enter 'False' for manual installation from App Catalog.
notify_user_via_email
Optional
Notify users by e-mail upon distributing the app

Associate an app to devices

Associate an existing app to multiple devices
oauthscope : MDMOnDemand.MDMDeviceMgmt.CREATE

POST /apps/{app_id}/devices

Request Example

  
$ curl {BaseURL}/apps/{app_id}/devices -X POST -H "Authorization: Zoho-authtoken ba4604e8e433g9c892e360d53463oec5" -H "Content-Type: application/json;charset=UTF-8" -d '{ "device_ids": [ 1, 2, 3 ], "silent_install": true, "notify_user_via_email": true }'

Response Example

  
HTTP/1.1 200 OK Content-Type:application/json;charset=UTF-8 { "device_ids": [ 1, 2, 3 ] }

ARGUMENTS

device_ids
Required
List of device IDs
silent_install
Optional
To allow silent installation of the app. Enter 'False' for manual installation from App Catalog.
notify_user_via_email
Optional
Notify users by e-mail upon distributing the app

Associate an app to a group

Associate an app to a particular group
oauthscope : MDMOnDemand.MDMDeviceMgmt.CREATE

POST /apps/{app_id}/group/{group_id}

Request Example

  
$ curl {BaseURL}/apps/{app_id}/group/{group_id} -X POST -H "Authorization: Zoho-authtoken ba4604e8e433g9c892e360d53463oec5" -H "Content-Type: application/json;charset=UTF-8" -d '{ "silent_install": true, "notify_user_via_email": true }'

Response Example

  
HTTP/1.1 202 Accepted

ARGUMENTS

silent_install
Optional
To allow silent installation of the app. Enter 'False' for manual installation from App Catalog.
notify_user_via_email
Optional
Notify users by e-mail upon distributing the app

Associate an app to groups

Associate an app to multiple groups
oauthscope : MDMOnDemand.MDMDeviceMgmt.CREATE

POST /apps/{app_id}/groups

Request Example

  
$ curl {BaseURL}/apps/{app_id}/groups -X POST -H "Authorization: Zoho-authtoken ba4604e8e433g9c892e360d53463oec5" -H "Content-Type: application/json;charset=UTF-8" -d '{ "group_ids": [ 1, 2, 3 ], "silent_install": true, "notify_user_via_email": true }'

Response Example

  
HTTP/1.1 200 OK Content-Type:application/json;charset=UTF-8 { "group_ids": [ 1, 2, 3 ] }

ARGUMENTS

group_ids
Required
List of group IDs
silent_install
Optional
To allow silent installation of the app. Enter 'False' for manual installation from App Catalog.
notify_user_via_email
Optional
Notify users by e-mail upon distributing the app

Update an app

Update an app available in the App Repository on the MDM server
oauthscope : MDMOnDemand.MDMDeviceMgmt.CREATE

POST /apps

Request Example

  
$ curl {BaseURL}/apps -X POST -H "Authorization: Zoho-authtoken ba4604e8e433g9c892e360d53463oec5" -H "Content-Type: application/json;charset=UTF-8" -d '{ "app_name": "ME MDM", "app_type": 2, "app_file": 91273987129, "app_category_id": 2, "supported_devices": 3, "display_image": 91273987129, "description": "The is an enterprise app", "app_store_country_code": "US", "bundle_identifier": "com.manageengine.mdm.iosagent", "prevent_backup": false, "full_image": 91273987129 }'

Response Example

  
HTTP/1.1 200 OK Content-Type:application/json;charset=UTF-8 { "app_id": 99731238129, "app_name": "ME MDM", "app_category": "Education", "app_type": 2, "bundle_identifier": "com.manageengine.mdm.iosagent", "version": "1.1.1", "platform_type": 2, "description": "The is an enterprise app", "icon": "https://mdm.manageengine.com/mdm-logo.png", "store_url": "https://itunes.apple.com/in/app/manageengine-mdm/id720111835?mt=8", "is_app_paid": false, "country_code": "US", "store_id": "720111835", "added_time": 192031023091, "modified_time": 192831120931 }

ARGUMENTS

app_name
Optional
Name of the app
app_type
Optional
App type:
  1. Free Store App
  2. Paid Store App
  3. Enterprise App
app_file
Optional
File ID of the app package file uploaded to MDM using Files endpoint (Required for enterprise apps only)
app_category_id
Optional
Identifier for the app category
supported_devices
Optional
Supported Devices
  1. Smartphone
  2. Tablet
  3. Both Smartphone and tablet
display_image
Optional
File ID of the image uploaded to MDM using Files endpoint (Used for app icon)
description
Optional
A custom description of the app
app_store_country_code
Optional
Country code for the App Store (iOS Only)
bundle_identifier
Optional
App's bundle identifier
prevent_backup
Optional
Prevent app data backup during device backup.
full_image
Optional
File ID of the image uploaded to MDM using Files endpoint (Used for app icon)

Disassociate an app from a device

Disassociate an app from a particular device
oauthscope : MDMOnDemand.MDMDeviceMgmt.DELETE

DELETE /apps/{app_id}/devices/{device_id}

Request Example

  
$ curl {BaseURL}/apps/{app_id}/devices/{device_id} -X DELETE -H "Authorization: Zoho-authtoken ba4604e8e433g9c892e360d53463oec5" -H "Content-Type: application/json;charset=UTF-8"

Response Example

  
HTTP/1.1 204 No Content

Disassociate an app from a group

Disassociate an app from a group
oauthscope : MDMOnDemand.MDMDeviceMgmt.DELETE

DELETE /apps/{app_id}/groups/{group_id}

Request Example

  
$ curl {BaseURL}/apps/{app_id}/groups/{group_id} -X DELETE -H "Authorization: Zoho-authtoken ba4604e8e433g9c892e360d53463oec5" -H "Content-Type: application/json;charset=UTF-8"

Response Example

  
HTTP/1.1 204 No Content

Delete an existing app

Delete an existing app from the MDM App Repository
oauthscope : MDMOnDemand.MDMDeviceMgmt.DELETE

DELETE /apps/{app_id}

Request Example

  
$ curl {BaseURL}/apps/{app_id} -X DELETE -H "Authorization: Zoho-authtoken ba4604e8e433g9c892e360d53463oec5" -H "Content-Type: application/json;charset=UTF-8"

Response Example

  
HTTP/1.1 204 No Content