更新 mobileAppContentFile

命名空间:microsoft.graph

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

更新 mobileAppContentFile 对象的属性。

先决条件

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

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

HTTP 请求

PATCH /deviceAppManagement/mobileApps/{mobileAppId}/contentVersions/{mobileAppContentId}/files/{mobileAppContentFileId}

请求标头

标头
Authorization Bearer <token>。必需。
接受 application/json

请求正文

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

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

属性 类型 说明
azureStorageUri String Azure 存储 URI。
isCommitted Boolean 指示文件是否已提交的值。
id String 文件 ID。
createdDateTime DateTimeOffset 创建文件的时间。
name String 文件名称。
size Int64 加密前的文件大小。
sizeEncrypted Int64 加密后的文件大小。
azureStorageUriExpirationDateTime DateTimeOffset Azure 存储 URI 的到期时间。
manifest Binary 清单信息。
uploadState mobileAppContentFileUploadState 当前上传请求的状态。 可取值为:successtransientErrorerrorunknownazureStorageUriRequestSuccessazureStorageUriRequestPendingazureStorageUriRequestFailedazureStorageUriRequestTimedOutazureStorageUriRenewalSuccessazureStorageUriRenewalPendingazureStorageUriRenewalFailedazureStorageUriRenewalTimedOutcommitFileSuccesscommitFilePendingcommitFileFailedcommitFileTimedOut

响应

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

示例

请求

下面是一个请求示例。

PATCH https://graph.microsoft.com/v1.0/deviceAppManagement/mobileApps/{mobileAppId}/contentVersions/{mobileAppContentId}/files/{mobileAppContentFileId}
Content-type: application/json
Content-length: 342

{
  "@odata.type": "#microsoft.graph.mobileAppContentFile",
  "azureStorageUri": "Azure Storage Uri value",
  "isCommitted": true,
  "name": "Name value",
  "size": 4,
  "sizeEncrypted": 13,
  "azureStorageUriExpirationDateTime": "2017-01-01T00:00:08.4940464-08:00",
  "manifest": "bWFuaWZlc3Q=",
  "uploadState": "transientError"
}

响应

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

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

{
  "@odata.type": "#microsoft.graph.mobileAppContentFile",
  "azureStorageUri": "Azure Storage Uri value",
  "isCommitted": true,
  "id": "eab2e29b-e29b-eab2-9be2-b2ea9be2b2ea",
  "createdDateTime": "2017-01-01T00:02:43.5775965-08:00",
  "name": "Name value",
  "size": 4,
  "sizeEncrypted": 13,
  "azureStorageUriExpirationDateTime": "2017-01-01T00:00:08.4940464-08:00",
  "manifest": "bWFuaWZlc3Q=",
  "uploadState": "transientError"
}