Pulls and returns a notification set for the enterprises associated with
the service account authenticated for the request. The notification set may
be empty if no notification are pending.
A notification set returned needs to be acknowledged within 20 seconds
by calling Enterprises.AcknowledgeNotificationSet, unless the
notification set is empty.
Notifications that are not acknowledged within the 20 seconds will
eventually be included again in the response to another PullNotificationSet
request, and those that are never acknowledged will ultimately be deleted
according to the Google Cloud Platform Pub/Sub system policy.
Multiple requests might be performed concurrently to retrieve
notifications, in which case the pending notifications (if any) will be
split among each caller, if any are pending.
If no notifications are present, an empty notification list is returned.
Subsequent requests may return more notifications once they become
available.
Request
HTTP request
POST https://www.googleapis.com/androidenterprise/v1/enterprises/pullNotificationSet
Parameters
requestMode
string
Specifying
waitForNotifications
will cause the request to
block and wait until one or more notifications are present, or return an
empty notification list if no notifications are present after some time.Speciying
returnImmediately
will cause the request to
immediately return the pending notifications, or an empty list if no
notifications are present.If omitted, defaults to
waitForNotifications
.Acceptable values are:
- "
returnImmediately
" - "
waitForNotifications
"
Authorization
This request requires authorization with the following scope:
Scope |
---|
https://www.googleapis.com/auth/androidenterprise
|
For more information, see the authentication and authorization page.
Request body
Do not supply a request body with this method.
Response
If successful, this method returns a response body with the following structure:
{ "kind" : "androidenterprise#notificationSet" , "notificationSetId" : string , "notification" : [ { "enterpriseId" : string , "timestampMillis" : long , "notificationType" : string , "productApprovalEvent" : { "productId" : string , "approved" : string } , "installFailureEvent" : { "productId" : string , "deviceId" : string , "userId" : string , "failureReason" : string , "failureDetails" : string } , "appUpdateEvent" : { "productId" : string } , "newPermissionsEvent" : { "productId" : string , "requestedPermissions" : [ string ], "approvedPermissions" : [ string ] } , "appRestrictionsSchemaChangeEvent" : { "productId" : string } , "productAvailabilityChangeEvent" : { "productId" : string , "availabilityStatus" : string } , "newDeviceEvent" : { "userId" : string , "deviceId" : string , "managementType" : string , "dpcPackageName" : string } , "deviceReportUpdateEvent" : { "userId" : string , "deviceId" : string , "report" : { "lastUpdatedTimestampMillis" : long , "appState" : [ { "packageName" : string , "keyedAppState" : [ { "key" : string , "stateTimestampMillis" : long , "severity" : string , "message" : string , "data" : string } ] } ] } } , "enterpriseUpgradeEvent" : { "upgradeState" : string } } ] }
notificationSetId
string
notification[]
list
notification[].
enterpriseId
string
notification[].
productApprovalEvent
nested object
notification[].productApprovalEvent.
productId
string
notification[].productApprovalEvent.
approved
string
Acceptable values are:
- "
approved
" - "
unapproved
" - "
unknown
"
notification[].
installFailureEvent
nested object
notification[].installFailureEvent.
productId
string
notification[].installFailureEvent.
deviceId
string
notification[].installFailureEvent.
userId
string
notification[].installFailureEvent.
failureReason
string
Acceptable values are:
- "
timeout
" - "
unknown
"
notification[].installFailureEvent.
failureDetails
string
notification[].
appUpdateEvent
nested object
notification[].appUpdateEvent.
productId
string
notification[].
newPermissionsEvent
nested object
notification[].newPermissionsEvent.
productId
string
notification[].newPermissionsEvent.
requestedPermissions[]
list
notification[].newPermissionsEvent.
approvedPermissions[]
list
notification[].
appRestrictionsSchemaChangeEvent
nested object
notification[].appRestrictionsSchemaChangeEvent.
productId
string
notification[].
productAvailabilityChangeEvent
nested object
notification[].productAvailabilityChangeEvent.
productId
string
notification[].productAvailabilityChangeEvent.
availabilityStatus
string
Acceptable values are:
- "
available
" - "
removed
" - "
unknown
" - "
unpublished
"
notification[].
newDeviceEvent
nested object
notification[].newDeviceEvent.
userId
string
notification[].newDeviceEvent.
deviceId
string
notification[].newDeviceEvent.
managementType
string
Possible values include:
- "
managedDevice
", a device where the DPC is set as device owner, - "
managedProfile
", a device where the DPC is set as profile owner.
Acceptable values are:
- "
managedDevice
" - "
managedProfile
"
notification[].
notificationType
string
Acceptable values are:
- "
appRestricionsSchemaChange
" - "
appUpdate
" - "
deviceReportUpdate
" - "
enterpriseUpgrade
" - "
installFailure
" - "
newDevice
" - "
newPermissions
" - "
productApproval
" - "
productAvailabilityChange
" - "
testNotification
" - "
unknown
"
notification[].newDeviceEvent.
dpcPackageName
string
notification[].
deviceReportUpdateEvent
nested object
notification[].deviceReportUpdateEvent.
userId
string
notification[].deviceReportUpdateEvent.
deviceId
string
notification[].deviceReportUpdateEvent.
report
nested object
notification[].deviceReportUpdateEvent.report.
lastUpdatedTimestampMillis
long
notification[].deviceReportUpdateEvent.report.
appState[]
list
notification[].deviceReportUpdateEvent.report.appState[].
packageName
string
notification[].deviceReportUpdateEvent.report.appState[].
keyedAppState[]
list
notification[].deviceReportUpdateEvent.report.appState[].keyedAppState[].
key
string
notification[].deviceReportUpdateEvent.report.appState[].keyedAppState[].
stateTimestampMillis
long
notification[].deviceReportUpdateEvent.report.appState[].keyedAppState[].
severity
string
Acceptable values are:
- "
severityError
" - "
severityInfo
"
notification[].deviceReportUpdateEvent.report.appState[].keyedAppState[].
data
string
kind
string
notification[].
enterpriseUpgradeEvent
nested object
notification[].enterpriseUpgradeEvent.
upgradeState
string
Acceptable values are:
- "
upgradeStateSucceeded
" - "
upgradeStateUnspecified
"