| title | printJob: abort |
|---|---|
| description | Abort a print job. |
| author | nilakhan |
| ms.localizationpriority | medium |
| ms.subservice | universal-print |
| doc_type | apiPageType |
| ms.date | 04/05/2024 |
Namespace: microsoft.graph
[!INCLUDE beta-disclaimer]
Abort a print job. Only applications using application permissions can abort a print job.
Aborting a print job will only succeed if there is a printTask in a processing state on the associated print job, started by a trigger that the requesting app created. For details about how to register a task trigger, see Extending Universal Print to support pull printing.
[!INCLUDE national-cloud-support]
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.
[!INCLUDE permissions-table]
POST /print/printers/{id}/jobs/{id}/abort| Name | Description |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
In the request body, you can optionally provide the reason why the job is being aborted.
| Property | Type | Description |
|---|---|---|
| reason | String | Reason why job is being aborted. |
If successful, this method returns a 204 No Content response code. It doesn't return anything in the response body.
The following example shows how to call this API.
The following example shows a request.
POST https://graph.microsoft.com/beta/print/printers/{id}/jobs/{id}/abort[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
The following example shows the response.
HTTP/1.1 204 No Content