更新 deviceLogCollectionResponse

命名空间:microsoft.graph

注意:适用于 Intune 的 Microsoft Graph API 需要适用于租户的活动 Intune 许可证

更新 deviceLogCollectionResponse 对象的属性。

权限

要调用此 API,需要以下权限之一。 若要了解详细信息,包括如何选择权限的信息,请参阅权限

权限类型 权限(从最低特权到最高特权)
委派(工作或学校帐户) DeviceManagementManagedDevices.ReadWrite.All
委派(个人 Microsoft 帐户) 不支持。
应用程序 DeviceManagementManagedDevices.ReadWrite.All

HTTP 请求

PATCH /deviceManagement/detectedApps/{detectedAppId}/managedDevices/{managedDeviceId}/logCollectionRequests/{deviceLogCollectionResponseId}

请求标头

标头
Authorization 持有者 {token}。 必填。 详细了解 身份验证和授权
接受 application/json

请求正文

在请求正文中,提供 deviceLogCollectionResponse 对象的 JSON 表示形式。

下表显示了创建 deviceLogCollectionResponse 时所需的属性。

属性 类型 说明
id String tenantId_deviceId_requestId形式的唯一标识符。
status appLogUploadState 指示应用日志收集请求的状态(如果请求挂起、已完成或失败),默认值为挂起。 可能的值是:pendingcompletedfailedunknownFutureValue
managedDeviceId Guid 指示Intune设备唯一标识符。
requestedDateTimeUTC DateTimeOffset 请求的 DateTime。
receivedDateTimeUTC DateTimeOffset 收到请求的 DateTime。
initiatedByUserPrincipalName String 发起请求的用户的 UPN。
expirationDateTimeUTC DateTimeOffset 日志过期的 DateTime。
sizeInKB 双精度 日志的大小(以 KB 为单位)。 有效值 -1.79769313486232E+308 到 1.79769313486232E+308
enrolledByUser String 注册设备的用户的 UPN (用户主体名称) 。

响应

如果成功,此方法在响应正文中返回响应 200 OK 代码和更新的 deviceLogCollectionResponse 对象。

示例

请求

下面是一个请求示例。

PATCH https://graph.microsoft.com/v1.0/deviceManagement/detectedApps/{detectedAppId}/managedDevices/{managedDeviceId}/logCollectionRequests/{deviceLogCollectionResponseId}
Content-type: application/json
Content-length: 508

{
  "@odata.type": "#microsoft.graph.deviceLogCollectionResponse",
  "status": "completed",
  "managedDeviceId": "3b336f00-6f00-3b33-006f-333b006f333b",
  "requestedDateTimeUTC": "2016-12-31T23:57:40.7845755-08:00",
  "receivedDateTimeUTC": "2016-12-31T23:59:48.6545758-08:00",
  "initiatedByUserPrincipalName": "Initiated By User Principal Name value",
  "expirationDateTimeUTC": "2017-01-01T00:02:49.2157996-08:00",
  "sizeInKB": 2.6666666666666665,
  "enrolledByUser": "Enrolled By User value"
}

响应

下面是一个响应示例。 注意:为简洁起见,可能会截断此处显示的响应对象。 将从实际调用中返回所有属性。

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 557

{
  "@odata.type": "#microsoft.graph.deviceLogCollectionResponse",
  "id": "05fb97dc-97dc-05fb-dc97-fb05dc97fb05",
  "status": "completed",
  "managedDeviceId": "3b336f00-6f00-3b33-006f-333b006f333b",
  "requestedDateTimeUTC": "2016-12-31T23:57:40.7845755-08:00",
  "receivedDateTimeUTC": "2016-12-31T23:59:48.6545758-08:00",
  "initiatedByUserPrincipalName": "Initiated By User Principal Name value",
  "expirationDateTimeUTC": "2017-01-01T00:02:49.2157996-08:00",
  "sizeInKB": 2.6666666666666665,
  "enrolledByUser": "Enrolled By User value"
}