---
title: List Permissions of SAPM Account
slug: single-connect-api-3-0-3/list-permissions-of-sapm-account
description: Learn how to use cURL to make a POST request and retrieve a comprehensive list of permissions associated with an account. This document offers a handy code example that demonstrates the process step-by-step, ensuring you can effortlessly fetch the desired
docTags: 
createdAt: 2022-11-10T14:21:49.000Z
---

{
  "id": "rkZIaF5DAU-aC9kktZkX6",
  "data": {
    "url": "{{url}}/aioc-rest-web/rest/sc/sapm/listPermissionsOfAccount",
    "method": "POST",
    "request": {
      "pathParameters": [],
      "queryParameters": [],
      "headerParameters": [
        {
          "name": "X-XSRF-TOKEN",
          "type": "string",
          "example": "{{csrftoken}}",
          "description": ""
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "type": "string",
          "example": "{\n\t\"dbId\":86114\n}",
          "description": ""
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "List Permissions of SAPM Account",
        "jsonExample": " {\r\n            \"5e4a8a4d-2e02-4d31-8728-f6babee09a1a\": \"FULL_CONTROL\",\r\n            \"86cdd3e9-696d-4826-aee2-fb12b47eb49e\": \"READ_ONLY\"\r\n        }"
      }
    ],
    "contentType": "application/json",
    "description": "This API will return list of permission of the SAPM account you send dbId of. ",
    "examples": {
      "languages": [
        {
          "id": "ja5qir6EX4MX-oJIV4oFe",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/sc/sapm/listPermissionsOfAccount \\\n     --header 'accept: application/json'"
        },
        {
          "id": "1bnrh4cmJYXQ7eiI5jYBd",
          "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/listPermissionsOfAccount\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "zwpnJDVCwwuXxjmDRkYl2",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/sc/sapm/listPermissionsOfAccount\")\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": "oMF0Z3qsHyZ2ASJEfW1Gy",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"{{url}}/aioc-rest-web/rest/sc/sapm/listPermissionsOfAccount\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "ja5qir6EX4MX-oJIV4oFe"
    },
    "results": {
      "languages": [
        {
          "id": "pmpGZSBKEHiyZfUaH2Q3s",
          "language": "200",
          "code": " {\r\n            \"5e4a8a4d-2e02-4d31-8728-f6babee09a1a\": \"FULL_CONTROL\",\r\n            \"86cdd3e9-696d-4826-aee2-fb12b47eb49e\": \"READ_ONLY\"\r\n        }"
        }
      ],
      "selectedLanguageId": "pmpGZSBKEHiyZfUaH2Q3s"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}