---
title: Delete User Groups
slug: kronpam-api-collection-350/delete-user-groups
docTags: 
createdAt: 2024-07-22T09:58:47.219Z
---

{
  "id": "xl7xGgBVlewp1TuJPzYHL",
  "type": "api-oas-v2",
  "data": {
    "method": "DELETE",
    "url": "{{url}}/aioc-rest-web/rest/user/deleteUserGroups",
    "name": "",
    "description": "<h3>Overview</h3>\n<p>You can delete user groups by sending the user group's id.</p>",
    "contentType": "application/json",
    "request": {
      "headerParameters": [
        {
          "name": "X-XSRF-TOKEN",
          "description": "",
          "default": "{{csrftoken}}",
          "value": "{{csrftoken}}",
          "type": "string"
        }
      ],
      "queryParameters": [],
      "pathParameters": [
        {
          "name": "url",
          "description": "",
          "default": "url",
          "value": "url",
          "type": "string"
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "description": "",
          "default": "[\"984e3882-263f-4568-a7e2-642d443b6501\"]",
          "value": "[\"984e3882-263f-4568-a7e2-642d443b6501\"]",
          "type": "object"
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Delete User Groups",
        "jsonExample": "{\n    \"984e3882-263f-4568-a7e2-642d443b6501\": \"Success\"\n}"
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "JVfJB7gAmEPcox4IEy9Hr",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request DELETE \\\n     --url {{url}}/aioc-rest-web/rest/user/deleteUserGroups \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'x-xsrf-token: {{csrftoken}}' \\\n     --data '\"[\\\"984e3882-263f-4568-a7e2-642d443b6501\\\"]\"'"
        },
        {
          "id": "8LcYzjXojym8l8U41uDFh",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-xsrf-token\", \"{{csrftoken}}\");\n\nvar raw = JSON.stringify(\"[\\\"984e3882-263f-4568-a7e2-642d443b6501\\\"]\");\n\nvar requestOptions = {\n   method: 'DELETE',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/user/deleteUserGroups\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "fXt_MHTcZFY17HWtVSB8P",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/user/deleteUserGroups\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-xsrf-token\"] = \"{{csrftoken}}\"\nrequest.body = JSON.dump(\"[\\\"984e3882-263f-4568-a7e2-642d443b6501\\\"]\")\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "SOGRp0vrvVU3Bd8B7dOfI",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/aioc-rest-web/rest/user/deleteUserGroups\"\n\npayload = json.dumps(\"[\\\"984e3882-263f-4568-a7e2-642d443b6501\\\"]\")\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-xsrf-token': '{{csrftoken}}'\n}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "JVfJB7gAmEPcox4IEy9Hr"
    },
    "results": {
      "languages": [
        {
          "id": "iAc0uup0V7ZU6-NzS4fnt",
          "language": "200",
          "code": "{\n    \"984e3882-263f-4568-a7e2-642d443b6501\": \"Success\"\n}"
        }
      ],
      "selectedLanguageId": "iAc0uup0V7ZU6-NzS4fnt"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}