名前空間: microsoft.graph
oneDriveForBusinessRestoreSession オブジェクトのプロパティを更新します。
この API は、次の国内クラウド展開で使用できます。
| グローバル サービス |
米国政府機関 L4 |
米国政府機関 L5 (DOD) |
21Vianet が運営する中国 |
| ✅ |
❌ |
❌ |
❌ |
アクセス許可
この API の最小特権としてマークされているアクセス許可またはアクセス許可を選択します。
アプリで必要な場合にのみ、より高い特権のアクセス許可またはアクセス許可を使用します。 委任されたアクセス許可とアプリケーションのアクセス許可の詳細については、「アクセス許可の種類」を参照してください。 これらのアクセス許可の詳細については、「アクセス許可のリファレンス」を参照してください。
| アクセス許可の種類 |
最小特権アクセス許可 |
より高い特権のアクセス許可 |
| 委任 (職場または学校のアカウント) |
BackupRestore-Restore.ReadWrite.All |
注意事項なし。 |
| 委任 (個人用 Microsoft アカウント) |
サポートされていません。 |
サポートされていません。 |
| アプリケーション |
BackupRestore-Restore.ReadWrite.All |
注意事項なし。 |
HTTP 要求
PATCH /solutions/backupRestore/oneDriveForBusinessRestoreSessions/{oneDriveForBusinessRestoreSessionId}
| 名前 |
説明 |
| Authorization |
ベアラー {token}。 必須です。
認証と認可についての詳細をご覧ください。 |
| Content-Type |
application/json. 必須です。 |
要求本文
要求本文で、更新するプロパティの値 のみを 指定します。 要求本文に含まれていない既存のプロパティは、以前の値を維持するか、他のプロパティ値の変更に基づいて再計算されます。
次の表に、更新できるプロパティを示します。
標準の復元セッションから driveRestoreArtifact を削除するには、要求本文の @removed 注釈と driveRestoreArtifact オブジェクトの ID を指定します。
きめ細かい復元セッションから granularDriveRestoreArtifact を削除するには、要求本文で、granularDriveRestoreArtifact のそれぞれの成果物 ID に対して@removed注釈を指定します。
応答
成功した場合、このメソッドは 200 OK 応答コードと、応答本文で更新 された oneDriveForBusinessRestoreSession オブジェクトを返します。
考えられるエラー応答の一覧については、「 Backup Storage API エラー応答」を参照してください。
例
例 1: 標準の復元セッションを更新する
要求
次の例は要求を示しています。
PATCH https://graph.microsoft.com/v1.0/solutions/backupRestore/oneDriveForBusinessRestoreSessions/1b014d8c-71fe-4d00-8ab2-31850bc5b32c
{
"driveRestoreArtifacts@delta": [
{
"restorePoint": { "id": "1b014d8c-71fe-4d00-a01a-31850bc5b32c" }, //Create a new drive restore artifact and add it under the Restore Session.
"destinationType": "new"
},
{
"restorePoint": { "id": "2b014d8c-71fe-4d00-a01a-31850bc5b32" },
"destinationType": "new"
},
{
"restorePoint": { "id": "3b014d8c-71fe-4d00-a01a-31850bc5b32c" },
"destinationType": "new"
},
{
"restorePoint": { "id": "4b014d8c-71fe-4d00-a01a-31850bc5b32c" },
"destinationType": "new"
},
{
"@removed": {
"reason": "changed"
},
"id": "99954f18-c8ec-4b62-85bf-cdf3b70b140e"
},
{
"@removed": {
"reason": "changed"
},
"id": "4267e382-71a9-4c07-bef7-bda97e09c0d2"
},
{
"@removed": {
"reason": "changed"
},
"id": "3667e382-71a9-4c07-bef7-bda97e09c0d2"
}
]
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
using Microsoft.Kiota.Abstractions.Serialization;
var requestBody = new OneDriveForBusinessRestoreSession
{
AdditionalData = new Dictionary<string, object>
{
{
"driveRestoreArtifacts@delta" , new List<object>
{
new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"restorePoint", new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"id", new UntypedString("1b014d8c-71fe-4d00-a01a-31850bc5b32c")
},
})
},
{
"destinationType", new UntypedString("new")
},
}),
new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"restorePoint", new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"id", new UntypedString("2b014d8c-71fe-4d00-a01a-31850bc5b32")
},
})
},
{
"destinationType", new UntypedString("new")
},
}),
new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"restorePoint", new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"id", new UntypedString("3b014d8c-71fe-4d00-a01a-31850bc5b32c")
},
})
},
{
"destinationType", new UntypedString("new")
},
}),
new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"restorePoint", new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"id", new UntypedString("4b014d8c-71fe-4d00-a01a-31850bc5b32c")
},
})
},
{
"destinationType", new UntypedString("new")
},
}),
new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"@removed", new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"reason", new UntypedString("changed")
},
})
},
{
"id", new UntypedString("99954f18-c8ec-4b62-85bf-cdf3b70b140e")
},
}),
new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"@removed", new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"reason", new UntypedString("changed")
},
})
},
{
"id", new UntypedString("4267e382-71a9-4c07-bef7-bda97e09c0d2")
},
}),
new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"@removed", new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"reason", new UntypedString("changed")
},
})
},
{
"id", new UntypedString("3667e382-71a9-4c07-bef7-bda97e09c0d2")
},
}),
}
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Solutions.BackupRestore.OneDriveForBusinessRestoreSessions["{oneDriveForBusinessRestoreSession-id}"].PatchAsync(requestBody);
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
OneDriveForBusinessRestoreSession oneDriveForBusinessRestoreSession = new OneDriveForBusinessRestoreSession();
HashMap<String, Object> additionalData = new HashMap<String, Object>();
LinkedList<Object> driveRestoreArtifactsDelta = new LinkedList<Object>();
property = new ();
restorePoint = new ();
restorePoint.setId("1b014d8c-71fe-4d00-a01a-31850bc5b32c");
property.setRestorePoint(restorePoint);
property.setDestinationType("new");
driveRestoreArtifactsDelta.add(property);
property1 = new ();
restorePoint1 = new ();
restorePoint1.setId("2b014d8c-71fe-4d00-a01a-31850bc5b32");
property1.setRestorePoint(restorePoint1);
property1.setDestinationType("new");
driveRestoreArtifactsDelta.add(property1);
property2 = new ();
restorePoint2 = new ();
restorePoint2.setId("3b014d8c-71fe-4d00-a01a-31850bc5b32c");
property2.setRestorePoint(restorePoint2);
property2.setDestinationType("new");
driveRestoreArtifactsDelta.add(property2);
property3 = new ();
restorePoint3 = new ();
restorePoint3.setId("4b014d8c-71fe-4d00-a01a-31850bc5b32c");
property3.setRestorePoint(restorePoint3);
property3.setDestinationType("new");
driveRestoreArtifactsDelta.add(property3);
property4 = new ();
removed = new ();
removed.setReason("changed");
property4.setRemoved(removed);
property4.setId("99954f18-c8ec-4b62-85bf-cdf3b70b140e");
driveRestoreArtifactsDelta.add(property4);
property5 = new ();
removed1 = new ();
removed1.setReason("changed");
property5.setRemoved(removed1);
property5.setId("4267e382-71a9-4c07-bef7-bda97e09c0d2");
driveRestoreArtifactsDelta.add(property5);
property6 = new ();
removed2 = new ();
removed2.setReason("changed");
property6.setRemoved(removed2);
property6.setId("3667e382-71a9-4c07-bef7-bda97e09c0d2");
driveRestoreArtifactsDelta.add(property6);
additionalData.put("driveRestoreArtifacts@delta", driveRestoreArtifactsDelta);
oneDriveForBusinessRestoreSession.setAdditionalData(additionalData);
OneDriveForBusinessRestoreSession result = graphClient.solutions().backupRestore().oneDriveForBusinessRestoreSessions().byOneDriveForBusinessRestoreSessionId("{oneDriveForBusinessRestoreSession-id}").patch(oneDriveForBusinessRestoreSession);
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
const options = {
authProvider,
};
const client = Client.init(options);
const oneDriveForBusinessRestoreSession = {
'driveRestoreArtifacts@delta': [
{
restorePoint: { id: '1b014d8c-71fe-4d00-a01a-31850bc5b32c' }, //Create a new drive restore artifact and add it under the Restore Session.
destinationType: 'new'
},
{
restorePoint: { id: '2b014d8c-71fe-4d00-a01a-31850bc5b32' },
destinationType: 'new'
},
{
restorePoint: { id: '3b014d8c-71fe-4d00-a01a-31850bc5b32c' },
destinationType: 'new'
},
{
restorePoint: { id: '4b014d8c-71fe-4d00-a01a-31850bc5b32c' },
destinationType: 'new'
},
{
'@removed': {
reason: 'changed'
},
id: '99954f18-c8ec-4b62-85bf-cdf3b70b140e'
},
{
'@removed': {
reason: 'changed'
},
id: '4267e382-71a9-4c07-bef7-bda97e09c0d2'
},
{
'@removed': {
reason: 'changed'
},
id: '3667e382-71a9-4c07-bef7-bda97e09c0d2'
}
]
};
await client.api('/solutions/backupRestore/oneDriveForBusinessRestoreSessions/1b014d8c-71fe-4d00-8ab2-31850bc5b32c')
.update(oneDriveForBusinessRestoreSession);
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\OneDriveForBusinessRestoreSession;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new OneDriveForBusinessRestoreSession();
$additionalData = [
'driveRestoreArtifacts@delta' => [
[
'restorePoint' => [
'id' => '1b014d8c-71fe-4d00-a01a-31850bc5b32c',
],
'destinationType' => 'new',
],
[
'restorePoint' => [
'id' => '2b014d8c-71fe-4d00-a01a-31850bc5b32',
],
'destinationType' => 'new',
],
[
'restorePoint' => [
'id' => '3b014d8c-71fe-4d00-a01a-31850bc5b32c',
],
'destinationType' => 'new',
],
[
'restorePoint' => [
'id' => '4b014d8c-71fe-4d00-a01a-31850bc5b32c',
],
'destinationType' => 'new',
],
[
'@removed' => [
'reason' => 'changed',
],
'id' => '99954f18-c8ec-4b62-85bf-cdf3b70b140e',
],
[
'@removed' => [
'reason' => 'changed',
],
'id' => '4267e382-71a9-4c07-bef7-bda97e09c0d2',
],
[
'@removed' => [
'reason' => 'changed',
],
'id' => '3667e382-71a9-4c07-bef7-bda97e09c0d2',
],
],
];
$requestBody->setAdditionalData($additionalData);
$result = $graphServiceClient->solutions()->backupRestore()->oneDriveForBusinessRestoreSessions()->byOneDriveForBusinessRestoreSessionId('oneDriveForBusinessRestoreSession-id')->patch($requestBody)->wait();
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
Import-Module Microsoft.Graph.BackupRestore
$params = @{
"driveRestoreArtifacts@delta" = @(
@{
restorePoint = @{
id = "1b014d8c-71fe-4d00-a01a-31850bc5b32c"
}
destinationType = "new"
}
@{
restorePoint = @{
id = "2b014d8c-71fe-4d00-a01a-31850bc5b32"
}
destinationType = "new"
}
@{
restorePoint = @{
id = "3b014d8c-71fe-4d00-a01a-31850bc5b32c"
}
destinationType = "new"
}
@{
restorePoint = @{
id = "4b014d8c-71fe-4d00-a01a-31850bc5b32c"
}
destinationType = "new"
}
@{
"@removed" = @{
reason = "changed"
}
id = "99954f18-c8ec-4b62-85bf-cdf3b70b140e"
}
@{
"@removed" = @{
reason = "changed"
}
id = "4267e382-71a9-4c07-bef7-bda97e09c0d2"
}
@{
"@removed" = @{
reason = "changed"
}
id = "3667e382-71a9-4c07-bef7-bda97e09c0d2"
}
)
}
Update-MgSolutionBackupRestoreOneDriveForBusinessRestoreSession -OneDriveForBusinessRestoreSessionId $oneDriveForBusinessRestoreSessionId -BodyParameter $params
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.one_drive_for_business_restore_session import OneDriveForBusinessRestoreSession
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = OneDriveForBusinessRestoreSession(
additional_data = {
"drive_restore_artifacts@delta" : [
{
"restore_point" : {
"id" : "1b014d8c-71fe-4d00-a01a-31850bc5b32c",
},
"destination_type" : "new",
},
{
"restore_point" : {
"id" : "2b014d8c-71fe-4d00-a01a-31850bc5b32",
},
"destination_type" : "new",
},
{
"restore_point" : {
"id" : "3b014d8c-71fe-4d00-a01a-31850bc5b32c",
},
"destination_type" : "new",
},
{
"restore_point" : {
"id" : "4b014d8c-71fe-4d00-a01a-31850bc5b32c",
},
"destination_type" : "new",
},
{
"@removed" : {
"reason" : "changed",
},
"id" : "99954f18-c8ec-4b62-85bf-cdf3b70b140e",
},
{
"@removed" : {
"reason" : "changed",
},
"id" : "4267e382-71a9-4c07-bef7-bda97e09c0d2",
},
{
"@removed" : {
"reason" : "changed",
},
"id" : "3667e382-71a9-4c07-bef7-bda97e09c0d2",
},
],
}
)
result = await graph_client.solutions.backup_restore.one_drive_for_business_restore_sessions.by_one_drive_for_business_restore_session_id('oneDriveForBusinessRestoreSession-id').patch(request_body)
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
応答
次の例は応答を示しています。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
HTTP/1.1 200 OK
{
"driveRestoreArtifacts@delta": [
{
"id": "89014d8c-71fe-4d00-a01a-31850bc5b32c",
"restorePoint": { "id": "1b014d8c-71fe-4d00-a01a-31850bc5b32c" },
"destinationType": "new",
"status": "added",
"createdDateTime": "2015-06-19T12:01:03.45Z"
},
{
"id": "67014d8c-71fe-4d00-a01a-31850bc5b32c",
"restorePoint": { "id": "2b014d8c-71fe-4d00-a01a-31850bc5b32c" },
"destinationType": "new",
"status": "added",
"createdDateTime": "2015-06-19T12:01:03.45Z"
},
{
"id": "56014d8c-71fe-4d00-a01a-31850bc5b32c",
"restorePoint": { "id": "3b014d8c-71fe-4d00-a01a-31850bc5b32c" },
"destinationType": "new",
"status": "added",
"createdDateTime": "2015-06-19T12:01:03.45Z"
},
{
"id": "32014d8c-71fe-4d00-a01a-31850bc5b32c",
"restorePoint": { "id": "4b014d8c-71fe-4d00-a01a-31850bc5b32c" },
"destinationType": "new",
"status": "added",
"createdDateTime": "2015-06-19T12:01:03.45Z"
},
{
//Error scenario
"@contentId": "3467e382-71a9-4c07-bef7-bda97e09c0d2", // To add context and more traceability.
"@Core.DataModificationException": {
"info": {
"code": "Invalid",
"message": "The identifier to be removed from the restore session does not exist"
},
"failedOperation": "remove",
"responseCode": 409
},
"id": "4267e382-71a9-4c07-bef7-bda97e09c0d2"
}
]
}
例 2: 詳細な復元セッションを更新する
要求
次の例は要求を示しています。
PATCH https://graph.microsoft.com/v1.0/solutions/backupRestore/oneDriveForBusinessRestoreSessions/43e0638e-3ad7-4c7e-8749-72175d046e30
Content-Type: application/json
{
"granularDriveRestoreArtifacts@delta": [
{
"browseSessionId": "m_RtZ8BiiUXOK69cuN6gwubfm9_yeVlDg8s6hci01_cVOAE",
"itemKey": "a535851e-9fc6-4eb1-90ab-2955fd9117b5,2a8b7eaf-092a-4561-a25a-998ad2e5142e,38eec3f1-b879-44a6-8ae6-05bd46ed4b3d,ce66019f-cdf9-4575-aa81-de3aabe844a2"
},
{
"@removed": {
"reason": "changed"
},
"id": "a535851e-9fc6-4eb1-90ab-2955fd9117b5,2a8b7eaf-092a-4561-a25a-998ad2e5142e,38eec3f1-b879-44a6-8ae6-05bd46ed4b3d,ce66019f-cdf9-4575-aa81-de3aabe844a2"
}
]
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
using Microsoft.Kiota.Abstractions.Serialization;
var requestBody = new OneDriveForBusinessRestoreSession
{
AdditionalData = new Dictionary<string, object>
{
{
"granularDriveRestoreArtifacts@delta" , new List<object>
{
new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"browseSessionId", new UntypedString("m_RtZ8BiiUXOK69cuN6gwubfm9_yeVlDg8s6hci01_cVOAE")
},
{
"itemKey", new UntypedString("a535851e-9fc6-4eb1-90ab-2955fd9117b5,2a8b7eaf-092a-4561-a25a-998ad2e5142e,38eec3f1-b879-44a6-8ae6-05bd46ed4b3d,ce66019f-cdf9-4575-aa81-de3aabe844a2")
},
}),
new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"@removed", new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"reason", new UntypedString("changed")
},
})
},
{
"id", new UntypedString("a535851e-9fc6-4eb1-90ab-2955fd9117b5,2a8b7eaf-092a-4561-a25a-998ad2e5142e,38eec3f1-b879-44a6-8ae6-05bd46ed4b3d,ce66019f-cdf9-4575-aa81-de3aabe844a2")
},
}),
}
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Solutions.BackupRestore.OneDriveForBusinessRestoreSessions["{oneDriveForBusinessRestoreSession-id}"].PatchAsync(requestBody);
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
OneDriveForBusinessRestoreSession oneDriveForBusinessRestoreSession = new OneDriveForBusinessRestoreSession();
HashMap<String, Object> additionalData = new HashMap<String, Object>();
LinkedList<Object> granularDriveRestoreArtifactsDelta = new LinkedList<Object>();
property = new ();
property.setBrowseSessionId("m_RtZ8BiiUXOK69cuN6gwubfm9_yeVlDg8s6hci01_cVOAE");
property.setItemKey("a535851e-9fc6-4eb1-90ab-2955fd9117b5,2a8b7eaf-092a-4561-a25a-998ad2e5142e,38eec3f1-b879-44a6-8ae6-05bd46ed4b3d,ce66019f-cdf9-4575-aa81-de3aabe844a2");
granularDriveRestoreArtifactsDelta.add(property);
property1 = new ();
removed = new ();
removed.setReason("changed");
property1.setRemoved(removed);
property1.setId("a535851e-9fc6-4eb1-90ab-2955fd9117b5,2a8b7eaf-092a-4561-a25a-998ad2e5142e,38eec3f1-b879-44a6-8ae6-05bd46ed4b3d,ce66019f-cdf9-4575-aa81-de3aabe844a2");
granularDriveRestoreArtifactsDelta.add(property1);
additionalData.put("granularDriveRestoreArtifacts@delta", granularDriveRestoreArtifactsDelta);
oneDriveForBusinessRestoreSession.setAdditionalData(additionalData);
OneDriveForBusinessRestoreSession result = graphClient.solutions().backupRestore().oneDriveForBusinessRestoreSessions().byOneDriveForBusinessRestoreSessionId("{oneDriveForBusinessRestoreSession-id}").patch(oneDriveForBusinessRestoreSession);
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
const options = {
authProvider,
};
const client = Client.init(options);
const oneDriveForBusinessRestoreSession = {
'granularDriveRestoreArtifacts@delta': [
{
browseSessionId: 'm_RtZ8BiiUXOK69cuN6gwubfm9_yeVlDg8s6hci01_cVOAE',
itemKey: 'a535851e-9fc6-4eb1-90ab-2955fd9117b5,2a8b7eaf-092a-4561-a25a-998ad2e5142e,38eec3f1-b879-44a6-8ae6-05bd46ed4b3d,ce66019f-cdf9-4575-aa81-de3aabe844a2'
},
{
'@removed': {
reason: 'changed'
},
id: 'a535851e-9fc6-4eb1-90ab-2955fd9117b5,2a8b7eaf-092a-4561-a25a-998ad2e5142e,38eec3f1-b879-44a6-8ae6-05bd46ed4b3d,ce66019f-cdf9-4575-aa81-de3aabe844a2'
}
]
};
await client.api('/solutions/backupRestore/oneDriveForBusinessRestoreSessions/43e0638e-3ad7-4c7e-8749-72175d046e30')
.update(oneDriveForBusinessRestoreSession);
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\OneDriveForBusinessRestoreSession;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new OneDriveForBusinessRestoreSession();
$additionalData = [
'granularDriveRestoreArtifacts@delta' => [
[
'browseSessionId' => 'm_RtZ8BiiUXOK69cuN6gwubfm9_yeVlDg8s6hci01_cVOAE',
'itemKey' => 'a535851e-9fc6-4eb1-90ab-2955fd9117b5,2a8b7eaf-092a-4561-a25a-998ad2e5142e,38eec3f1-b879-44a6-8ae6-05bd46ed4b3d,ce66019f-cdf9-4575-aa81-de3aabe844a2',
],
[
'@removed' => [
'reason' => 'changed',
],
'id' => 'a535851e-9fc6-4eb1-90ab-2955fd9117b5,2a8b7eaf-092a-4561-a25a-998ad2e5142e,38eec3f1-b879-44a6-8ae6-05bd46ed4b3d,ce66019f-cdf9-4575-aa81-de3aabe844a2',
],
],
];
$requestBody->setAdditionalData($additionalData);
$result = $graphServiceClient->solutions()->backupRestore()->oneDriveForBusinessRestoreSessions()->byOneDriveForBusinessRestoreSessionId('oneDriveForBusinessRestoreSession-id')->patch($requestBody)->wait();
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
Import-Module Microsoft.Graph.BackupRestore
$params = @{
"granularDriveRestoreArtifacts@delta" = @(
@{
browseSessionId = "m_RtZ8BiiUXOK69cuN6gwubfm9_yeVlDg8s6hci01_cVOAE"
itemKey = "a535851e-9fc6-4eb1-90ab-2955fd9117b5,2a8b7eaf-092a-4561-a25a-998ad2e5142e,38eec3f1-b879-44a6-8ae6-05bd46ed4b3d,ce66019f-cdf9-4575-aa81-de3aabe844a2"
}
@{
"@removed" = @{
reason = "changed"
}
id = "a535851e-9fc6-4eb1-90ab-2955fd9117b5,2a8b7eaf-092a-4561-a25a-998ad2e5142e,38eec3f1-b879-44a6-8ae6-05bd46ed4b3d,ce66019f-cdf9-4575-aa81-de3aabe844a2"
}
)
}
Update-MgSolutionBackupRestoreOneDriveForBusinessRestoreSession -OneDriveForBusinessRestoreSessionId $oneDriveForBusinessRestoreSessionId -BodyParameter $params
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.one_drive_for_business_restore_session import OneDriveForBusinessRestoreSession
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = OneDriveForBusinessRestoreSession(
additional_data = {
"granular_drive_restore_artifacts@delta" : [
{
"browse_session_id" : "m_RtZ8BiiUXOK69cuN6gwubfm9_yeVlDg8s6hci01_cVOAE",
"item_key" : "a535851e-9fc6-4eb1-90ab-2955fd9117b5,2a8b7eaf-092a-4561-a25a-998ad2e5142e,38eec3f1-b879-44a6-8ae6-05bd46ed4b3d,ce66019f-cdf9-4575-aa81-de3aabe844a2",
},
{
"@removed" : {
"reason" : "changed",
},
"id" : "a535851e-9fc6-4eb1-90ab-2955fd9117b5,2a8b7eaf-092a-4561-a25a-998ad2e5142e,38eec3f1-b879-44a6-8ae6-05bd46ed4b3d,ce66019f-cdf9-4575-aa81-de3aabe844a2",
},
],
}
)
result = await graph_client.solutions.backup_restore.one_drive_for_business_restore_sessions.by_one_drive_for_business_restore_session_id('oneDriveForBusinessRestoreSession-id').patch(request_body)
プロジェクトに SDK を追加し、authProvider インスタンスを作成する方法の詳細については、SDK のドキュメントを参照してください。
応答
次の例は応答を示しています。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
HTTP/1.1 200 OK
Content-Type: application/json
{
"@context": "#$delta",
"id": "43e0638e-3ad7-4c7e-8749-72175d046e30",
"granularDriveRestoreArtifacts@delta": [
{
"directoryObjectId": null,
"id": "a535851e-9fc6-4eb1-90ab-2955fd9117b5,2a8b7eaf-092a-4561-a25a-998ad2e5142e,38eec3f1-b879-44a6-8ae6-05bd46ed4b3d,ce66019f-cdf9-4575-aa81-de3aabe844a2",
"browseSessionId": "m_RtZ8BiiUXOK69cuN6gwubfm9_yeVlDg8s6hci01_cVOAE",
"restoredItemKey": "",
"webUrl": "",
"restoredItemPath": null,
"restoredItemWebUrl": "",
"status": "added",
"restorePointDateTime": "0001-01-01T00:00:00Z",
"startDateTime": "0001-01-01T00:00:00Z",
"completionDateTime": "0001-01-01T00:00:00Z"
},
{
"id": "a535851e-9fc6-4eb1-90ab-2955fd9117b5,2a8b7eaf-092a-4561-a25a-998ad2e5142e,38eec3f1-b879-44a6-8ae6-05bd46ed4b3d,ce66019f-cdf9-4575-aa81-de3aabe844a2",
"@removed": {
"reason": "changed"
}
}
]
}