---
title: Delete Permission From Sapm Group
slug: single-connect-api-3-0-3/delete-permission-from-sapm-group
description: Learn how to perform a DELETE request effortlessly using the cURL command with this detailed code example. Get familiar with the required headers and essential data payload to successfully execute the request. Enhance your web development skills with this
docTags: 
createdAt: 2022-11-10T14:21:49.000Z
---

{
  "id": "U2FNqYaRis0nBKTJMkbAt",
  "data": {
    "url": "{{url}}/aioc-rest-web/rest/sc/sapm/deletePermissionFromGroup",
    "method": "DELETE",
    "request": {
      "pathParameters": [],
      "queryParameters": [],
      "headerParameters": [
        {
          "name": "X-XSRF-TOKEN",
          "type": "string",
          "example": "{{csrftoken}}",
          "description": ""
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "type": "string",
          "example": "{\r\n    \"dbId\": 3640966,\r\n    \"permissionToDelete\":[\r\n        {\r\n            \"userGroupId\": \"98b592a0-0ff6-40bc-804b-1c0030a5695e\",\r\n            \"permission\": \"FULL_CONTROL\"\r\n        },\r\n        {\r\n            \"userGroupId\": \"fe9bfde2-9530-4768-868c-6af5d16303a1\",\r\n            \"permission\": \"FULL_CONTROL\"\r\n        }\r\n    ],\r\n    \"applyType\" : \"FULL_TREE\"\r\n}",
          "description": ""
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Delete Permission From Sapm Group",
        "jsonExample": "SUCCESS"
      }
    ],
    "contentType": "application/json",
    "description": "<p>This API allows you to delete SAPM group's permissions of which you sent dbId of. You should send them as user group id : permission type with \"permissionToDelete\". If you send applySub true, it will apply these permissions to sub groups too.</p>",
    "examples": {
      "languages": [
        {
          "id": "xee9Q-6BX3BahVvt1cvKK",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request DELETE \\\n     --url {{url}}/aioc-rest-web/rest/sc/sapm/deletePermissionFromGroup \\\n     --header 'accept: application/json'"
        },
        {
          "id": "4H79sDB4Ig7PcDQWWsG-7",
          "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/sc/sapm/deletePermissionFromGroup\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "_MSprz1Aw3AEq1Nc5vAT9",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/sc/sapm/deletePermissionFromGroup\")\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": "XGbf4ekxlcJUsp2RPPfSS",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"{{url}}/aioc-rest-web/rest/sc/sapm/deletePermissionFromGroup\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json'\n}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "xee9Q-6BX3BahVvt1cvKK"
    },
    "results": {
      "languages": [
        {
          "id": "6k5_3Ok09VaOGhZeL-i7t",
          "language": "200",
          "code": "SUCCESS"
        }
      ],
      "selectedLanguageId": "6k5_3Ok09VaOGhZeL-i7t"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}