Multiple VPP tokens
Multiple VPP tokens
Attribute
1 - User Based Assignment
2 - Device Based Assignment
{
"non_vpp_app_count": 2,
"vpp_token_details": [
{
"businessstore_id": 9007199254741896,
"organisation_name": "ZOHO Corporation",
"license_assign_type": 2,
"location_name": "Location Name - 2"
}
],
"trash_count": 0
}
Get All VPP Account Details
This fetches the details of all available/added location tokens. These details can be synced with the MDM server using the Sync option.oauthscope : MDMOnDemand.MDMDeviceMgmt.READ
GET - /api/v1/mdm/apps/account/vpp
import http.client
conn = http.client.HTTPSConnection("www.mdm.manageengine.com.au")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/api/v1/mdm/apps/account/vpp", 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.au/api/v1/mdm/apps/account/vpp")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
curl --request GET \
--url https://www.mdm.manageengine.com.au/api/v1/mdm/apps/account/vpp \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
HTTP/1.1 200 OK{
"non_vpp_app_count": 2,
"vpp_token_details": [
{
"businessstore_id": 9007199254741896,
"organisation_name": "ZOHO Corporation",
"license_assign_type": 2,
"location_name": "Location Name - 2"
}
],
"trash_count": 0
}
Add VPP Account
This adds a new location token (Also known and referred to as VPP token or server token). Any apps added to the App Repository can be associated with its location token.oauthscope : MDMOnDemand.MDMDeviceMgmt.CREATE
POST - /api/v1/mdm/apps/account/vpp
Arguments
import http.client
conn = http.client.HTTPSConnection("www.mdm.manageengine.com.au")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/api/v1/mdm/apps/account/vpp", 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.au/api/v1/mdm/apps/account/vpp")
.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.au/api/v1/mdm/apps/account/vpp \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"vpp_token_file": 121313,
"email_address": "sysadmin@zylker.com"
}
HTTP/1.1 200 OK{
"location_name": "Location Name - 2",
"expired": false,
"businessstore_id": 9007199254741896,
"organisation_name": "ZOHO Corporation",
"expiry_date": 1639122831000
}
Remove All VPP Accounts
All the created location tokens get deleted from the MDM server. The apps associated with the location tokens will also be removed once the tokens are deleted.oauthscope : MDMOnDemand.MDMDeviceMgmt.DELETE
DELETE - /api/v1/mdm/apps/account/vpp
import http.client
conn = http.client.HTTPSConnection("www.mdm.manageengine.com.au")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("DELETE", "/api/v1/mdm/apps/account/vpp", 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.au/api/v1/mdm/apps/account/vpp")
.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.au/api/v1/mdm/apps/account/vpp \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
HTTP/1.1 202 Accepted
Get All Vpp Sync Status
This fetches all the sync status of created location tokens.oauthscope : MDMOnDemand.MDMDeviceMgmt.READ
GET - /api/v1/mdm/apps/account/vpp/sync
import http.client
conn = http.client.HTTPSConnection("www.mdm.manageengine.com.au")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/api/v1/mdm/apps/account/vpp/sync", 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.au/api/v1/mdm/apps/account/vpp/sync")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
curl --request GET \
--url https://www.mdm.manageengine.com.au/api/v1/mdm/apps/account/vpp/sync \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
HTTP/1.1 200 OK{
"vpp_sync_details": [
{
"if_sync_failed": true,
"failed_apps_count": 0,
"total_apps_count": 0,
"completed_apps_count": 0,
"successful_apps_count": 0,
"businessstore_id": 9007199254741896,
"status": 0,
"remarks": null,
"other_mdm_hostname": "Sample MDM"
}
]
}
Sync All VPP Accounts
This syncs all available location tokens.oauthscope : MDMOnDemand.MDMDeviceMgmt.CREATE
POST - /api/v1/mdm/apps/account/vpp/sync
import http.client
conn = http.client.HTTPSConnection("www.mdm.manageengine.com.au")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("POST", "/api/v1/mdm/apps/account/vpp/sync", 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.au/api/v1/mdm/apps/account/vpp/sync")
.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.au/api/v1/mdm/apps/account/vpp/sync \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
HTTP/1.1 202 Accepted
Get VPP Account Details
This fetches the details of a specific location token. Its details can be synced with the MDM server using the Sync option.oauthscope : MDMOnDemand.MDMDeviceMgmt.READ
GET - /api/mdm/apps/account/vpp/{vpp_id}
import http.client
conn = http.client.HTTPSConnection("www.mdm.manageengine.com.au")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/api/mdm/apps/account/vpp/987000000654321", 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.au/api/mdm/apps/account/vpp/987000000654321")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
curl --request GET \
--url https://www.mdm.manageengine.com.au/api/mdm/apps/account/vpp/987000000654321 \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
HTTP/1.1 200 OK{
"non_vpp_apps_count": 2,
"location_name": "Location Name - 2",
"total_apps_count": 0,
"expiry_date": 1639122831000,
"last_sync_time": 1621574248750,
"org_type": 1,
"organization_name": "ZOHO Corporation",
"businessstore_id": 9007199254741896,
"license_assign_type": 2
}
Modify VPP Account
This modifies the details of the location token. The edited details will be displayed on the MDM console.oauthscope : MDMOnDemand.MDMDeviceMgmt.CREATE
PUT - /api/mdm/apps/account/vpp/{vpp_id}
Arguments
import http.client
conn = http.client.HTTPSConnection("www.mdm.manageengine.com.au")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("PUT", "/api/mdm/apps/account/vpp/987000000654321", 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.au/api/mdm/apps/account/vpp/987000000654321")
.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.au/api/mdm/apps/account/vpp/987000000654321 \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"vpp_token_file": 121313,
"email_address": "sysadmin@zylker.com"
}
HTTP/1.1 202 Accepted
Remove VPP Account
This deletes a specific location token from the MDM server. The apps added to the location token will also be removed once the account is deleted.oauthscope : MDMOnDemand.MDMDeviceMgmt.DELETE
DELETE - /api/mdm/apps/account/vpp/{vpp_id}
import http.client
conn = http.client.HTTPSConnection("www.mdm.manageengine.com.au")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("DELETE", "/api/mdm/apps/account/vpp/987000000654321", 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.au/api/mdm/apps/account/vpp/987000000654321")
.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.au/api/mdm/apps/account/vpp/987000000654321 \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
HTTP/1.1 202 Accepted
Get VPP Failure Details
This fetches the required details if an app added using a location token fails to sync.oauthscope : MDMOnDemand.MDMDeviceMgmt.READ
GET - /api/mdm/apps/account/vpp/{vpp_id}/failure
import http.client
conn = http.client.HTTPSConnection("www.mdm.manageengine.com.au")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/api/mdm/apps/account/vpp/987000000654321/failure", 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.au/api/mdm/apps/account/vpp/987000000654321/failure")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
curl --request GET \
--url https://www.mdm.manageengine.com.au/api/mdm/apps/account/vpp/987000000654321/failure \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
HTTP/1.1 200 OK{
"apps": [
{
"appgroupid": 9007199254741296,
"appname": "ManageEngine MDM",
"displayimageloc": "https://www.zylker.com/image/thumb/display/source/100x100bb.jpg",
"licensecount": 8,
"packageid": 9007199254740996,
"resourcecount": 12
}
]
}
Get VPP Sync Status
This fetches the sync status of the location token.oauthscope : MDMOnDemand.MDMDeviceMgmt.READ
GET - /api/mdm/apps/account/vpp/sync/{vpp_id}
import http.client
conn = http.client.HTTPSConnection("www.mdm.manageengine.com.au")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/api/mdm/apps/account/vpp/sync/987000000654321", 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.au/api/mdm/apps/account/vpp/sync/987000000654321")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
curl --request GET \
--url https://www.mdm.manageengine.com.au/api/mdm/apps/account/vpp/sync/987000000654321 \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
HTTP/1.1 200 OK{
"if_license_insufficient": false,
"if_sync_failed": true,
"apps_with_insufficient_licenses": 0,
"failed_apps_count": 0,
"total_apps_count": 0,
"successful_apps_count": 0,
"last_sync_time": 1621574248750,
"completed_apps_count": 0,
"remarks": null,
"status": 0,
"other_mdm_hostname": "Sample MDM"
}
Sync VPP Account
This syncs a location token with the MDM console.oauthscope : MDMOnDemand.MDMDeviceMgmt.CREATE
POST - /api/mdm/apps/account/vpp/sync/{vpp_id}
Arguments
import http.client
conn = http.client.HTTPSConnection("www.mdm.manageengine.com.au")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/api/mdm/apps/account/vpp/sync/987000000654321", 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.au/api/mdm/apps/account/vpp/sync/987000000654321")
.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.au/api/mdm/apps/account/vpp/sync/987000000654321 \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"remove_from_other_mdm": true
}
HTTP/1.1 200 Success