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.
Create a new documentProcessingJob object. The document processing job queues a document, or all documents in a folder, for processing by the applied content models.
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.
In the request body, supply a JSON representation of the documentProcessingJob object.
You can specify the following properties when you create a documentProcessingJob.
Property
Type
Description
jobType
documentProcessingJobType
The document processing job type. The possible values are: File, Folder. Optional.
status
documentProcessingJobStatus
The document processing job status. The possible values are: inProgress, completed, failed, notStarted. Typically when a job is created, its initial status is notStarted. Optional.
createdDateTime
DateTimeOffset
Date and time of item creation. Read-only. Optional.
listItemUniqueId
String
The unique ID of the file or folder to process. To get the unique ID, use the GET driveItem method and read the sharepointIds property.
Response
If successful, this method returns a 201 Created response code and a documentProcessingJob object in the response body.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new DocumentProcessingJob
{
OdataType = "#microsoft.graph.documentProcessingJob",
JobType = DocumentProcessingJobType.File,
ListItemUniqueId = "5955b119-99c1-4af9-97ed-3449e02de6f1",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Sites["{site-id}"].DocumentProcessingJobs.PostAsync(requestBody);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// 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"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewDocumentProcessingJob()
jobType := graphmodels.FILE_DOCUMENTPROCESSINGJOBTYPE
requestBody.SetJobType(&jobType)
listItemUniqueId := "5955b119-99c1-4af9-97ed-3449e02de6f1"
requestBody.SetListItemUniqueId(&listItemUniqueId)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
documentProcessingJobs, err := graphClient.Sites().BySiteId("site-id").DocumentProcessingJobs().Post(context.Background(), requestBody, nil)
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
DocumentProcessingJob documentProcessingJob = new DocumentProcessingJob();
documentProcessingJob.setOdataType("#microsoft.graph.documentProcessingJob");
documentProcessingJob.setJobType(DocumentProcessingJobType.File);
documentProcessingJob.setListItemUniqueId("5955b119-99c1-4af9-97ed-3449e02de6f1");
DocumentProcessingJob result = graphClient.sites().bySiteId("{site-id}").documentProcessingJobs().post(documentProcessingJob);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\DocumentProcessingJob;
use Microsoft\Graph\Beta\Generated\Models\DocumentProcessingJobType;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new DocumentProcessingJob();
$requestBody->setOdataType('#microsoft.graph.documentProcessingJob');
$requestBody->setJobType(new DocumentProcessingJobType('file'));
$requestBody->setListItemUniqueId('5955b119-99c1-4af9-97ed-3449e02de6f1');
$result = $graphServiceClient->sites()->bySiteId('site-id')->documentProcessingJobs()->post($requestBody)->wait();
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.document_processing_job import DocumentProcessingJob
from msgraph_beta.generated.models.document_processing_job_type import DocumentProcessingJobType
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = DocumentProcessingJob(
odata_type = "#microsoft.graph.documentProcessingJob",
job_type = DocumentProcessingJobType.File,
list_item_unique_id = "5955b119-99c1-4af9-97ed-3449e02de6f1",
)
result = await graph_client.sites.by_site_id('site-id').document_processing_jobs.post(request_body)
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.