Elija el permiso o los permisos marcados como con privilegios mínimos para esta API. Use un permiso o permisos con privilegios superiores solo si la aplicación lo requiere. Para obtener más información sobre los permisos delegados y de aplicación, consulte Tipos de permisos. Para obtener más información sobre estos permisos, consulte la referencia de permisos.
En la tabla siguiente se especifican las propiedades que se pueden actualizar.
En el ejemplo siguiente se muestra la solicitud.
PATCH https://graph.microsoft.com/v1.0/solutions/backupRestore/sharepointRestoreSessions/845457dc-4bb2-4815-bef3-8628ebd1952
Content-Type: application/json
{
"siteRestoreArtifacts@delta": [
{
"restorePoint": { "id": "1b014d8c-71fe-4d00-a01a-31850bc5b32c" }, //Create a new site 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": "959ba739-70b5-43c4-8c90-b2c22014f18a"
},
{
"@removed": {
"reason": "changed"
},
"id": "959ba739-70b5-43c4-8c90-b2c22014f18b"
},
{
"@removed": {
"reason": "changed"
},
"id": "959ba739-70b5-43c4-8c90-b2c22014f18c"
}
]
}
// 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 SharePointRestoreSession
{
AdditionalData = new Dictionary<string, object>
{
{
"siteRestoreArtifacts@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("959ba739-70b5-43c4-8c90-b2c22014f18a")
},
}),
new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"@removed", new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"reason", new UntypedString("changed")
},
})
},
{
"id", new UntypedString("959ba739-70b5-43c4-8c90-b2c22014f18b")
},
}),
new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"@removed", new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"reason", new UntypedString("changed")
},
})
},
{
"id", new UntypedString("959ba739-70b5-43c4-8c90-b2c22014f18c")
},
}),
}
},
},
};
// 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.SharePointRestoreSessions["{sharePointRestoreSession-id}"].PatchAsync(requestBody);
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del SDK.
mgc solutions backup-restore share-point-restore-sessions patch --share-point-restore-session-id {sharePointRestoreSession-id} --body '{\
"siteRestoreArtifacts@delta": [\
{\
"restorePoint": { "id": "1b014d8c-71fe-4d00-a01a-31850bc5b32c" }, //Create a new site 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": "959ba739-70b5-43c4-8c90-b2c22014f18a"\
},\
{\
"@removed": {\
"reason": "changed"\
},\
"id": "959ba739-70b5-43c4-8c90-b2c22014f18b"\
},\
{\
"@removed": {\
"reason": "changed"\
},\
"id": "959ba739-70b5-43c4-8c90-b2c22014f18c"\
}\
]\
}\
'
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del SDK.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
SharePointRestoreSession sharePointRestoreSession = new SharePointRestoreSession();
HashMap<String, Object> additionalData = new HashMap<String, Object>();
LinkedList<Object> siteRestoreArtifactsDelta = new LinkedList<Object>();
property = new ();
restorePoint = new ();
restorePoint.setId("1b014d8c-71fe-4d00-a01a-31850bc5b32c");
property.setRestorePoint(restorePoint);
property.setDestinationType("new");
siteRestoreArtifactsDelta.add(property);
property1 = new ();
restorePoint1 = new ();
restorePoint1.setId("2b014d8c-71fe-4d00-a01a-31850bc5b32");
property1.setRestorePoint(restorePoint1);
property1.setDestinationType("new");
siteRestoreArtifactsDelta.add(property1);
property2 = new ();
restorePoint2 = new ();
restorePoint2.setId("3b014d8c-71fe-4d00-a01a-31850bc5b32c");
property2.setRestorePoint(restorePoint2);
property2.setDestinationType("new");
siteRestoreArtifactsDelta.add(property2);
property3 = new ();
restorePoint3 = new ();
restorePoint3.setId("4b014d8c-71fe-4d00-a01a-31850bc5b32c");
property3.setRestorePoint(restorePoint3);
property3.setDestinationType("new");
siteRestoreArtifactsDelta.add(property3);
property4 = new ();
removed = new ();
removed.setReason("changed");
property4.setRemoved(removed);
property4.setId("959ba739-70b5-43c4-8c90-b2c22014f18a");
siteRestoreArtifactsDelta.add(property4);
property5 = new ();
removed1 = new ();
removed1.setReason("changed");
property5.setRemoved(removed1);
property5.setId("959ba739-70b5-43c4-8c90-b2c22014f18b");
siteRestoreArtifactsDelta.add(property5);
property6 = new ();
removed2 = new ();
removed2.setReason("changed");
property6.setRemoved(removed2);
property6.setId("959ba739-70b5-43c4-8c90-b2c22014f18c");
siteRestoreArtifactsDelta.add(property6);
additionalData.put("siteRestoreArtifacts@delta", siteRestoreArtifactsDelta);
sharePointRestoreSession.setAdditionalData(additionalData);
SharePointRestoreSession result = graphClient.solutions().backupRestore().sharePointRestoreSessions().bySharePointRestoreSessionId("{sharePointRestoreSession-id}").patch(sharePointRestoreSession);
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del SDK.
const options = {
authProvider,
};
const client = Client.init(options);
const sharePointRestoreSession = {
'siteRestoreArtifacts@delta': [
{
restorePoint: { id: '1b014d8c-71fe-4d00-a01a-31850bc5b32c' }, //Create a new site 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: '959ba739-70b5-43c4-8c90-b2c22014f18a'
},
{
'@removed': {
reason: 'changed'
},
id: '959ba739-70b5-43c4-8c90-b2c22014f18b'
},
{
'@removed': {
reason: 'changed'
},
id: '959ba739-70b5-43c4-8c90-b2c22014f18c'
}
]
};
await client.api('/solutions/backupRestore/sharepointRestoreSessions/845457dc-4bb2-4815-bef3-8628ebd1952')
.update(sharePointRestoreSession);
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del SDK.
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\SharePointRestoreSession;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new SharePointRestoreSession();
$additionalData = [
'siteRestoreArtifacts@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' => '959ba739-70b5-43c4-8c90-b2c22014f18a',
],
[
'@removed' => [
'reason' => 'changed',
],
'id' => '959ba739-70b5-43c4-8c90-b2c22014f18b',
],
[
'@removed' => [
'reason' => 'changed',
],
'id' => '959ba739-70b5-43c4-8c90-b2c22014f18c',
],
],
];
$requestBody->setAdditionalData($additionalData);
$result = $graphServiceClient->solutions()->backupRestore()->sharePointRestoreSessions()->bySharePointRestoreSessionId('sharePointRestoreSession-id')->patch($requestBody)->wait();
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del SDK.
Import-Module Microsoft.Graph.BackupRestore
$params = @{
"siteRestoreArtifacts@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 = "959ba739-70b5-43c4-8c90-b2c22014f18a"
}
@{
"@removed" = @{
reason = "changed"
}
id = "959ba739-70b5-43c4-8c90-b2c22014f18b"
}
@{
"@removed" = @{
reason = "changed"
}
id = "959ba739-70b5-43c4-8c90-b2c22014f18c"
}
)
}
Update-MgSolutionBackupRestoreSharePointRestoreSession -SharePointRestoreSessionId $sharePointRestoreSessionId -BodyParameter $params
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del SDK.
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.share_point_restore_session import SharePointRestoreSession
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = SharePointRestoreSession(
additional_data = {
"site_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" : "959ba739-70b5-43c4-8c90-b2c22014f18a",
},
{
"@removed" : {
"reason" : "changed",
},
"id" : "959ba739-70b5-43c4-8c90-b2c22014f18b",
},
{
"@removed" : {
"reason" : "changed",
},
"id" : "959ba739-70b5-43c4-8c90-b2c22014f18c",
},
],
}
)
result = await graph_client.solutions.backup_restore.share_point_restore_sessions.by_share_point_restore_session_id('sharePointRestoreSession-id').patch(request_body)
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del SDK.
En el ejemplo siguiente se muestra la respuesta.