Namespace: microsoft.graph.security
Important
APIs under the /beta
version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.
Run an estimate of the number of emails and documents in the eDiscovery search. To learn more about searches in eDiscovery, see Collect data for a case in eDiscovery (Premium).
This API is available in the following national cloud deployments.
Global service |
US Government L4 |
US Government L5 (DOD) |
China operated by 21Vianet |
✅ |
✅ |
✅ |
❌ |
Permissions
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
Permission type |
Least privileged permissions |
Higher privileged permissions |
Delegated (work or school account) |
eDiscovery.Read.All |
eDiscovery.ReadWrite.All |
Delegated (personal Microsoft account) |
Not supported. |
Not supported. |
Application |
eDiscovery.Read.All |
eDiscovery.ReadWrite.All |
HTTP request
POST /security/cases/ediscoveryCases/{ediscoveryCaseId}/searches/{ediscoverySearchId}/estimateStatistics
Request body
In the request body, supply a JSON representation of the parameters.
The following table lists the parameters that you can use with this action.
Parameter |
Type |
Description |
statisticsOptions |
microsoft.graph.security.statisticsOptions |
Bitwise options that specify the statistics to generate. The possible values are: includeRefiners , includeQueryStats , includeUnindexedStats , advancedIndexing , locationsWithoutHits , unknownFutureValue . The advancedIndexing and locationsWithoutHits values are only considered if includeUnindexedStats is set. |
Response
If the estimate is started successfully, this action returns a 202 Accepted
response code. The response contains a Location
header, which contains the location of the microsoft.graph.security.estimateStatisticsOperation that was created to handle the estimate. Check the status of the estimate operation by making a GET request to the value of the Location
header.
Examples
Request
The following example shows a request.
POST https://graph.microsoft.com/beta/security/cases/ediscoveryCases/b0073e4e-4184-41c6-9eb7-8c8cc3e2288b/searches/c61a5860-d634-4d14-aea7-d82b6f4eb7af/estimatestatistics
Content-Type: application/json
{
"statisticsOptions": "includeRefiners, includeQueryStats, includeUnindexedStats, advancedIndexing, locationsWithoutHits"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Security.Cases.EdiscoveryCases.Item.Searches.Item.MicrosoftGraphSecurityEstimateStatistics;
var requestBody = new EstimateStatisticsPostRequestBody
{
AdditionalData = new Dictionary<string, object>
{
{
"statisticsOptions" , "includeRefiners, includeQueryStats, includeUnindexedStats, advancedIndexing, locationsWithoutHits"
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.Security.Cases.EdiscoveryCases["{ediscoveryCase-id}"].Searches["{ediscoverySearch-id}"].MicrosoftGraphSecurityEstimateStatistics.PostAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphsecurity "github.com/microsoftgraph/msgraph-beta-sdk-go/security"
//other-imports
)
requestBody := graphsecurity.NewEstimateStatisticsPostRequestBody()
additionalData := map[string]interface{}{
"statisticsOptions" : "includeRefiners, includeQueryStats, includeUnindexedStats, advancedIndexing, locationsWithoutHits",
}
requestBody.SetAdditionalData(additionalData)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
graphClient.Security().Cases().EdiscoveryCases().ByEdiscoveryCaseId("ediscoveryCase-id").Searches().ByEdiscoverySearchId("ediscoverySearch-id").MicrosoftGraphSecurityEstimateStatistics().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.security.cases.ediscoverycases.item.searches.item.microsoftgraphsecurityestimatestatistics.EstimateStatisticsPostRequestBody estimateStatisticsPostRequestBody = new com.microsoft.graph.beta.security.cases.ediscoverycases.item.searches.item.microsoftgraphsecurityestimatestatistics.EstimateStatisticsPostRequestBody();
HashMap<String, Object> additionalData = new HashMap<String, Object>();
additionalData.put("statisticsOptions", "includeRefiners, includeQueryStats, includeUnindexedStats, advancedIndexing, locationsWithoutHits");
estimateStatisticsPostRequestBody.setAdditionalData(additionalData);
graphClient.security().cases().ediscoveryCases().byEdiscoveryCaseId("{ediscoveryCase-id}").searches().byEdiscoverySearchId("{ediscoverySearch-id}").microsoftGraphSecurityEstimateStatistics().post(estimateStatisticsPostRequestBody);
const options = {
authProvider,
};
const client = Client.init(options);
const estimatestatistics = {
statisticsOptions: 'includeRefiners, includeQueryStats, includeUnindexedStats, advancedIndexing, locationsWithoutHits'
};
await client.api('/security/cases/ediscoveryCases/b0073e4e-4184-41c6-9eb7-8c8cc3e2288b/searches/c61a5860-d634-4d14-aea7-d82b6f4eb7af/estimatestatistics')
.version('beta')
.post(estimatestatistics);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Security\Cases\EdiscoveryCases\Item\Searches\Item\MicrosoftGraphSecurityEstimateStatistics\EstimateStatisticsPostRequestBody;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new EstimateStatisticsPostRequestBody();
$additionalData = [
'statisticsOptions' => 'includeRefiners, includeQueryStats, includeUnindexedStats, advancedIndexing, locationsWithoutHits',
];
$requestBody->setAdditionalData($additionalData);
$graphServiceClient->security()->cases()->ediscoveryCases()->byEdiscoveryCaseId('ediscoveryCase-id')->searches()->byEdiscoverySearchId('ediscoverySearch-id')->microsoftGraphSecurityEstimateStatistics()->post($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.Security
$params = @{
statisticsOptions = "includeRefiners, includeQueryStats, includeUnindexedStats, advancedIndexing, locationsWithoutHits"
}
Invoke-MgBetaEstimateSecurityCaseEdiscoveryCaseSearchStatistics -EdiscoveryCaseId $ediscoveryCaseId -EdiscoverySearchId $ediscoverySearchId -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.security.cases.ediscoverycases.item.searches.item.microsoft_graph_security_estimate_statistics.estimate_statistics_post_request_body import EstimateStatisticsPostRequestBody
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = EstimateStatisticsPostRequestBody(
additional_data = {
"statistics_options" : "includeRefiners, includeQueryStats, includeUnindexedStats, advancedIndexing, locationsWithoutHits",
}
)
await graph_client.security.cases.ediscovery_cases.by_ediscovery_case_id('ediscoveryCase-id').searches.by_ediscovery_search_id('ediscoverySearch-id').microsoft_graph_security_estimate_statistics.post(request_body)
Response
The following example shows the response.
HTTP/1.1 202 Accepted
Location: https://graph.microsoft.com/beta/security/cases/ediscoverycases('4c551bc5-f6f8-435c-8391-d1a08f1ffd5b')/operations('698514cc118f4c8b8cdf1bf0797bf478')