From 6b233d419127f425382351092f8e4c159e4dfd24 Mon Sep 17 00:00:00 2001 From: manikantsinghms <148187409+manikantsinghms@users.noreply.github.com> Date: Tue, 7 Jan 2025 20:31:55 +0000 Subject: [PATCH] adding driveprotectionrule deleteAndUnprotect action api --- .../driveprotectionrule-deleteandunprotect.md | 104 ++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 api-reference/beta/api/driveprotectionrule-deleteandunprotect.md diff --git a/api-reference/beta/api/driveprotectionrule-deleteandunprotect.md b/api-reference/beta/api/driveprotectionrule-deleteandunprotect.md new file mode 100644 index 00000000000..80ddaafc03d --- /dev/null +++ b/api-reference/beta/api/driveprotectionrule-deleteandunprotect.md @@ -0,0 +1,104 @@ +--- +title: "driveProtectionRule: deleteAndUnprotect" +description: "**TODO: Add Description**" +author: "**TODO: Provide GitHub Name. See [topic-level metadata reference](https://aka.ms/msgo?pagePath=Document-APIs/Guidelines/Metadata)**" +ms.date: 01/07/2025 +ms.localizationpriority: medium +ms.subservice: "**TODO: Add MS subservice. See [topic-level metadata reference](https://aka.ms/msgo?pagePath=Document-APIs/Guidelines/Metadata)**" +doc_type: apiPageType +--- + +# driveProtectionRule: deleteAndUnprotect + +Namespace: microsoft.graph + +[!INCLUDE [beta-disclaimer](../../includes/beta-disclaimer.md)] + +**TODO: Add Description** + +## Permissions + +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](/graph/permissions-overview#best-practices-for-using-microsoft-graph-permissions). For details about delegated and application permissions, see [Permission types](/graph/permissions-overview#permission-types). To learn more about these permissions, see the [permissions reference](/graph/permissions-reference). + + +[!INCLUDE [permissions-table](../includes/permissions/driveprotectionrule-deleteandunprotect-permissions.md)] + +## HTTP request + + +``` http +POST /solutions/backupRestore/driveInclusionRules/{driveProtectionRuleId}/deleteAndUnprotect +POST /solutions/backupRestore/oneDriveForBusinessProtectionPolicies/{oneDriveForBusinessProtectionPolicyId}/driveInclusionRules/{driveProtectionRuleId}/deleteAndUnprotect +``` + +## Request headers + +|Name|Description| +|:---|:---| +|Authorization|Bearer {token}. Required. Learn more about [authentication and authorization](/graph/auth/auth-concepts).| + +## Request body + +Don't supply a request body for this method. + +## Response + +If successful, this action returns a `200 OK` response code and a [protectionRuleBase](../resources/protectionrulebase.md) in the response body. + +## Examples + +### Request + +The following example shows a request. + +``` http +POST https://graph.microsoft.com/beta/solutions/backupRestore/driveInclusionRules/{driveProtectionRuleId}/deleteAndUnprotect +``` + + +### Response + +The following example shows the response. +>**Note:** The response object shown here might be shortened for readability. + +``` http +HTTP/1.1 200 OK +Content-Type: application/json + +{ + "value": { + "@odata.type": "#microsoft.graph.protectionRuleBase", + "id": "String (identifier)", + "status": "String", + "createdDateTime": "String (timestamp)", + "createdBy": { + "@odata.type": "microsoft.graph.identitySet" + }, + "lastModifiedDateTime": "String (timestamp)", + "lastModifiedBy": { + "@odata.type": "microsoft.graph.identitySet" + }, + "error": { + "@odata.type": "microsoft.graph.publicError" + }, + "isAutoApplyEnabled": "Boolean" + } +} +``` +