命名空间:microsoft.graph
搜索与 protectionUnit 关联的 restorePoint 对象。
此 API 可用于以下国家级云部署。
| 全局服务 |
美国政府 L4 |
美国政府 L5 (DOD) |
由世纪互联运营的中国 |
| ✅ |
❌ |
❌ |
❌ |
权限
为此 API 选择标记为最低特权的权限。
只有在应用需要它时,才使用更高的特权权限。 有关委派权限和应用程序权限的详细信息,请参阅权限类型。 要了解有关这些权限的详细信息,请参阅 权限参考。
| 权限类型 |
最低特权权限 |
更高特权权限 |
| 委派(工作或学校帐户) |
BackupRestore-Search.Read.All |
不可用。 |
| 委派(个人 Microsoft 帐户) |
不支持。 |
不支持。 |
| 应用程序 |
BackupRestore-Search.Read.All |
不可用。 |
HTTP 请求
POST /solutions/backupRestore/restorePoints/search
| 名称 |
说明 |
| Authorization |
持有者 {token}。 必填。 详细了解 身份验证和授权。 |
| Content-Type |
application/json. 必需。 |
请求正文
在请求正文中,提供以下参数的 JSON 表示形式。
| 参数 |
类型 |
说明 |
| artifactQuery |
artifactQuery |
包含一个指定搜索条件的表达式。 可选。 |
| protectionUnitIds |
字符串集合 |
保护单元的 ID。 必填。 |
| protectionTimePeriod |
timePeriod |
保护期的开始和结束日期时间。 必填。 |
| restorePointPreference |
restorePointPreference |
指示要返回的还原点。 可能的值为 oldest、 latest。 可选。 |
| tags |
restorePointTags |
还原点的类型。 可能的值为 None、 FastRestore、 UnknownFutureValue。 可选。 |
restorePointPreference 值
| 成员 |
说明 |
| 最近的 |
返回给定保护时间段内的最新还原点。 |
| 古老 |
返回给定保护时间段内最早的还原点。 |
响应
如果成功,此作将在 200 OK 响应正文中返回响应代码和 restorePointSearchResponse 对象。
注意
- 调用最多返回 5 个还原点。
- 在单个请求中最多可以包含 20 个保护单元,并且响应不会分页。
- 为 artifactQuery 属性提供表达式时,只能在 protectionUnitIds 属性中提供一个保护单元 ID。
有关可能的错误响应的列表,请参阅 备份存储 API 错误响应。
示例
示例 1:搜索请求
请求
以下示例显示了一个请求。
POST https://graph.microsoft.com/v1.0/solutions/backupRestore/restorePoints/search
Content-Type: application/json
{
"protectionUnitIds": ["23014d8c-71fe-4d00-a01a-31850bc5b42a", "43014d8c-71fe-4d00-a01a-31850bc5b42b", "63014d8c-71fe-4d00-a01a-31850bc5b42c", "83014d8c-71fe-4d00-a01a-31850bc5b42d"],
"protectionTimePeriod": {
"startDateTime": "2021-01-01T00:00:00Z",
"endDateTime": "2021-01-08T00:00:00Z"
},
"restorePointPreference": "latest",
"tags": "fastRestore"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Solutions.BackupRestore.RestorePoints.Search;
using Microsoft.Graph.Models;
var requestBody = new SearchPostRequestBody
{
ProtectionUnitIds = new List<string>
{
"23014d8c-71fe-4d00-a01a-31850bc5b42a",
"43014d8c-71fe-4d00-a01a-31850bc5b42b",
"63014d8c-71fe-4d00-a01a-31850bc5b42c",
"83014d8c-71fe-4d00-a01a-31850bc5b42d",
},
ProtectionTimePeriod = new TimePeriod
{
StartDateTime = DateTimeOffset.Parse("2021-01-01T00:00:00Z"),
EndDateTime = DateTimeOffset.Parse("2021-01-08T00:00:00Z"),
},
RestorePointPreference = RestorePointPreference.Latest,
Tags = RestorePointTags.FastRestore,
};
// 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.RestorePoints.Search.PostAsync(requestBody);
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphsolutions "github.com/microsoftgraph/msgraph-sdk-go/solutions"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphsolutions.NewSearchPostRequestBody()
protectionUnitIds := []string {
"23014d8c-71fe-4d00-a01a-31850bc5b42a",
"43014d8c-71fe-4d00-a01a-31850bc5b42b",
"63014d8c-71fe-4d00-a01a-31850bc5b42c",
"83014d8c-71fe-4d00-a01a-31850bc5b42d",
}
requestBody.SetProtectionUnitIds(protectionUnitIds)
protectionTimePeriod := graphmodels.NewTimePeriod()
startDateTime , err := time.Parse(time.RFC3339, "2021-01-01T00:00:00Z")
protectionTimePeriod.SetStartDateTime(&startDateTime)
endDateTime , err := time.Parse(time.RFC3339, "2021-01-08T00:00:00Z")
protectionTimePeriod.SetEndDateTime(&endDateTime)
requestBody.SetProtectionTimePeriod(protectionTimePeriod)
restorePointPreference := graphmodels.LATEST_RESTOREPOINTPREFERENCE
requestBody.SetRestorePointPreference(&restorePointPreference)
tags := graphmodels.FASTRESTORE_RESTOREPOINTTAGS
requestBody.SetTags(&tags)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
search, err := graphClient.Solutions().BackupRestore().RestorePoints().Search().Post(context.Background(), requestBody, nil)
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.solutions.backuprestore.restorepoints.search.SearchPostRequestBody searchPostRequestBody = new com.microsoft.graph.solutions.backuprestore.restorepoints.search.SearchPostRequestBody();
LinkedList<String> protectionUnitIds = new LinkedList<String>();
protectionUnitIds.add("23014d8c-71fe-4d00-a01a-31850bc5b42a");
protectionUnitIds.add("43014d8c-71fe-4d00-a01a-31850bc5b42b");
protectionUnitIds.add("63014d8c-71fe-4d00-a01a-31850bc5b42c");
protectionUnitIds.add("83014d8c-71fe-4d00-a01a-31850bc5b42d");
searchPostRequestBody.setProtectionUnitIds(protectionUnitIds);
TimePeriod protectionTimePeriod = new TimePeriod();
OffsetDateTime startDateTime = OffsetDateTime.parse("2021-01-01T00:00:00Z");
protectionTimePeriod.setStartDateTime(startDateTime);
OffsetDateTime endDateTime = OffsetDateTime.parse("2021-01-08T00:00:00Z");
protectionTimePeriod.setEndDateTime(endDateTime);
searchPostRequestBody.setProtectionTimePeriod(protectionTimePeriod);
searchPostRequestBody.setRestorePointPreference(RestorePointPreference.Latest);
searchPostRequestBody.setTags(EnumSet.of(RestorePointTags.FastRestore));
var result = graphClient.solutions().backupRestore().restorePoints().search().post(searchPostRequestBody);
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
const options = {
authProvider,
};
const client = Client.init(options);
const restorePointSearchResponse = {
protectionUnitIds: ['23014d8c-71fe-4d00-a01a-31850bc5b42a', '43014d8c-71fe-4d00-a01a-31850bc5b42b', '63014d8c-71fe-4d00-a01a-31850bc5b42c', '83014d8c-71fe-4d00-a01a-31850bc5b42d'],
protectionTimePeriod: {
startDateTime: '2021-01-01T00:00:00Z',
endDateTime: '2021-01-08T00:00:00Z'
},
restorePointPreference: 'latest',
tags: 'fastRestore'
};
await client.api('/solutions/backupRestore/restorePoints/search')
.post(restorePointSearchResponse);
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Solutions\BackupRestore\RestorePoints\Search\SearchPostRequestBody;
use Microsoft\Graph\Generated\Models\TimePeriod;
use Microsoft\Graph\Generated\Models\RestorePointPreference;
use Microsoft\Graph\Generated\Models\RestorePointTags;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new SearchPostRequestBody();
$requestBody->setProtectionUnitIds(['23014d8c-71fe-4d00-a01a-31850bc5b42a', '43014d8c-71fe-4d00-a01a-31850bc5b42b', '63014d8c-71fe-4d00-a01a-31850bc5b42c', '83014d8c-71fe-4d00-a01a-31850bc5b42d', ]);
$protectionTimePeriod = new TimePeriod();
$protectionTimePeriod->setStartDateTime(new \DateTime('2021-01-01T00:00:00Z'));
$protectionTimePeriod->setEndDateTime(new \DateTime('2021-01-08T00:00:00Z'));
$requestBody->setProtectionTimePeriod($protectionTimePeriod);
$requestBody->setRestorePointPreference(new RestorePointPreference('latest'));
$requestBody->setTags(new RestorePointTags('fastRestore'));
$result = $graphServiceClient->solutions()->backupRestore()->restorePoints()->search()->post($requestBody)->wait();
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
Import-Module Microsoft.Graph.BackupRestore
$params = @{
protectionUnitIds = @(
"23014d8c-71fe-4d00-a01a-31850bc5b42a"
"43014d8c-71fe-4d00-a01a-31850bc5b42b"
"63014d8c-71fe-4d00-a01a-31850bc5b42c"
"83014d8c-71fe-4d00-a01a-31850bc5b42d"
)
protectionTimePeriod = @{
startDateTime = [System.DateTime]::Parse("2021-01-01T00:00:00Z")
endDateTime = [System.DateTime]::Parse("2021-01-08T00:00:00Z")
}
restorePointPreference = "latest"
tags = "fastRestore"
}
Search-MgSolutionBackupRestorePoint -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.solutions.backuprestore.restorepoints.search.search_post_request_body import SearchPostRequestBody
from msgraph.generated.models.time_period import TimePeriod
from msgraph.generated.models.restore_point_preference import RestorePointPreference
from msgraph.generated.models.restore_point_tags import RestorePointTags
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = SearchPostRequestBody(
protection_unit_ids = [
"23014d8c-71fe-4d00-a01a-31850bc5b42a",
"43014d8c-71fe-4d00-a01a-31850bc5b42b",
"63014d8c-71fe-4d00-a01a-31850bc5b42c",
"83014d8c-71fe-4d00-a01a-31850bc5b42d",
],
protection_time_period = TimePeriod(
start_date_time = "2021-01-01T00:00:00Z",
end_date_time = "2021-01-08T00:00:00Z",
),
restore_point_preference = RestorePointPreference.Latest,
tags = RestorePointTags.FastRestore,
)
result = await graph_client.solutions.backup_restore.restore_points.search.post(request_body)
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
响应
- 调用最多返回 5 个还原点。
- 在单个请求中最多可以包含 20 个保护单元,并且响应不会分页。
以下示例显示了相应的响应。
注意:为了提高可读性,可能缩短了此处显示的响应对象。
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.context":"/solutions/backupRestore/$metadata#restorePoints",
"searchResponseId": "M2UyZDAwMDAwMDMxMzkzYTMyNj",
"searchResults": [
{
"restorePoint": {
"@odata.type": "#microsoft.graph.restorePoint",
"id":"1f1fccc3-a642-4f61-bf49-f37b9a888279",
"protectionDateTime":"2023-01-04T00:00:00Z",
"expirationDateTime":"2024-01-04T00:00:00Z",
"protectionUnit":{
"@odata.type": "#microsoft.graph.siteProtectionUnit",
"id":"23014d8c-71fe-4d00-a01a-31850bc5b42a",
"siteId":"344d9337-d8f0-456e-92cd-00a3abdd2093",
"policyId":"9fec8e78-bce4-4aaf-ab1b-5451cc387264"
},
"tags": "fastRestore"
}
},
{
"restorePoint": {
"@odata.type": "#microsoft.graph.restorePoint",
"id":"cdf4a823-sfde-ki2s-kmsj-clu2nsdk43ga",
"protectionDateTime":"2023-01-03T00:00:00Z",
"expirationDateTime":"2024-01-03T00:00:00Z",
"protectionUnit":{
"@odata.type": "#microsoft.graph.siteProtectionUnit",
"id":"43014d8c-71fe-4d00-a01a-31850bc5b42b",
"siteId":"344d9337-d8f0-456e-92cd-00a3abdd2093",
"policyId":"9fec8e78-bce4-4aaf-ab1b-5451cc387264"
},
"tags": "fastRestore"
}
},
{
"restorePoint": {
"@odata.type": "#microsoft.graph.restorePoint",
"id":"1f1fccc3-a642-4f61-bf49-f37b9a888280",
"protectionDateTime":"2023-01-02T00:00:00Z",
"expirationDateTime":"2024-01-02T00:00:00Z",
"protectionUnit":{
"@odata.type": "#microsoft.graph.siteProtectionUnit",
"id":"83014d8c-71fe-4d00-a01a-31850bc5b42c",
"siteId":"344d9337-d8f0-456e-92cd-00a3abdd2093",
"policyId":"9fec8e78-bce4-4aaf-ab1b-5451cc387264"
},
"tags": "fastRestore"
}
}
],
"noResultProtectionUnitIds": ["63014d8c-71fe-4d00-a01a-31850bc5b42c"]
}
示例 2:使用 artifactQuery 表达式进行搜索
请求
以下示例显示了一个请求。
POST https://graph.microsoft.com/v1.0/solutions/backupRestore/restorePoints/search
Content-Type: application/json
{
"artifactQuery": {
"queryExpression": "(Sender -eq 'abc@contoso.com') -and (Subject -like '*Check email*' -or Subject -like ' Important') -and (HasAttachment -eq 'true') -and (PitrDumpsterActionTriggeredTime -gt '{2024-09-21T08:20:00.0000000Z}')",
"artifactType": "message"
},
"protectionUnitIds": ["23014d8c-71fe-4d00-a01a-31850bc5b42a"],
"protectionTimePeriod": {
"startDateTime": "2021-01-01T00:00:00Z"
},
"restorePointPreference": "oldest"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Solutions.BackupRestore.RestorePoints.Search;
using Microsoft.Graph.Models;
var requestBody = new SearchPostRequestBody
{
ArtifactQuery = new ArtifactQuery
{
QueryExpression = "(Sender -eq 'abc@contoso.com') -and (Subject -like '*Check email*' -or Subject -like ' Important') -and (HasAttachment -eq 'true') -and (PitrDumpsterActionTriggeredTime -gt '{2024-09-21T08:20:00.0000000Z}')",
ArtifactType = RestorableArtifact.Message,
},
ProtectionUnitIds = new List<string>
{
"23014d8c-71fe-4d00-a01a-31850bc5b42a",
},
ProtectionTimePeriod = new TimePeriod
{
StartDateTime = DateTimeOffset.Parse("2021-01-01T00:00:00Z"),
},
RestorePointPreference = RestorePointPreference.Oldest,
};
// 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.RestorePoints.Search.PostAsync(requestBody);
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphsolutions "github.com/microsoftgraph/msgraph-sdk-go/solutions"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphsolutions.NewSearchPostRequestBody()
artifactQuery := graphmodels.NewArtifactQuery()
queryExpression := "(Sender -eq 'abc@contoso.com') -and (Subject -like '*Check email*' -or Subject -like ' Important') -and (HasAttachment -eq 'true') -and (PitrDumpsterActionTriggeredTime -gt '{2024-09-21T08:20:00.0000000Z}')"
artifactQuery.SetQueryExpression(&queryExpression)
artifactType := graphmodels.MESSAGE_RESTORABLEARTIFACT
artifactQuery.SetArtifactType(&artifactType)
requestBody.SetArtifactQuery(artifactQuery)
protectionUnitIds := []string {
"23014d8c-71fe-4d00-a01a-31850bc5b42a",
}
requestBody.SetProtectionUnitIds(protectionUnitIds)
protectionTimePeriod := graphmodels.NewTimePeriod()
startDateTime , err := time.Parse(time.RFC3339, "2021-01-01T00:00:00Z")
protectionTimePeriod.SetStartDateTime(&startDateTime)
requestBody.SetProtectionTimePeriod(protectionTimePeriod)
restorePointPreference := graphmodels.OLDEST_RESTOREPOINTPREFERENCE
requestBody.SetRestorePointPreference(&restorePointPreference)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
search, err := graphClient.Solutions().BackupRestore().RestorePoints().Search().Post(context.Background(), requestBody, nil)
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.solutions.backuprestore.restorepoints.search.SearchPostRequestBody searchPostRequestBody = new com.microsoft.graph.solutions.backuprestore.restorepoints.search.SearchPostRequestBody();
ArtifactQuery artifactQuery = new ArtifactQuery();
artifactQuery.setQueryExpression("(Sender -eq 'abc@contoso.com') -and (Subject -like '*Check email*' -or Subject -like ' Important') -and (HasAttachment -eq 'true') -and (PitrDumpsterActionTriggeredTime -gt '{2024-09-21T08:20:00.0000000Z}')");
artifactQuery.setArtifactType(RestorableArtifact.Message);
searchPostRequestBody.setArtifactQuery(artifactQuery);
LinkedList<String> protectionUnitIds = new LinkedList<String>();
protectionUnitIds.add("23014d8c-71fe-4d00-a01a-31850bc5b42a");
searchPostRequestBody.setProtectionUnitIds(protectionUnitIds);
TimePeriod protectionTimePeriod = new TimePeriod();
OffsetDateTime startDateTime = OffsetDateTime.parse("2021-01-01T00:00:00Z");
protectionTimePeriod.setStartDateTime(startDateTime);
searchPostRequestBody.setProtectionTimePeriod(protectionTimePeriod);
searchPostRequestBody.setRestorePointPreference(RestorePointPreference.Oldest);
var result = graphClient.solutions().backupRestore().restorePoints().search().post(searchPostRequestBody);
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
const options = {
authProvider,
};
const client = Client.init(options);
const restorePointSearchResponse = {
artifactQuery: {
queryExpression: '(Sender -eq \'abc@contoso.com\') -and (Subject -like \'*Check email*\' -or Subject -like \' Important\') -and (HasAttachment -eq \'true\') -and (PitrDumpsterActionTriggeredTime -gt \'{2024-09-21T08:20:00.0000000Z}\')',
artifactType: 'message'
},
protectionUnitIds: ['23014d8c-71fe-4d00-a01a-31850bc5b42a'],
protectionTimePeriod: {
startDateTime: '2021-01-01T00:00:00Z'
},
restorePointPreference: 'oldest'
};
await client.api('/solutions/backupRestore/restorePoints/search')
.post(restorePointSearchResponse);
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Solutions\BackupRestore\RestorePoints\Search\SearchPostRequestBody;
use Microsoft\Graph\Generated\Models\ArtifactQuery;
use Microsoft\Graph\Generated\Models\RestorableArtifact;
use Microsoft\Graph\Generated\Models\TimePeriod;
use Microsoft\Graph\Generated\Models\RestorePointPreference;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new SearchPostRequestBody();
$artifactQuery = new ArtifactQuery();
$artifactQuery->setQueryExpression('(Sender -eq \'abc@contoso.com\') -and (Subject -like \'*Check email*\' -or Subject -like \' Important\') -and (HasAttachment -eq \'true\') -and (PitrDumpsterActionTriggeredTime -gt \'{2024-09-21T08:20:00.0000000Z}\')');
$artifactQuery->setArtifactType(new RestorableArtifact('message'));
$requestBody->setArtifactQuery($artifactQuery);
$requestBody->setProtectionUnitIds(['23014d8c-71fe-4d00-a01a-31850bc5b42a', ]);
$protectionTimePeriod = new TimePeriod();
$protectionTimePeriod->setStartDateTime(new \DateTime('2021-01-01T00:00:00Z'));
$requestBody->setProtectionTimePeriod($protectionTimePeriod);
$requestBody->setRestorePointPreference(new RestorePointPreference('oldest'));
$result = $graphServiceClient->solutions()->backupRestore()->restorePoints()->search()->post($requestBody)->wait();
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
Import-Module Microsoft.Graph.BackupRestore
$params = @{
artifactQuery = @{
queryExpression = "(Sender -eq 'abc@contoso.com') -and (Subject -like '*Check email*' -or Subject -like ' Important') -and (HasAttachment -eq 'true') -and (PitrDumpsterActionTriggeredTime -gt '{2024-09-21T08:20:00.0000000Z}')"
artifactType = "message"
}
protectionUnitIds = @(
"23014d8c-71fe-4d00-a01a-31850bc5b42a"
)
protectionTimePeriod = @{
startDateTime = [System.DateTime]::Parse("2021-01-01T00:00:00Z")
}
restorePointPreference = "oldest"
}
Search-MgSolutionBackupRestorePoint -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.solutions.backuprestore.restorepoints.search.search_post_request_body import SearchPostRequestBody
from msgraph.generated.models.artifact_query import ArtifactQuery
from msgraph.generated.models.restorable_artifact import RestorableArtifact
from msgraph.generated.models.time_period import TimePeriod
from msgraph.generated.models.restore_point_preference import RestorePointPreference
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = SearchPostRequestBody(
artifact_query = ArtifactQuery(
query_expression = "(Sender -eq 'abc@contoso.com') -and (Subject -like '*Check email*' -or Subject -like ' Important') -and (HasAttachment -eq 'true') -and (PitrDumpsterActionTriggeredTime -gt '{2024-09-21T08:20:00.0000000Z}')",
artifact_type = RestorableArtifact.Message,
),
protection_unit_ids = [
"23014d8c-71fe-4d00-a01a-31850bc5b42a",
],
protection_time_period = TimePeriod(
start_date_time = "2021-01-01T00:00:00Z",
),
restore_point_preference = RestorePointPreference.Oldest,
)
result = await graph_client.solutions.backup_restore.restore_points.search.post(request_body)
有关如何将 SDK 添加到项目并创建 authProvider 实例的详细信息,请参阅 SDK 文档。
响应
以下示例显示了相应的响应。
注意:为了提高可读性,可能缩短了此处显示的响应对象。
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.context": "/solutions/backupRestore/$metadata#restorePoints",
"searchResponseId": "M2UyZDAwMDAwMDMxMzkzYTMyNj",
"searchResults": [
{
"artifactHitCount": 26,
"restorePoint": {
"@odata.type": "#microsoft.graph.restorePoint",
"id": "1f1fccc3-a642-4f61-bf49-f37b9a888279",
"protectionDateTime": "2023-01-04T00:00:00Z",
"expirationDateTime": "2024-01-04T00:00:00Z",
"protectionUnit": {
"@odata.type": "#microsoft.graph.siteProtectionUnit",
"id": "23014d8c-71fe-4d00-a01a-31850bc5b42a",
"siteId": "344d9337-d8f0-456e-92cd-00a3abdd2093",
"policyId": "9fec8e78-bce4-4aaf-ab1b-5451cc387264"
},
"tags": "fastRestore"
}
}
]
}