Enterprises: pullNotificationSet

リクエストに対して認証されたサービス アカウントに関連付けられた企業に通知セットを取得して取得します。保留中の通知がない場合は、通知セットが空になることがあります。
通知セットが空でない限り、返された通知セットは 20 秒以内に Enterprises.AcknowledgeNotificationSet を呼び出して確認応答する必要があります。
20 秒以内に確認応答されなかった通知は、最終的に別の PullNotificationSet リクエストへのレスポンスに再び含まれます。また、確認応答されなかった通知は、最終的に Google Cloud Platform Pub/Sub システム ポリシーに従って削除されます。
通知を取得するために、複数のリクエストを同時に実行する場合があります。その場合、保留中の通知(存在する場合)は、保留中の場合は各呼び出し元間で分割されます。
通知が存在しない場合は、空の通知リストが返されます。それ以降のリクエストは、利用可能になった時点でより多くの通知を返す場合があります。

リクエスト

HTTP リクエスト

POST https://www.googleapis.com/androidenterprise/v1/enterprises/pullNotificationSet

パラメータ

パラメータ名 説明
省略可能なクエリ パラメータ
requestMode string 通知を取得するためのリクエスト モード。
waitForNotifications を指定すると、リクエストはブロックされ、1 つ以上の通知が存在するまで待機します。しばらく経っても通知が存在しない場合は空の通知リストを返します。
returnImmediately を指定すると、リクエストはすぐに保留中の通知を返します。通知がない場合は空のリストを返します。
省略した場合、デフォルトは waitForNotifications です。

有効な値は次のとおりです。
  • "returnImmediately"
  • "waitForNotifications"

承認

このリクエストには、次のスコープによる認証が必要です。

範囲
https://www.googleapis.com/auth/androidenterprise

詳細については、認証と承認のページをご覧ください。

リクエスト本文

このメソッドをリクエストの本文に含めないでください。

レスポンス

成功すると、このメソッドは次の構造を含むレスポンスの本文を返します。

{
  "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
                }
              ]
            }
          ]
        }
      }
    }
  ]
}
プロパティ名 説明 備考
notificationSetId string 通知セット ID。Enterprise.AcknowledgeNotification API を使用して通知を受信済みとしてマークするために必要です。通知が存在しない場合は省略されます。
notification[] list 受信した通知。通知がない場合は空です。
notification[].enterpriseId string 通知の送信先となる企業の ID。これは常に存在します。
notification[].timestampMillis long 通知を 1970-01-01T00:00:00Z からパブリッシュした時刻(ミリ秒単位)。これは常に存在します。
notification[].productApprovalEvent nested object 商品の承認状況の変更に関する通知
notification[].productApprovalEvent.productId string 承認ステータスが変更されたサービスの ID(例: 「app:com.google.android.gm」)。このフィールドは常に存在します。
notification[].productApprovalEvent.approved string 商品が承認済みか未承認か。このフィールドは常に存在します。

有効な値は次のとおりです。
  • approved
  • unapproved
  • unknown
notification[].installFailureEvent nested object アプリのインストール失敗に関する通知です。
notification[].installFailureEvent.productId string インストールの失敗イベントが発生したプロダクトの ID(「app:com.google.android.gm」など)。このフィールドは常に存在します。
notification[].installFailureEvent.deviceId string デバイスの Android ID。このフィールドは常に存在します。
notification[].installFailureEvent.userId string ユーザーの ID。このフィールドは常に存在します。
notification[].installFailureEvent.failureReason string インストールに失敗した理由。このフィールドは常に存在します。

有効な値は次のとおりです。
  • timeout
  • unknown
notification[].installFailureEvent.failureDetails string エラーに関する追加情報(該当する場合)。
notification[].appUpdateEvent nested object アプリのアップデートに関する通知です。
notification[].appUpdateEvent.productId string 更新されたサービスの ID(例: 「app:com.google.android.gm」)。このフィールドは常に存在します。
notification[].newPermissionsEvent nested object アプリの新しい権限に関する通知
notification[].newPermissionsEvent.productId string 新しい権限が追加されたサービスの ID(例: 「app:com.google.android.gm」)。このフィールドは常に存在します。
notification[].newPermissionsEvent.requestedPermissions[] list アプリが現在リクエストしている権限のセット。Permissions.Get を使用して、EMM API でこれらの権限の詳細を取得します。
notification[].newPermissionsEvent.approvedPermissions[] list 企業管理者がこのアプリについてすでに承認している権限のセットです。Permissions.Get を使用して、EMM API でこれらの権限の詳細を取得します。
notification[].appRestrictionsSchemaChangeEvent nested object 新しいアプリ制限スキーマの変更に関する通知。
notification[].appRestrictionsSchemaChangeEvent.productId string アプリ制限スキーマが変更されたサービスの ID(例: 「app:com.google.android.gm」)。このフィールドは常に存在します。
notification[].productAvailabilityChangeEvent nested object 商品の在庫状況の変更に関する通知。
notification[].productAvailabilityChangeEvent.productId string 商品の在庫状況が変更された商品の ID(「app:com.google.android.gm」など)。このフィールドは常に存在します。
notification[].productAvailabilityChangeEvent.availabilityStatus string 商品の新しい状態。このフィールドは常に存在します。

有効な値は次のとおりです。
  • available
  • removed
  • unknown
  • unpublished
notification[].newDeviceEvent nested object 新しいデバイスに関する通知。
notification[].newDeviceEvent.userId string ユーザーの ID。このフィールドは常に存在します。
notification[].newDeviceEvent.deviceId string デバイスの Android ID。このフィールドは常に存在します。
notification[].newDeviceEvent.managementType string さまざまなデプロイ構成で、デバイスが Android EMM によって制御される度合いを示します。

有効な値は次のとおりです。
  • DPC がデバイス所有者として設定されたデバイス「managedDevice
  • managedProfile」は、DPC がプロファイル所有者として設定されたデバイスです。


有効な値は次のとおりです。
  • "managedDevice"
  • managedProfile
notification[].notificationType string 通知のタイプ。

有効な値は次のとおりです。
  • appRestricionsSchemaChange
  • appUpdate
  • deviceReportUpdate
  • installFailure
  • newDevice
  • newPermissions
  • productApproval
  • productAvailabilityChange
  • testNotification
  • unknown
notification[].newDeviceEvent.dpcPackageName string デバイスのポリシーアプリ。
notification[].deviceReportUpdateEvent nested object デバイス レポートの更新に関する通知。
notification[].deviceReportUpdateEvent.userId string ユーザーの ID。このフィールドは常に存在します。
notification[].deviceReportUpdateEvent.deviceId string デバイスの Android ID。このフィールドは常に存在します。
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 アプリが状態を提供している対象を示すキー。キーのコンテンツはアプリのデベロッパーが設定します。XSS の発生を防ぐため、キーから HTML を削除してから表示することをおすすめします。このフィールドは常に存在します。
notification[].deviceReportUpdateEvent.report.appState[].keyedAppState[].stateTimestampMillis long アプリが状態を設定したときのタイムスタンプ(エポックからの時間、ミリ秒単位)。このフィールドは常に存在します。
notification[].deviceReportUpdateEvent.report.appState[].keyedAppState[].severity string アプリの状態。このフィールドは常に存在します。

有効な値は次のとおりです。
  • severityError
  • severityInfo
notification[].deviceReportUpdateEvent.report.appState[].keyedAppState[].message string アプリの状態を説明する、人が読める形式の自由形式のメッセージです。(エラー メッセージなど)。XSS を防ぐには、メッセージから HTML を削除してから表示することをおすすめします。
notification[].deviceReportUpdateEvent.report.appState[].keyedAppState[].data string 機械読み取り可能なデータを対象とする追加フィールド。たとえば、数値や JSON オブジェクトです。XSS を防ぐには、データから HTML を削除してから表示することをおすすめします。
kind string