mobileAppContentFile の作成

名前空間: microsoft.graph

注: Intune 用 Microsoft Graph API には、テナントの 有効な Intune ライセンスが必要です。

新しい mobileAppContentFile オブジェクトを作成します。

前提条件

この API を呼び出すには、次のいずれかのアクセス許可が必要です。アクセス許可の選択方法などの詳細については、「アクセス許可」を参照してください。

アクセス許可の種類 アクセス許可 (特権の小さいものから大きいものへ)
委任 (職場または学校のアカウント) DeviceManagementApps.ReadWrite.All
委任 (個人用 Microsoft アカウント) サポートされていません。
アプリケーション DeviceManagementApps.ReadWrite.All

HTTP 要求

POST /deviceAppManagement/mobileApps/{mobileAppId}/contentVersions/{mobileAppContentId}/files

要求ヘッダー

ヘッダー
Authorization ベアラー <トークン> が必要です。
承諾 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 です。

応答

成功した場合、このメソッドは 201 Created 応答コードと、応答本文で mobileAppContentFile オブジェクトを返します。

要求

以下は、要求の例です。

POST https://graph.microsoft.com/v1.0/deviceAppManagement/mobileApps/{mobileAppId}/contentVersions/{mobileAppContentId}/files
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 201 Created
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"
}