Create printJob for a printerShare
Namespace: microsoft.graph
Create a new printJob for a printerShare.
Also creates a new printDocument associated with the printJob.
Note: A user can submit up to ~10000 print jobs in 10 days.
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.
In addition to the following permissions, the user or app's tenant must have an active Universal Print subscription and have a permission that grants Get printerShare access.
Permission type | Permissions (from least to most privileged) |
---|---|
Delegated (work or school account) | PrintJob.ReadWriteBasic, PrintJob.ReadWrite, PrintJob.ReadWriteBasic.All, PrintJob.ReadWrite.All |
Delegated (personal Microsoft account) | Not Supported. |
Application | Not Supported. |
HTTP request
POST /print/shares/{printerShareId}/jobs
Request headers
Name | Description |
---|---|
Authorization | Bearer {token}. Required. |
Content-Type | application/json. Required. |
Request body
In the request body, supply a JSON representation of a printJob object. The printJob object should only contain configuration property. All properties of configuration are nullable. All other fields, including job and document IDs, are set automatically during resource creation and should not be provided in request.
Right now, Universal Print supports only one printDocument per printJob object.
Response
If successful, this method returns a 201 Created
response code and a printJob object and associated printDocument in the response body.
Examples
Request
POST https://graph.microsoft.com/v1.0/print/shares/{printerShareId}/jobs
Content-Type: application/json
{
"configuration": {
"feedOrientation": "longEdgeFirst",
"pageRanges": [
{
"start": 1,
"end": 1
}
],
"quality": "medium",
"dpi": 600,
"orientation": "landscape",
"copies": 1,
"duplexMode": "oneSided",
"colorMode": "blackAndWhite",
"inputBin": "by-pass-tray",
"outputBin": "output-tray",
"mediaSize": "A4",
"margin": {
"top": 0,
"bottom": 0,
"left": 0,
"right": 0
},
"mediaType": "stationery",
"finishings": null,
"pagesPerSheet": 1,
"multipageLayout": "clockwiseFromBottomLeft",
"collate": false,
"scaling": "shrinkToFit",
"fitPdfToPage": false
}
}
Response
Note: The response object shown here might be shortened for readability.
HTTP/1.1 201 Created
Content-Type: application/json
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#print/printJobs/$entity",
"id": "1825",
"createdDateTime": "2020-10-14T05:16:49-07:00",
"isFetchable": false,
"redirectedFrom": null,
"redirectedTo": null,
"createdBy": {
"id": "{userId}",
"displayName": "{username}",
"ipAddress": null,
"userPrincipalName": "{userupn}"
},
"status": {
"state": "paused",
"description": "The job is not a candidate for processing yet.",
"isAcquiredByPrinter": false,
"details": [
"uploadPending"
]
},
"configuration": {
"quality": "medium",
"dpi": 600,
"feedOrientation": "longEdgeFirst",
"orientation": "landscape",
"duplexMode": "oneSided",
"copies": 1,
"colorMode": "blackAndWhite",
"inputBin": "by-pass-tray",
"outputBin": "output-tray",
"mediaSize": "A4",
"mediaType": "stationery",
"finishings": null,
"pagesPerSheet": 1,
"multipageLayout": "clockwiseFromBottomLeft",
"collate": false,
"scaling": "shrinkToFit",
"fitPdfToPage": false,
"pageRanges": [
{
"start": 1,
"end": 1
}
],
"margin": {
"top": 0,
"bottom": 0,
"left": 0,
"right": 0
}
},
"documents": [
{
"id": "1477576d-5dab-4ea9-865c-c0b82cd70bd5",
"displayName": "",
"contentType": "",
"size": 0
}
]
}
Feedback
Submit and view feedback for