Skip to content

Depot mdmandroid

Registers the Android Enterprise routes.

This page is generated from the Depot route table. Every operation carries the permission it needs and the anchor an agent can link to.

GETmdm:readtenant facehosteditmspremoteIdempotent

From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.

Source: [object Object]

listMdmAndroidEnrollmentTokens lists Android enrollment tokens, newest first; expired and revoked ones with includeExpired=true.

The enrollment value and QR code are included for usable tokens when the caller holds mdm:enroll.

NameInTypeRequiredDescription
includeExpiredquerystringNo
pagequeryintegerNoOne-based page number. Defaults to 1.
pageSizequeryintegerNoRows per page, 1 to 200. Defaults to 50.
StatusBodyDescription
200application/json, PagedResultAndroidTokenViewSuccess.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold mdm:read.
500application/problem+json, ProblemDetailsNo client context in request.

200 response body

FieldTypeDescription
itemsrequiredarray of AndroidTokenView
items[].allowPersonalUsagerequiredstring
items[].createdAtrequiredstring (date-time)
items[].enrollmentUrlstring or null
items[].expiresAtrequiredstring (date-time)
items[].moderequiredstring
items[].ownershiprequiredstring
items[].publicIdrequiredstring
items[].qrPayloadstring or null
items[].qrPngstring or null
items[].revokedAtstring (date-time) or null
items[].setupCodestring or null
items[].siteIdstring or null
items[].statusrequiredstring
items[].valuestring or null
pagerequiredinteger
pageSizerequiredinteger
totalrequiredinteger
Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
# This operation is idempotent. Repeating it does not repeat its effect.
curl -X GET 'https://depot.example.com/api/v1/mdm/android/enrollment-tokens?includeExpired=<includeExpired>&page=0&pageSize=0' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-b 'outpost_console=<console-session>'

POST /api/v1/mdm/android/enrollment-tokens

Section titled “POST /api/v1/mdm/android/enrollment-tokens”

POSTmdm:enrolltenant facehosteditmspremote

From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.

Source: [object Object]

createMdmAndroidEnrollmentToken creates an Android enrollment token for a mode (fully_managed, dedicated or work_profile) and returns its value, QR provisioning payload and enrollment link.

Required, sent as application/json.

FieldTypeDescription
allowPersonalUsagestring or null
moderequiredstring
ownershipstring or null
siteIdstring or null
ttlSecondsinteger or null

int64.

StatusBodyDescription
201application/json, AndroidTokenViewCreated.
400application/problem+json, ProblemDetailsThe request body is not valid JSON.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold mdm:enroll.
409application/problem+json, ProblemDetailsConnect Android Enterprise before creating enrollment tokens.
500application/problem+json, ProblemDetailsNo client context in request.
502application/problem+json, ProblemDetailsGoogle did not return an enrollment token.
503application/problem+json, ProblemDetailsThe public device management address is not configured on this Depot, so Android Enterprise cannot be connected yet.

201 response body

FieldTypeDescription
allowPersonalUsagerequiredstring
createdAtrequiredstring (date-time)
enrollmentUrlstring or null
expiresAtrequiredstring (date-time)
moderequiredstring
ownershiprequiredstring
publicIdrequiredstring
qrPayloadstring or null
qrPngstring or null
revokedAtstring (date-time) or null
setupCodestring or null
siteIdstring or null
statusrequiredstring
valuestring or null
Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
curl -X POST 'https://depot.example.com/api/v1/mdm/android/enrollment-tokens' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-b 'outpost_console=<console-session>' \
--data '{
"allowPersonalUsage": "string",
"mode": "string",
"ownership": "string",
"siteId": "string",
"ttlSeconds": 0
}'

DELETE /api/v1/mdm/android/enrollment-tokens/{publicId}

Section titled “DELETE /api/v1/mdm/android/enrollment-tokens/{publicId}”

DELETEmdm:enrolltenant facehosteditmspremoteIdempotent

From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.

Source: [object Object]

revokeMdmAndroidEnrollmentToken revokes an enrollment token at Google and in Outpost, so no more devices can enroll with it.

Devices already enrolled are not affected. Allowed while Android management is switched off, because it is cleanup.

NameInTypeRequiredDescription
publicIdpathstringYes
StatusBodyDescription
204NoneSuccess, with no body.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold mdm:enroll.
404application/problem+json, ProblemDetailsNo usable enrollment token has that id.
409application/problem+json, ProblemDetailsThis client already has an Android Enterprise. Remove it first to connect a different one.
500application/problem+json, ProblemDetailsNo client context in request.
503application/problem+json, ProblemDetailsThe public device management address is not configured on this Depot, so Android Enterprise cannot be connected yet.
Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
# This operation is idempotent. Repeating it does not repeat its effect.
curl -X DELETE 'https://depot.example.com/api/v1/mdm/android/enrollment-tokens/<publicId>' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-b 'outpost_console=<console-session>'

GETmdm:readtenant facehosteditmspremoteIdempotent

From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.

Source: [object Object]

getMdmAndroidEnterprise reads the client’s Android Enterprise binding; 404 when there is none.

StatusBodyDescription
200application/json, AndroidEnterpriseViewSuccess.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold mdm:read.
404application/problem+json, ProblemDetailsThis client has no Android Enterprise.
500application/problem+json, ProblemDetailsNo client context in request.

200 response body

FieldTypeDescription
adminEmailstring or null
boundAtstring (date-time) or null
displayNamestring or null
enterpriseNamestring or null
lastReconcileAtstring (date-time) or null
publicIdrequiredstring
rowVersionrequiredinteger

int64.

staterequiredstring
Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
# This operation is idempotent. Repeating it does not repeat its effect.
curl -X GET 'https://depot.example.com/api/v1/mdm/android/enterprise' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-b 'outpost_console=<console-session>'

DELETEmdm:managetenant facehosteditmspremoteIdempotent

From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.

Source: [object Object]

deleteMdmAndroidEnterprise removes the client’s Android Enterprise at Google and unbinds it.

Enrolled devices stop being managed. Allowed while Android management is switched off, because it is cleanup.

StatusBodyDescription
204NoneSuccess, with no body.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold mdm:manage.
404application/problem+json, ProblemDetailsThis client has no Android Enterprise.
409application/problem+json, ProblemDetailsThis client already has an Android Enterprise. Remove it first to connect a different one.
500application/problem+json, ProblemDetailsNo client context in request.
503application/problem+json, ProblemDetailsThe public device management address is not configured on this Depot, so Android Enterprise cannot be connected yet.
Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
# This operation is idempotent. Repeating it does not repeat its effect.
curl -X DELETE 'https://depot.example.com/api/v1/mdm/android/enterprise' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-b 'outpost_console=<console-session>'

POST /api/v1/mdm/android/enterprise/complete

Section titled “POST /api/v1/mdm/android/enterprise/complete”

POSTmdm:managetenant facehosteditmspremoteIdempotent

From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.

Source: [object Object]

completeMdmAndroidEnterprise finishes the signup with the enterpriseToken Google returned.

The signup callback page does the same on its own; this is the console’s way to finish it.

Required, sent as application/json.

FieldTypeDescription
enterpriseTokenrequiredstring
StatusBodyDescription
200application/json, AndroidEnterpriseViewSuccess.
400application/problem+json, ProblemDetailsThe request body is not valid JSON.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold mdm:manage.
409application/problem+json, ProblemDetailsThis client already has an Android Enterprise. Remove it first to connect a different one.
500application/problem+json, ProblemDetailsNo client context in request.
503application/problem+json, ProblemDetailsThe public device management address is not configured on this Depot, so Android Enterprise cannot be connected yet.

200 response body

FieldTypeDescription
adminEmailstring or null
boundAtstring (date-time) or null
displayNamestring or null
enterpriseNamestring or null
lastReconcileAtstring (date-time) or null
publicIdrequiredstring
rowVersionrequiredinteger

int64.

staterequiredstring
Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
# This operation is idempotent. Repeating it does not repeat its effect.
curl -X POST 'https://depot.example.com/api/v1/mdm/android/enterprise/complete' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-b 'outpost_console=<console-session>' \
--data '{
"enterpriseToken": "string"
}'

POST /api/v1/mdm/android/enterprise/signup

Section titled “POST /api/v1/mdm/android/enterprise/signup”

POSTmdm:managetenant facehosteditmspremoteIdempotent

From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.

Source: [object Object]

signupMdmAndroidEnterprise starts the Android Enterprise signup: it returns Google’s signup URL and records the pending binding.

Google sends the admin back to Outpost when they finish.

Required, sent as application/json.

FieldTypeDescription
adminEmailstring or null
StatusBodyDescription
200application/json, AndroidSignupViewSuccess.
400application/problem+json, ProblemDetailsThe request body is not valid JSON.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold mdm:manage.
409application/problem+json, ProblemDetailsThis client already has an Android Enterprise. Remove it first to connect a different one.
500application/problem+json, ProblemDetailsNo client context in request.
503application/problem+json, ProblemDetailsThe public device management address is not configured on this Depot, so Android Enterprise cannot be connected yet.

200 response body

FieldTypeDescription
enterpriserequiredAndroidEnterpriseView

androidEnterpriseView is the client's Android Enterprise binding.

enterprise.adminEmailstring or null
enterprise.boundAtstring (date-time) or null
enterprise.displayNamestring or null
enterprise.enterpriseNamestring or null
enterprise.lastReconcileAtstring (date-time) or null
enterprise.publicIdrequiredstring
enterprise.rowVersionrequiredinteger

int64.

enterprise.staterequiredstring
urlrequiredstring
Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
# This operation is idempotent. Repeating it does not repeat its effect.
curl -X POST 'https://depot.example.com/api/v1/mdm/android/enterprise/signup' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-b 'outpost_console=<console-session>' \
--data '{
"adminEmail": "string"
}'

POSTmdm:managetenant facehosteditmspremoteIdempotent

From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.

Source: [object Object]

createMdmAndroidWebToken creates a Managed Google Play iframe token for the console page at parentFrameUrl, where admins approve and manage apps.

Required, sent as application/json.

FieldTypeDescription
parentFrameUrlrequiredstring
StatusBodyDescription
200application/json, AndroidWebTokenViewSuccess.
400application/problem+json, ProblemDetailsThe request body is not valid JSON.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold mdm:manage.
409application/problem+json, ProblemDetailsConnect Android Enterprise before opening Managed Google Play.
500application/problem+json, ProblemDetailsNo client context in request.
502application/problem+json, ProblemDetailsGoogle did not return a Managed Google Play token.
503application/problem+json, ProblemDetailsThe public device management address is not configured on this Depot, so Android Enterprise cannot be connected yet.

200 response body

FieldTypeDescription
iframeUrlrequiredstring
tokenrequiredstring
Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
# This operation is idempotent. Repeating it does not repeat its effect.
curl -X POST 'https://depot.example.com/api/v1/mdm/android/web-token' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-b 'outpost_console=<console-session>' \
--data '{
"parentFrameUrl": "string"
}'

Content is licensed CC BY 4.0. Code samples are MIT. Outpost and the Outpost mark are trademarks of Outpost Business Solutions, PBC and are not covered by either license.