Update caseSettings
命名空间:microsoft.graph.ediscovery
重要
Microsoft Graph版本下的 /beta API 可能会发生更改。 不支持在生产应用程序中使用这些 API。 若要确定 API 是否在 v1.0 中可用,请使用 版本 选择器。
更新电子数据展示 caseSettings 对象 的属性。
权限
要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限。
| 权限类型 |
权限(从最低特权到最高特权) |
| 委派(工作或学校帐户) |
eDiscovery.ReadWrite.All |
| 委派(个人 Microsoft 帐户) |
不支持。 |
| 应用程序 |
不支持。 |
HTTP 请求
PATCH /compliance/ediscovery/cases/{caseId}/settings
| 名称 |
说明 |
| Authorization |
Bearer {token}。必需。 |
| Content-Type |
application/json. Required. |
请求正文
在请求正文中,提供 caseSettings 对象的 JSON 表示形式。
响应
如果成功,此方法返回 204 No Content 响应代码。
示例
请求
PATCH https://graph.microsoft.com/beta/compliance/ediscovery/cases/{caseId}/settings
Content-Type: application/json
{
"redundancyDetection": {
"isEnabled": false,
"similarityThreshold": 70,
"minWords": 12,
"maxWords": 400000
},
"topicModeling": {
"isEnabled": false,
"ignoreNumbers": false,
"topicCount": 50,
"dynamicallyAdjustTopicCount": false
},
"ocr": {
"isEnabled": true,
"maxImageSize": 12000
}
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var caseSettings = new Microsoft.Graph.Ediscovery.CaseSettings
{
RedundancyDetection = new Microsoft.Graph.Ediscovery.RedundancyDetectionSettings
{
IsEnabled = false,
SimilarityThreshold = 70,
MinWords = 12,
MaxWords = 400000
},
TopicModeling = new Microsoft.Graph.Ediscovery.TopicModelingSettings
{
IsEnabled = false,
IgnoreNumbers = false,
TopicCount = 50,
DynamicallyAdjustTopicCount = false
},
Ocr = new Microsoft.Graph.Ediscovery.OcrSettings
{
IsEnabled = true,
MaxImageSize = 12000
}
};
await graphClient.Compliance.Ediscovery.Cases["{ediscovery.case-id}"].Settings
.Request()
.UpdateAsync(caseSettings);
const options = {
authProvider,
};
const client = Client.init(options);
const caseSettings = {
redundancyDetection: {
isEnabled: false,
similarityThreshold: 70,
minWords: 12,
maxWords: 400000
},
topicModeling: {
isEnabled: false,
ignoreNumbers: false,
topicCount: 50,
dynamicallyAdjustTopicCount: false
},
ocr: {
isEnabled: true,
maxImageSize: 12000
}
};
await client.api('/compliance/ediscovery/cases/{caseId}/settings')
.version('beta')
.update(caseSettings);
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/compliance/ediscovery/cases/{caseId}/settings"]]];
[urlRequest setHTTPMethod:@"PATCH"];
[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
MSGraphEdiscoveryCaseSettings *caseSettings = [[MSGraphEdiscoveryCaseSettings alloc] init];
MSGraphEdiscoveryRedundancyDetectionSettings *redundancyDetection = [[MSGraphEdiscoveryRedundancyDetectionSettings alloc] init];
[redundancyDetection setIsEnabled: false];
[redundancyDetection setSimilarityThreshold: 70];
[redundancyDetection setMinWords: 12];
[redundancyDetection setMaxWords: 400000];
[caseSettings setRedundancyDetection:redundancyDetection];
MSGraphEdiscoveryTopicModelingSettings *topicModeling = [[MSGraphEdiscoveryTopicModelingSettings alloc] init];
[topicModeling setIsEnabled: false];
[topicModeling setIgnoreNumbers: false];
[topicModeling setTopicCount: 50];
[topicModeling setDynamicallyAdjustTopicCount: false];
[caseSettings setTopicModeling:topicModeling];
MSGraphEdiscoveryOcrSettings *ocr = [[MSGraphEdiscoveryOcrSettings alloc] init];
[ocr setIsEnabled: true];
[ocr setMaxImageSize: 12000];
[caseSettings setOcr:ocr];
NSError *error;
NSData *caseSettingsData = [caseSettings getSerializedDataWithError:&error];
[urlRequest setHTTPBody:caseSettingsData];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
//Request Completed
}];
[meDataTask execute];
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
CaseSettings caseSettings = new CaseSettings();
RedundancyDetectionSettings redundancyDetection = new RedundancyDetectionSettings();
redundancyDetection.isEnabled = false;
redundancyDetection.similarityThreshold = 70;
redundancyDetection.minWords = 12;
redundancyDetection.maxWords = 400000;
caseSettings.redundancyDetection = redundancyDetection;
TopicModelingSettings topicModeling = new TopicModelingSettings();
topicModeling.isEnabled = false;
topicModeling.ignoreNumbers = false;
topicModeling.topicCount = 50;
topicModeling.dynamicallyAdjustTopicCount = false;
caseSettings.topicModeling = topicModeling;
OcrSettings ocr = new OcrSettings();
ocr.isEnabled = true;
ocr.maxImageSize = 12000;
caseSettings.ocr = ocr;
graphClient.compliance().ediscovery().cases("{caseId}").settings()
.buildRequest()
.patch(caseSettings);
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.NewCaseSettings()
redundancyDetection := msgraphsdk.NewRedundancyDetectionSettings()
requestBody.SetRedundancyDetection(redundancyDetection)
isEnabled := false
redundancyDetection.SetIsEnabled(&isEnabled)
similarityThreshold := int32(70)
redundancyDetection.SetSimilarityThreshold(&similarityThreshold)
minWords := int32(12)
redundancyDetection.SetMinWords(&minWords)
maxWords := int32(400000)
redundancyDetection.SetMaxWords(&maxWords)
topicModeling := msgraphsdk.NewTopicModelingSettings()
requestBody.SetTopicModeling(topicModeling)
isEnabled := false
topicModeling.SetIsEnabled(&isEnabled)
ignoreNumbers := false
topicModeling.SetIgnoreNumbers(&ignoreNumbers)
topicCount := int32(50)
topicModeling.SetTopicCount(&topicCount)
dynamicallyAdjustTopicCount := false
topicModeling.SetDynamicallyAdjustTopicCount(&dynamicallyAdjustTopicCount)
ocr := msgraphsdk.NewOcrSettings()
requestBody.SetOcr(ocr)
isEnabled := true
ocr.SetIsEnabled(&isEnabled)
maxImageSize := int32(12000)
ocr.SetMaxImageSize(&maxImageSize)
caseId := "case-id"
graphClient.Compliance().Ediscovery().CasesById(&caseId).Settings().Patch(requestBody)
Import-Module Microsoft.Graph.Compliance
$params = @{
RedundancyDetection = @{
IsEnabled = $false
SimilarityThreshold = 70
MinWords = 12
MaxWords = 400000
}
TopicModeling = @{
IsEnabled = $false
IgnoreNumbers = $false
TopicCount = 50
DynamicallyAdjustTopicCount = $false
}
Ocr = @{
IsEnabled = $true
MaxImageSize = 12000
}
}
Update-MgComplianceEdiscoveryCaseSetting -CaseId $caseId -BodyParameter $params
响应
注意: 为了提高可读性,可能缩短了此处显示的响应对象。
HTTP/1.1 204 No Content
cache-control: no-cache
client-request-id: e9fc7554-ca5e-0928-fc09-9c5825820c88
content-length: 0
request-id: 1f53bd55-f099-46cb-91df-8f5d466aba3a