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.
Tipo de permiso
Permisos con privilegios mínimos
Permisos con privilegios más altos
Delegado (cuenta profesional o educativa)
BackupRestore-Restore.ReadWrite.All
No disponible.
Delegado (cuenta personal de Microsoft)
No admitida.
No admitida.
Aplicación
BackupRestore-Restore.ReadWrite.All
No disponible.
Solicitud HTTP
POST /solutions/backupRestore/sharePointRestoreSessions
Si se ejecuta correctamente, este método devuelve un 201 Created código de respuesta y un objeto sharePointRestoreSession en el cuerpo de la respuesta.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new SharePointRestoreSession
{
SiteRestoreArtifacts = new List<SiteRestoreArtifact>
{
new SiteRestoreArtifact
{
RestorePoint = new RestorePoint
{
AdditionalData = new Dictionary<string, object>
{
{
"@odata.id" , "1f1fccc3-a642-4f61-bf49-f37b9a888279"
},
},
},
DestinationType = DestinationType.InPlace,
},
new SiteRestoreArtifact
{
RestorePoint = new RestorePoint
{
AdditionalData = new Dictionary<string, object>
{
{
"@odata.id" , "1f1fccc3-a642-4f61-bf49-f37b9a888280"
},
},
},
DestinationType = DestinationType.InPlace,
},
},
};
// 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.PostAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
SharePointRestoreSession sharePointRestoreSession = new SharePointRestoreSession();
LinkedList<SiteRestoreArtifact> siteRestoreArtifacts = new LinkedList<SiteRestoreArtifact>();
SiteRestoreArtifact siteRestoreArtifact = new SiteRestoreArtifact();
RestorePoint restorePoint = new RestorePoint();
HashMap<String, Object> additionalData = new HashMap<String, Object>();
additionalData.put("@odata.id", "1f1fccc3-a642-4f61-bf49-f37b9a888279");
restorePoint.setAdditionalData(additionalData);
siteRestoreArtifact.setRestorePoint(restorePoint);
siteRestoreArtifact.setDestinationType(DestinationType.InPlace);
siteRestoreArtifacts.add(siteRestoreArtifact);
SiteRestoreArtifact siteRestoreArtifact1 = new SiteRestoreArtifact();
RestorePoint restorePoint1 = new RestorePoint();
HashMap<String, Object> additionalData1 = new HashMap<String, Object>();
additionalData1.put("@odata.id", "1f1fccc3-a642-4f61-bf49-f37b9a888280");
restorePoint1.setAdditionalData(additionalData1);
siteRestoreArtifact1.setRestorePoint(restorePoint1);
siteRestoreArtifact1.setDestinationType(DestinationType.InPlace);
siteRestoreArtifacts.add(siteRestoreArtifact1);
sharePointRestoreSession.setSiteRestoreArtifacts(siteRestoreArtifacts);
SharePointRestoreSession result = graphClient.solutions().backupRestore().sharePointRestoreSessions().post(sharePointRestoreSession);
# 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
from msgraph.generated.models.site_restore_artifact import SiteRestoreArtifact
from msgraph.generated.models.restore_point import RestorePoint
from msgraph.generated.models.destination_type import DestinationType
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = SharePointRestoreSession(
site_restore_artifacts = [
SiteRestoreArtifact(
restore_point = RestorePoint(
additional_data = {
"@odata_id" : "1f1fccc3-a642-4f61-bf49-f37b9a888279",
}
),
destination_type = DestinationType.InPlace,
),
SiteRestoreArtifact(
restore_point = RestorePoint(
additional_data = {
"@odata_id" : "1f1fccc3-a642-4f61-bf49-f37b9a888280",
}
),
destination_type = DestinationType.InPlace,
),
],
)
result = await graph_client.solutions.backup_restore.share_point_restore_sessions.post(request_body)