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를 지정하면 요청이 차단되고 하나 이상의 알림이 있을 때까지 기다리거나 일정 시간이 지난 후 알림이 없으면 빈 알림 목록을 반환합니다.
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 Enterprises.AcknowledgeNotification API를 사용하여 알림을 수신됨으로 표시하는 데 필요한 알림 세트 ID입니다. 알림이 없으면 생략됩니다.
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 앱이 현재 요청하는 권한 집합입니다. EMM API를 사용하여 이러한 권한에 대한 세부정보를 검색하세요.
notification[].newPermissionsEvent.approvedPermissions[] list 기업 관리자가 이 애플리케이션에 대해 이미 승인한 권한 집합입니다. 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