---
title: Delete Permission From Sapm Group
slug: single-connect-api-3-2-0/delete-permission-from-sapm-group
description: Learn how to use the curl command to make DELETE requests and delete permissions from a group. This document offers a helpful code example with JSON data headers included. Improve your programming skills now.
docTags: 
createdAt: 2022-11-10T14:24:52.000Z
---

{
  "id": "sv0CGOFazC-FlywSBSDMb",
  "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": "VT5UbSUYw9Scdk7wl4bOM",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request DELETE \\\n     --url {{url}}/aioc-rest-web/rest/sc/sapm/deletePermissionFromGroup \\\n     --header 'accept: application/json'"
        },
        {
          "id": "viBCUiPJChtiDW4CpfqUr",
          "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": "tVZZyqewXIkZPRGcYbsZ3",
          "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": "ekIPBTHmpcz7Hv_HDfA2s",
          "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": "VT5UbSUYw9Scdk7wl4bOM"
    },
    "results": {
      "languages": [
        {
          "id": "pplrlvh991mB3AlpcUYbP",
          "language": "200",
          "code": "SUCCESS"
        }
      ],
      "selectedLanguageId": "pplrlvh991mB3AlpcUYbP"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}