---
title: Delete Policy Group
slug: single-connect-api-3-0-3/delete-policy-group
description: Learn how to delete a policy group using cURL with this comprehensive code example. The guide includes the required headers and data payload to be included in your API request, ensuring seamless execution. Enhance your programming skills and effectively m
docTags: 
createdAt: 2022-11-10T14:21:49.000Z
---

{
  "id": "NtvPCM37FQW0zURsvKz7O",
  "data": {
    "url": "{{url}}/aioc-rest-web/rest/policy/deletePolicyGroup",
    "method": "DELETE",
    "request": {
      "pathParameters": [],
      "queryParameters": [],
      "headerParameters": [
        {
          "name": "Content-Type",
          "type": "string",
          "example": "application/json",
          "description": ""
        },
        {
          "name": "X-XSRF-TOKEN",
          "type": "string",
          "example": "{{csrftoken}}",
          "description": ""
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "type": "string",
          "example": "{\r\n        \"dbId\": 406596\r\n}",
          "description": ""
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Delete Policy Group",
        "jsonExample": "Success"
      }
    ],
    "contentType": "application/json",
    "description": "This method deletes the related policy group whose dbId is sent in request body.",
    "examples": {
      "languages": [
        {
          "id": "RsNZKspqkiG6phCqyv3bS",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request DELETE \\\n     --url {{url}}/aioc-rest-web/rest/policy/deletePolicyGroup \\\n     --header 'accept: application/json'"
        },
        {
          "id": "jRUTpXf3emcq3VGNlvfSW",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\n\nvar requestOptions = {\n   method: 'DELETE',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/policy/deletePolicyGroup\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "u5zYNHcYi7CBveo1u2YDZ",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/policy/deletePolicyGroup\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"accept\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "7zovIX4NxJ0QTbHFELYrD",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"{{url}}/aioc-rest-web/rest/policy/deletePolicyGroup\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json'\n}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "RsNZKspqkiG6phCqyv3bS"
    },
    "results": {
      "languages": [
        {
          "id": "agT8LG_sMhu7NdRxGYNYd",
          "language": "200",
          "code": "Success"
        }
      ],
      "selectedLanguageId": "agT8LG_sMhu7NdRxGYNYd"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}