Users

Users

Manage the available users

Attribute

email_address
string
email address of the user
user_id
string
unique id of the user
name
string
holds name of the managed user
phone_number
string
holds phone number of the managed user
domain
string
Domain of the user

Example

[ { "email_address": "email_address@zylker.com", "user_id": 9007199254741000, "name": "admin", "phone_number": "+91-9876****99", "domain": "mdm" } ]

Get Managed Users

Get list of managed users
oauthscope : MDMOnDemand.MDMUser.READ

GET - /api/v1/mdm/users

Query Parameters

user_identifier
allowed values: name, email_id
include
Include the aduserdetails
user_type
list of user type of the device in comma separated
id
id of the Group
select_all
select_all to get all values details

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/users", 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/users") .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/users \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 200 OK
{ "users": [ { "email_address": "email_address@zylker.com", "user_id": 9007199254741000, "name": "admin", "phone_number": "+91-9876****99", "domain": "mdm" } ], "metadata": { "total_record_count": 150 }, "paging": { "next": "http://localhost:9020/api/v1/mdm/users?skip-token=NDo1OjE6MTU2ODcyMzM5NjUwOQ%3D%3D" } }

Remove Multiple Users

Remove multiple users
oauthscope : MDMOnDemand.MDMUser.CREATE

POST - /api/v1/mdm/users

Arguments

user_ids
string
(Required)
Manage the available users IDs to be removed

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/users", 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/users") .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/users \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "user_ids": [ "9007199254740999", "9007199254756659" ] }

Response Example

HTTP/1.1 204 No Content

Get User Details

Get details of a managed user
oauthscope : MDMOnDemand.MDMUser.READ

GET - /api/v1/mdm/users/{user_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/users/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.com/api/v1/mdm/users/9007199254741000") .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/users/9007199254741000 \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 200 OK
{ "user_email": "user_email@zylker.com", "user_id": 9007199254741000, "name": "admin", "phone_number": "+91-9876****99", "device_count": 0 }

Remove User

Remove a specific user
oauthscope : MDMOnDemand.MDMUser.CREATE

POST - /api/v1/mdm/users/{user_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("POST", "/api/v1/mdm/users/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.com/api/v1/mdm/users/9007199254741000") .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/users/9007199254741000 \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 204 No Content

Modify User

Modify user

PUT - /api/v1/mdm/users/{user_id}

Arguments

user_email
string
(Required)
email address of the user
user_name
string
(Required)
holds name of the managed user
phone_number
string
(Required)
holds phone number of the managed 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("PUT", "/api/v1/mdm/users/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.com/api/v1/mdm/users/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.com/api/v1/mdm/users/9007199254741000 \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "user_email": "user_email@zylker.com", "user_name": "Mr Zylker", "phone_number": "+91-9876****99" }

Response Example

HTTP/1.1 202 Accepted

Get devices for User

Get device ids for a user
oauthscope : MDMOnDemand.MDMUser.READ

GET - /api/v1/mdm/users/devices

Query Parameters

email_id
The email address of the user
domain_name
The domain name of the user

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/users/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.com/api/v1/mdm/users/devices") .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/users/devices \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

HTTP/1.1 200 OK
{ "device_ids": [ "98765456789", "32456432136" ] }