---
title: Add Approval Manager For Sapm Group
slug: single-connect-api-3-2-0/add-approval-manager-for-sapm-group
description: Learn how to use curl to make a POST request and add an approval manager for a SAPM group in this document. Follow the code example provided, including the necessary headers for accepting and sending JSON data.
docTags: 
createdAt: 2022-11-10T14:24:52.000Z
---

{
  "id": "zQJ2FV3oTir1p1uyvk0oN",
  "data": {
    "url": "{{url}}/aioc-rest-web/rest/sc/sapm/addApprovalManagerForSapmGroup",
    "method": "POST",
    "request": {
      "pathParameters": [],
      "queryParameters": [],
      "headerParameters": [
        {
          "name": "X-XSRF-TOKEN",
          "type": "string",
          "example": "{{csrftoken}}",
          "description": ""
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "type": "string",
          "example": "{\n    \"dbId\": 3549440,\n    \"newManager\": \"DEFAULT_GROUP_SYSYEM_ADMINS\",\n    \"applyType\": \"FULL_TREE\"\n}",
          "description": ""
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Set Approval Managers For Sapm Group",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "<p>This API allows you to set a list of approval managers of the SAPM group you sent dbId of. If you send an empty array of managers parameter, you will delete manager user group from the list.\r\napplyType can take one of following values: THIS_ONLY, ONE_LEVEL, FULL_TREE</p>",
    "examples": {
      "languages": [
        {
          "id": "Nz6IyO4qyD96wvDEv7s_6",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/sc/sapm/addApprovalManagerForSapmGroup \\\n     --header 'accept: application/json'"
        },
        {
          "id": "Zr707XJWAmx5puZoov2Sj",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/sc/sapm/addApprovalManagerForSapmGroup\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "RD9PdguBz4kAwSHToya2Y",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/sc/sapm/addApprovalManagerForSapmGroup\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "YOSdsTobp48_CjDxeFzZy",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"{{url}}/aioc-rest-web/rest/sc/sapm/addApprovalManagerForSapmGroup\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "Nz6IyO4qyD96wvDEv7s_6"
    },
    "results": {
      "languages": [
        {
          "id": "9knlIG0if7dyblIW8A0jx",
          "language": "200",
          "code": "// Set Approval Managers For Sapm Group\n"
        }
      ],
      "selectedLanguageId": "9knlIG0if7dyblIW8A0jx"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}