Namespace: microsoft.graph.security
Initiate an export from a ediscoveryReviewSetQuery. For details, see Export documents from a review set 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}/reviewSets/{ediscoveryReviewSetId}/queries/{queryId}/export
Request body
In the request body, supply a JSON representation of the parameters.
The following table shows the parameters that can be used with this action.
Parameter |
Type |
Description |
description |
String |
Description of the export. |
exportOptions |
microsoft.graph.security.exportOptions |
Bitwise options that control the format of the export. Possible values are: originalFiles , text , pdfReplacement , tags , unknownFutureValue , splitSource , includeFolderAndPath , friendlyName , condensePaths . Use the Prefer: include-unknown-enum-members request header to get the following values from this evolvable enum: splitSource , includeFolderAndPath , friendlyName , condensePaths . The summary and load files are always included. If originalFiles isn't selected, only the tags member is considered. |
exportStructure |
microsoft.graph.security.exportFileStructure |
Bitwise options that control file structure and packaging of the export. Possible values are: none , directory (deprecated), pst , unknownFutureValue , msg . Use the Prefer: include-unknown-enum-members request header to get the following value from this evolvable enum: msg . The directory member is deprecated. It remains in v1.0 for backward compatibility. Going forward, use either pst or msg . |
outputName |
String |
Name of the export. Required. |
Response
If successful, this action returns a 202 Accepted
response code.
Examples
Request
The following example shows a request.
POST https://graph.microsoft.com/v1.0/security/cases/ediscoveryCases/58399dff-cebe-478f-b1af-d3227f1fd645/reviewSets/273f11a1-17aa-419c-981d-ff10d33e420f/queries/fcb86cd1-50e0-427c-840e-ba6f087364e5/export
Content-Type: application/json
{
"outputName": "Export reviewset query via API",
"description": "Export for the Contoso investigation 2",
"exportOptions": "originalFiles,tags",
"exportStructure": "directory"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Security.Cases.EdiscoveryCases.Item.ReviewSets.Item.Queries.Item.MicrosoftGraphSecurityExport;
using Microsoft.Graph.Models.Security;
var requestBody = new ExportPostRequestBody
{
OutputName = "Export reviewset query via API",
Description = "Export for the Contoso investigation 2",
ExportOptions = ExportOptions.OriginalFiles | ExportOptions.Tags,
ExportStructure = ExportFileStructure.Directory,
};
// 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}"].ReviewSets["{ediscoveryReviewSet-id}"].Queries["{ediscoveryReviewSetQuery-id}"].MicrosoftGraphSecurityExport.PostAsync(requestBody);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
// 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"
graphsecurity "github.com/microsoftgraph/msgraph-sdk-go/security"
graphmodelssecurity "github.com/microsoftgraph/msgraph-sdk-go/models/security"
//other-imports
)
requestBody := graphsecurity.NewExportPostRequestBody()
outputName := "Export reviewset query via API"
requestBody.SetOutputName(&outputName)
description := "Export for the Contoso investigation 2"
requestBody.SetDescription(&description)
exportOptions := graphmodels.ORIGINALFILES,TAGS_EXPORTOPTIONS
requestBody.SetExportOptions(&exportOptions)
exportStructure := graphmodels.DIRECTORY_EXPORTFILESTRUCTURE
requestBody.SetExportStructure(&exportStructure)
// 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").ReviewSets().ByEdiscoveryReviewSetId("ediscoveryReviewSet-id").Queries().ByEdiscoveryReviewSetQueryId("ediscoveryReviewSetQuery-id").MicrosoftGraphSecurityExport().Post(context.Background(), requestBody, nil)
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.security.cases.ediscoverycases.item.reviewsets.item.queries.item.microsoftgraphsecurityexport.ExportPostRequestBody exportPostRequestBody = new com.microsoft.graph.security.cases.ediscoverycases.item.reviewsets.item.queries.item.microsoftgraphsecurityexport.ExportPostRequestBody();
exportPostRequestBody.setOutputName("Export reviewset query via API");
exportPostRequestBody.setDescription("Export for the Contoso investigation 2");
exportPostRequestBody.setExportOptions(EnumSet.of(com.microsoft.graph.models.security.ExportOptions.OriginalFiles, com.microsoft.graph.models.security.ExportOptions.Tags));
exportPostRequestBody.setExportStructure(com.microsoft.graph.models.security.ExportFileStructure.Directory);
graphClient.security().cases().ediscoveryCases().byEdiscoveryCaseId("{ediscoveryCase-id}").reviewSets().byEdiscoveryReviewSetId("{ediscoveryReviewSet-id}").queries().byEdiscoveryReviewSetQueryId("{ediscoveryReviewSetQuery-id}").microsoftGraphSecurityExport().post(exportPostRequestBody);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
const options = {
authProvider,
};
const client = Client.init(options);
const _export = {
outputName: 'Export reviewset query via API',
description: 'Export for the Contoso investigation 2',
exportOptions: 'originalFiles,tags',
exportStructure: 'directory'
};
await client.api('/security/cases/ediscoveryCases/58399dff-cebe-478f-b1af-d3227f1fd645/reviewSets/273f11a1-17aa-419c-981d-ff10d33e420f/queries/fcb86cd1-50e0-427c-840e-ba6f087364e5/export')
.post(_export);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Security\Cases\EdiscoveryCases\Item\ReviewSets\Item\Queries\Item\MicrosoftGraphSecurityExport\ExportPostRequestBody;
use Microsoft\Graph\Generated\Models\Security\ExportOptions;
use Microsoft\Graph\Generated\Models\Security\ExportFileStructure;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new ExportPostRequestBody();
$requestBody->setOutputName('Export reviewset query via API');
$requestBody->setDescription('Export for the Contoso investigation 2');
$requestBody->setExportOptions(new ExportOptions('originalFiles,tags'));
$requestBody->setExportStructure(new ExportFileStructure('directory'));
$graphServiceClient->security()->cases()->ediscoveryCases()->byEdiscoveryCaseId('ediscoveryCase-id')->reviewSets()->byEdiscoveryReviewSetId('ediscoveryReviewSet-id')->queries()->byEdiscoveryReviewSetQueryId('ediscoveryReviewSetQuery-id')->microsoftGraphSecurityExport()->post($requestBody)->wait();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
Import-Module Microsoft.Graph.Security
$params = @{
outputName = "Export reviewset query via API"
description = "Export for the Contoso investigation 2"
exportOptions = "originalFiles,tags"
exportStructure = "directory"
}
Export-MgSecurityCaseEdiscoveryCaseReviewSetQuery -EdiscoveryCaseId $ediscoveryCaseId -EdiscoveryReviewSetId $ediscoveryReviewSetId -EdiscoveryReviewSetQueryId $ediscoveryReviewSetQueryId -BodyParameter $params
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.security.cases.ediscoverycases.item.reviewsets.item.queries.item.microsoft_graph_security_export.export_post_request_body import ExportPostRequestBody
from msgraph.generated.models.export_options import ExportOptions
from msgraph.generated.models.export_file_structure import ExportFileStructure
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = ExportPostRequestBody(
output_name = "Export reviewset query via API",
description = "Export for the Contoso investigation 2",
export_options = ExportOptions.OriginalFiles | ExportOptions.Tags,
export_structure = ExportFileStructure.Directory,
)
await graph_client.security.cases.ediscovery_cases.by_ediscovery_case_id('ediscoveryCase-id').review_sets.by_ediscovery_review_set_id('ediscoveryReviewSet-id').queries.by_ediscovery_review_set_query_id('ediscoveryReviewSetQuery-id').microsoft_graph_security_export.post(request_body)
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
Response
The following example shows the response.
HTTP/1.1 202 Accepted