命名空间:microsoft.graph.ediscovery
重要
Microsoft Graph版本下的 /beta API 可能会发生更改。 不支持在生产应用程序中使用这些 API。 若要确定 API 是否在 v1.0 中可用,请使用 版本 选择器。
将 标记 应用于与指定的 reviewSetQuery 匹配的文档。
权限
要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限。
| 权限类型 |
权限(从最低特权到最高特权) |
| 委派(工作或学校帐户) |
eDiscovery.Read.All、eDiscovery.ReadWrite.All |
| 委派(个人 Microsoft 帐户) |
不支持。 |
| 应用程序 |
不支持。 |
HTTP 请求
POST /compliance/ediscovery/cases/{caseId}/reviewSets/{reviewSetId}/queries/{reviewSetQueryId}/applyTags
| 名称 |
说明 |
| Authorization |
Bearer {token}。必需。 |
| Content-Type |
application/json. Required. |
请求正文
在请求正文中,提供参数的 JSON 表示形式。
下表显示了可用于此操作的参数。
响应
如果成功,此操作返回 202 Accepted 响应代码。
如果标记操作成功启动,此操作将返回 响应 202 Accepted 代码。 响应还将包含标头 Location ,其中包含为处理标记而创建的 tagOperation 的位置。 通过向位置提出 GET 请求来检查标记操作的状态,成功完成后, 状态 将更改为 succeeded。
示例
请求
POST https://graph.microsoft.com/beta/compliance/ediscovery/cases/47746044-fd0b-4a30-acfc-5272b691ba5b/reviewsets/6c95c2a6-31fa-45a8-93ef-dd4531974783/queries/b4798d14-748d-468e-a1ec-96a2b1d49677/applyTags
Content-Type: application/json
{
"tagsToAdd": [
{
"id": "b4798d14-748d-468e-a1ec-96a2b1d49677"
}
]
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var tagsToAdd = new List<Microsoft.Graph.Ediscovery.Tag>()
{
new Microsoft.Graph.Ediscovery.Tag
{
Id = "b4798d14-748d-468e-a1ec-96a2b1d49677"
}
};
await graphClient.Compliance.Ediscovery.Cases["{ediscovery.case-id}"].ReviewSets["{ediscovery.reviewSet-id}"].Queries["{ediscovery.reviewSetQuery-id}"]
.ApplyTags(tagsToAdd,null)
.Request()
.PostAsync();
const options = {
authProvider,
};
const client = Client.init(options);
const applyTags = {
tagsToAdd: [
{
id: 'b4798d14-748d-468e-a1ec-96a2b1d49677'
}
]
};
await client.api('/compliance/ediscovery/cases/47746044-fd0b-4a30-acfc-5272b691ba5b/reviewsets/6c95c2a6-31fa-45a8-93ef-dd4531974783/queries/b4798d14-748d-468e-a1ec-96a2b1d49677/applyTags')
.version('beta')
.post(applyTags);
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/compliance/ediscovery/cases/47746044-fd0b-4a30-acfc-5272b691ba5b/reviewsets/6c95c2a6-31fa-45a8-93ef-dd4531974783/queries/b4798d14-748d-468e-a1ec-96a2b1d49677/applyTags"]]];
[urlRequest setHTTPMethod:@"POST"];
[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSMutableDictionary *payloadDictionary = [[NSMutableDictionary alloc] init];
NSMutableArray *tagsToAddList = [[NSMutableArray alloc] init];
MSGraphEdiscoveryTag *tagsToAdd = [[MSGraphEdiscoveryTag alloc] init];
[tagsToAdd setId:@"b4798d14-748d-468e-a1ec-96a2b1d49677"];
[tagsToAddList addObject: tagsToAdd];
payloadDictionary[@"tagsToAdd"] = tagsToAddList;
NSData *data = [NSJSONSerialization dataWithJSONObject:payloadDictionary options:kNilOptions error:&error];
[urlRequest setHTTPBody:data];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
//Request Completed
}];
[meDataTask execute];
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
LinkedList<Tag> tagsToAddList = new LinkedList<Tag>();
Tag tagsToAdd = new Tag();
tagsToAdd.id = "b4798d14-748d-468e-a1ec-96a2b1d49677";
tagsToAddList.add(tagsToAdd);
TagCollectionResponse tagCollectionResponse = new TagCollectionResponse();
tagCollectionResponse.value = tagsToAddList;
TagCollectionPage tagCollectionPage = new TagCollectionPage(tagCollectionResponse, null);
graphClient.compliance().ediscovery().cases("47746044-fd0b-4a30-acfc-5272b691ba5b").reviewSets("6c95c2a6-31fa-45a8-93ef-dd4531974783").queries("b4798d14-748d-468e-a1ec-96a2b1d49677")
.applyTags(ReviewSetQueryApplyTagsParameterSet
.newBuilder()
.withTagsToAdd(tagsToAddList)
.withTagsToRemove(null)
.build())
.buildRequest()
.post();
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.New()
requestBody.SetTagsToAdd( []Tag {
msgraphsdk.NewTag(),
SetAdditionalData(map[string]interface{}{
"id": "b4798d14-748d-468e-a1ec-96a2b1d49677",
}
}
caseId := "case-id"
reviewSetId := "reviewSet-id"
reviewSetQueryId := "reviewSetQuery-id"
graphClient.Compliance().Ediscovery().CasesById(&caseId).ReviewSetsById(&reviewSetId).QueriesById(&reviewSetQueryId).ApplyTags(case-id, reviewSet-id, reviewSetQuery-id).Post(requestBody)
Import-Module Microsoft.Graph.Compliance
$params = @{
TagsToAdd = @(
@{
Id = "b4798d14-748d-468e-a1ec-96a2b1d49677"
}
)
}
Add-MgComplianceEdiscoveryCaseReviewSetQueryTag -CaseId $caseId -ReviewSetId $reviewSetId -ReviewSetQueryId $reviewSetQueryId -BodyParameter $params
响应
HTTP/1.1 202 Accepted
cache-control: no-cache,
client-request-id: 56c9dd8b-d8f7-59ae-6733-38191862c9c9,
location: https://graph.microsoft.com/beta/compliance/ediscovery/cases('47746044-fd0b-4a30-acfc-5272b691ba5b')/operations('d77f7933e88842bab3221e280be9dc0b'),
request-id: c2397a81-e9c2-4851-b669-d87e0751e45a