---
title: Add Approval Manager For Sapm Group
slug: single-connect-api-3-0-3/add-approval-manager-for-sapm-group
description: Learn how to use the curl command in this document to effortlessly add an approval manager to a specific group through a REST API call. Get expert guidance on implementing the required headers and payload in the code, ensuring seamless integration.
docTags: 
createdAt: 2022-11-10T14:21:49.000Z
---

{
  "id": "ry9dpYtsmxTvgPigwJoa_",
  "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": "bU4mMcp3ewdzz_7WL-IQB",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/sc/sapm/addApprovalManagerForSapmGroup \\\n     --header 'accept: application/json'"
        },
        {
          "id": "-E-ObzS1dQS53iJA4y3R6",
          "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": "C8tz3JnzxLloC5aJq6cgM",
          "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": "cEYU2nUNeAHUGdJJjrak4",
          "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": "bU4mMcp3ewdzz_7WL-IQB"
    },
    "results": {
      "languages": [
        {
          "id": "r7tQLd3T4FqSZdQv7UOVg",
          "language": "200",
          "code": "// Set Approval Managers For Sapm Group\n"
        }
      ],
      "selectedLanguageId": "r7tQLd3T4FqSZdQv7UOVg"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}