Get printJob
Namespace: microsoft.graph
Retrieve the properties and relationships of a print job.
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.
Permission type | Permissions (from least to most privileged) |
---|---|
Delegated (work or school account) | PrintJob.ReadBasic, PrintJob.Read, PrintJob.ReadBasic.All, PrintJob.Read.All, PrintJob.ReadWriteBasic, PrintJob.ReadWrite, PrintJob.ReadWriteBasic.All, PrintJob.ReadWrite.All |
Delegated (personal Microsoft account) | Not supported. |
Application | PrintJob.ReadBasic.All, PrintJob.Read.All, PrintJob.ReadWriteBasic.All, PrintJob.ReadWrite.All  |
For an app with delegated permissions to retrieve other users' jobs, the signed-in user must be a member of one of the following administrator roles:
- Global Administrator
- Printer Administrator
For an app with application permissions to retrieve users' jobs, the app needs a permission that grants Get printer access along with one of the application permissions described in the Permissions table.
HTTP request
To get a job from a printer:
GET /print/printers/{id}/jobs/{id}
To get a job from a printer share:
GET /print/shares/{id}/jobs/{id}
Optional query parameters
This method supports some of the OData query parameters to help customize the response. For general information, see OData query parameters.
Request headers
Name | Description |
---|---|
Authorization | Bearer {token}. Required. |
Request body
Do not supply a request body for this method.
Response
If successful, this method returns a 200 OK
response code and a printJob object in the response body.
Examples
Example 1: Get print job
Request
The following is an example of a request to get metadata for a print job.
GET https://graph.microsoft.com/v1.0/print/printers/{printerId}/jobs/{printJobId}
Response
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#print/printers('c05f3726-0d4b-4aa1-8fe9-2eb981bb26fb')/jobs/$entity",
"id": "5182",
"createdDateTime": "2020-02-04T00:00:00.0000000Z",
"createdBy": {
},
"configuration": {
},
"status": {
"state": "completed",
"description": "The print job has completed successfully and no further processing will take place.",
"details": [
],
"isAcquiredByPrinter": true
},
"redirectedTo": null,
"redirectedFrom": null,
"isFetchable": false
}
Example 2: Get print job with task list
Request
The following is a request to get a print job and any tasks that are executing, or have executed, against it.
GET https://graph.microsoft.com/v1.0/print/printers/{printerId}/jobs/{printJobId}?$expand=tasks
Response
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#print/printers('c05f3726-0d4b-4aa1-8fe9-2eb981bb26fb')/jobs/$entity",
"id": "5182",
"createdDateTime": "2020-02-04T00:00:00.0000000Z",
"createdBy": {
},
"configuration": {
},
"status": {
"state": "completed",
"description": "The print job has completed successfully and no further processing will take place.",
"details": [
],
"isAcquiredByPrinter": true
},
"redirectedTo": null,
"redirectedFrom": null,
"isFetchable": false,
"tasks": [
{
"id": "d036638b-1272-4bba-9227-732463823ed3",
"parentUrl": "https://graph.microsoft.com/v1.0/print/printers/c05f3726-0d4b-4aa1-8fe9-2eb981bb26fb/jobs/5182",
"status": {
"state": "processing",
"description": "The task is being processed."
}
}
]
}
Example 3: Get a print job and its associated document data
Request
The following is an example of a request to get a print job and its associated document data.
GET https://graph.microsoft.com/v1.0/print/printers/{printerId}/jobs/{printJobId}?$expand=documents
Response
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#print/printers('c05f3726-0d4b-4aa1-8fe9-2eb981bb26fb')/jobs/$entity",
"id": "5182",
"createdDateTime": "2020-02-04T00:00:00.0000000Z",
"createdBy": {
},
"configuration": {
},
"status": {
"state": "completed",
"description": "The print job has completed successfully and no further processing will take place.",
"details": [
],
"isAcquiredByPrinter": true
},
"redirectedTo": null,
"redirectedFrom": null,
"isFetchable": false,
"documents": [
{
"id": "ca96c367-c3ad-478a-bbce-fbd1cd856e73",
"displayName": "",
"contentType": "application/oxps",
"size": 276604
}
]
}
Feedback
Submit and view feedback for