Method: enterprises.policies.delete
Stay organized with collections
Save and categorize content based on your preferences.
Deletes a policy. This operation is only permitted if no devices are currently referencing the policy.
HTTP request
DELETE https://androidmanagement.googleapis.com/v1/{name=enterprises/*/policies/*}
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters |
name |
string
The name of the policy in the form enterprises/{enterpriseId}/policies/{policyId} .
|
Request body
The request body must be empty.
Response body
If successful, the response body is an empty JSON object.
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/androidmanagement
For more information, see the OAuth 2.0 Overview.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-09 UTC.
[null,null,["Last updated 2025-01-09 UTC."],[[["\u003cp\u003eDeletes a specified policy if it's not currently in use by any devices.\u003c/p\u003e\n"],["\u003cp\u003eRequires an HTTP DELETE request to a specific URL with enterprise and policy IDs.\u003c/p\u003e\n"],["\u003cp\u003eAn empty request body is necessary, and a successful deletion results in an empty response body.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization necessitates the \u003ccode\u003ehttps://www.googleapis.com/auth/androidmanagement\u003c/code\u003e OAuth scope.\u003c/p\u003e\n"]]],["This document details the process of deleting a policy via an HTTP `DELETE` request. The URL specifies the policy name using the format `enterprises/*/policies/*`. The request requires the `name` path parameter, a string representing the policy's ID. The request body must be empty. A successful deletion returns an empty JSON object, while authorization requires the `https://www.googleapis.com/auth/androidmanagement` OAuth scope. Deletion is only possible if no devices are referencing the policy.\n"],null,["- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nDeletes a policy. This operation is only permitted if no devices are currently referencing the policy.\n\nHTTP request\n\n`DELETE https://androidmanagement.googleapis.com/v1/{name=enterprises/*/policies/*}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\nPath parameters\n\n| Parameters ||\n|--------|-----------------------------------------------------------------------------------------------|\n| `name` | `string` The name of the policy in the form `enterprises/{enterpriseId}/policies/{policyId}`. |\n\nRequest body\n\nThe request body must be empty.\n\nResponse body\n\nIf successful, the response body is an empty JSON object.\n\nAuthorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/androidmanagement`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2)."]]