---
title: Delete Device Group Ip Pattern
slug: single-connect-api-3-0-3/delete-device-group-ip-pattern
description: Learn how to delete a device group IP pattern using the `curl` command with this detailed code example. This document provides all the essential headers and data payload that you need for making the request, ensuring a seamless deletion process.
docTags: 
createdAt: 2022-11-10T14:21:49.000Z
---

{
  "id": "MMTEbZfG58jBfFJDBpxpo",
  "data": {
    "url": "{{url}}/aioc-rest-web/rest/discovery/deleteDeviceGroupIpPattern",
    "method": "DELETE",
    "request": {
      "pathParameters": [],
      "queryParameters": [],
      "headerParameters": [
        {
          "name": "Host",
          "type": "string",
          "example": " localhost",
          "description": ""
        },
        {
          "name": "User-Agent",
          "type": "string",
          "example": " Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0",
          "description": ""
        },
        {
          "name": "Accept",
          "type": "string",
          "example": " application/json, text/plain, */*",
          "description": ""
        },
        {
          "name": "Accept-Language",
          "type": "string",
          "example": " en-US,en;q=0.5",
          "description": ""
        },
        {
          "name": "Accept-Encoding",
          "type": "string",
          "example": " gzip, deflate",
          "description": ""
        },
        {
          "name": "Referer",
          "type": "string",
          "example": " http://localhost",
          "description": ""
        },
        {
          "name": "Content-Type",
          "type": "string",
          "example": "application/json",
          "description": ""
        },
        {
          "name": "Connection",
          "type": "string",
          "example": " keep-alive",
          "description": ""
        },
        {
          "name": "Pragma",
          "type": "string",
          "example": " no-cache",
          "description": ""
        },
        {
          "name": "Cache-Control",
          "type": "string",
          "example": " no-cache",
          "description": ""
        },
        {
          "name": "X-XSRF-TOKEN",
          "type": "string",
          "example": "{{csrftoken}}",
          "description": ""
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "type": "string",
          "example": "{\n        \"dbId\": 118263,\n        \"deviceGroupId\": \"d8a5810e-f17e-43f4-8036-86a10c5e2ba0\",\n        \"interfaceName\": null,\n        \"action\": \"ALLOW\",\n        \"ipPattern\": \"^10\\\\.20\\\\.40\\\\.(1([0-9][0-8])|2([0-4][0-8]|5[0-5]))$\"\n    }",
          "description": ""
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "deleteDeviceGroupIpPattern",
        "jsonExample": "Success"
      }
    ],
    "contentType": "application/json",
    "description": "<p>This method deletes Ip Pattern of the device group.\nMandatory field:\n\"deviceGroupId\"</p>",
    "examples": {
      "languages": [
        {
          "id": "SloqRYIuxgQuEY_kdt1Td",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request DELETE \\\n     --url {{url}}/aioc-rest-web/rest/discovery/deleteDeviceGroupIpPattern \\\n     --header 'accept: application/json'"
        },
        {
          "id": "0XD9Ju0M2c0qVqMvuDOti",
          "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/discovery/deleteDeviceGroupIpPattern\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "ybVltgp1C29YSxmaedaMz",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/discovery/deleteDeviceGroupIpPattern\")\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": "gjis9rCqPJYIbIVrvfX2n",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"{{url}}/aioc-rest-web/rest/discovery/deleteDeviceGroupIpPattern\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json'\n}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "SloqRYIuxgQuEY_kdt1Td"
    },
    "results": {
      "languages": [
        {
          "id": "HHfjTqhKT0Fu2060jKHAy",
          "language": "200",
          "code": "Success"
        }
      ],
      "selectedLanguageId": "HHfjTqhKT0Fu2060jKHAy"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}