リクエストで認証されたサービス アカウントに関連付けられているエンタープライズ用の通知セットを取得して返します。保留中の通知がない場合、通知セットは空になることがあります。
返された通知セットは、通知セットが空でない場合、Enterprises.AcknowledgeNotificationSet を呼び出して 20 秒以内に確認する必要があります。
20 秒以内に確認応答がない場合、通知は最終的に別の PullNotificationSet リクエストのレスポンスに再び含まれます。確認応答がない場合、最終的には Google Cloud Platform Pub/Sub システム ポリシーに従って削除されます。
通知を取得するために複数のリクエストが同時に実行される場合があります。その場合、保留中の通知(ある場合)は、各呼び出し元に分割されます(保留中の通知がある場合)。
通知が存在しない場合、空の通知リストが返されます。後続のリクエストでは、利用可能になった通知が返される場合があります。
リクエスト
HTTP リクエスト
POST https://www.googleapis.com/androidenterprise/v1/enterprises/pullNotificationSet
パラメータ
| パラメータ名 | 値 | 説明 | 
|---|---|---|
| 省略可能なクエリ パラメータ | ||
| requestMode | string | 通知の pull のリクエスト モード。 waitForNotificationsを指定すると、リクエストがブロックされ、1 つ以上の通知が存在するまで待機します。しばらく待っても通知が存在しない場合、空の通知リストが返されます。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
                }
              ]
            }
          ]
        }
      },
      "enterpriseUpgradeEvent": {
        "upgradeState": string
      }
    }
  ]
}| プロパティ名 | 値 | 説明 | メモ | 
|---|---|---|---|
| notificationSetId | string | 通知セット ID。Enterprises.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 | 商品が承認されたか不承認になったか。このフィールドは常に存在します。 有効な値は次のとおりです。 
 | |
| 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 | インストールが失敗した理由。このフィールドは常に存在します。 有効な値は次のとおりです。 
 | |
| 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 | アプリが現在リクエストしている権限のセット。EMM API の Permissions.Get を使用して、これらの権限の詳細を取得します。 | |
| notification[].newPermissionsEvent.approvedPermissions[] | list | エンタープライズ管理者がこのアプリに対してすでに承認している権限のセット。EMM API の Permissions.Get を使用して、これらの権限の詳細を取得します。 | |
| 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 | 商品の新しい状態。このフィールドは常に存在します。 有効な値は次のとおりです。 
 | |
| notification[].newDeviceEvent | nested object | 新しいデバイスに関する通知。 | |
| notification[].newDeviceEvent.userId | string | ユーザーの ID。このフィールドは常に存在します。 | |
| notification[].newDeviceEvent.deviceId | string | デバイスの Android ID。このフィールドは常に存在します。 | |
| notification[].newDeviceEvent.managementType | string | さまざまなデプロイ構成で Android EMM によってデバイスが制御される程度を特定します。 有効な値は次のとおりです。 
 有効な値は次のとおりです。 
 | |
| notification[].notificationType | string | 通知のタイプ。 有効な値は次のとおりです。 
 | |
| 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 | アプリの状態の重大度。このフィールドは常に存在します。 有効な値は次のとおりです。 
 | |
| notification[].deviceReportUpdateEvent.report.appState[].keyedAppState[].message | string | アプリの状態を説明する、自由形式の、人が読める形式のメッセージ。たとえば、エラー メッセージなどです。XSS を防ぐため、メッセージを表示する前に HTML を削除することをおすすめします。 | |
| notification[].deviceReportUpdateEvent.report.appState[].keyedAppState[].data | string | 機械読み取り可能なデータ用の追加フィールド。たとえば、数値や JSON オブジェクトなどです。XSS を防ぐには、データを表示する前にデータから HTML を削除することをおすすめします。 | |
| kind | string | ||
| notification[].enterpriseUpgradeEvent | nested object | エンタープライズ アップグレードに関する通知。 | |
| notification[].enterpriseUpgradeEvent.upgradeState | string | アップグレードの状態。 有効な値は次のとおりです。 
 |