---
title: Update Group of Users
slug: kronpam-api-collection-350/update-group-of-users
docTags: 
createdAt: 2024-07-22T09:58:47.220Z
---

{
  "id": "E08RH3aq61qqDJecRa0AX",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "{{url}}/aioc-rest-web/rest/user/updateGroupOfUsers/USERGROUPID",
    "name": "",
    "description": "<h3>Overview</h3>\n<p>This method allows adding registered users into an existing user group. User ids that are tried to be added into the group should be included in the request body. The user group which will be updated should be specified with its id in the request URL.</p>",
    "contentType": "application/json",
    "request": {
      "headerParameters": [
        {
          "name": "Content-Type",
          "description": "",
          "default": "application/json",
          "value": "application/json",
          "type": "string"
        },
        {
          "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": "[\"8728e3c1-fbd9-413f-ac20-4476bbc53848\"]",
          "value": "[\"8728e3c1-fbd9-413f-ac20-4476bbc53848\"]",
          "type": "object"
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Update Group of Users",
        "jsonExample": "true"
      },
      {
        "statusCode": "200",
        "description": "Update Group of Users",
        "jsonExample": "true"
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "oiB3gI7ngUphgmggt-z1l",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/user/updateGroupOfUsers/USERGROUPID \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'x-xsrf-token: {{csrftoken}}' \\\n     --data '\"[\\\"8728e3c1-fbd9-413f-ac20-4476bbc53848\\\"]\"'"
        },
        {
          "id": "HZktRbD-3e8X_c3cDcVfr",
          "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(\"[\\\"8728e3c1-fbd9-413f-ac20-4476bbc53848\\\"]\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/user/updateGroupOfUsers/USERGROUPID\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "uHSr7vlsAi2H5mlwnF04-",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/user/updateGroupOfUsers/USERGROUPID\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-xsrf-token\"] = \"{{csrftoken}}\"\nrequest.body = JSON.dump(\"[\\\"8728e3c1-fbd9-413f-ac20-4476bbc53848\\\"]\")\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "SrnfC95heFkdfjeBKmENU",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/aioc-rest-web/rest/user/updateGroupOfUsers/USERGROUPID\"\n\npayload = json.dumps(\"[\\\"8728e3c1-fbd9-413f-ac20-4476bbc53848\\\"]\")\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-xsrf-token': '{{csrftoken}}'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "oiB3gI7ngUphgmggt-z1l"
    },
    "results": {
      "languages": [
        {
          "id": "DkoK3Grlccf1p8U_T04pk",
          "language": "200",
          "code": "true"
        },
        {
          "id": "GPtIFVHkImOp1kO1u1jzA",
          "language": "200",
          "code": "true"
        }
      ],
      "selectedLanguageId": "DkoK3Grlccf1p8U_T04pk"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}