---
title: Get SAPM User Info
slug: single-connect-api-3-0-3/get-sapm-user-info
description: Learn how to use the curl command to send a POST request to a specific URL in this code example. Included are instructions on how to set headers for accepting and specifying JSON as the content type. The request body, a JSON object, contains a string valu
docTags: 
createdAt: 2022-11-10T14:21:49.000Z
---

{
  "id": "dzqnvpAA7AlYbwv3_Jd_K",
  "data": {
    "url": "{{url}}/aioc-rest-web/rest/sc/sapm/getSapmUserInfo",
    "method": "POST",
    "request": {
      "pathParameters": [],
      "queryParameters": [],
      "headerParameters": [
        {
          "name": "X-XSRF-TOKEN",
          "type": "string",
          "example": "{{csrftoken}}",
          "description": ""
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "type": "string",
          "example": "{\n\t\"deviceIp4Search\": \"10.20.40.251\"\n}",
          "description": ""
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Get SAPM User Info",
        "jsonExample": "[\n    {\n        \"dbId\": 9483,\n        \"configId\": -9077,\n        \"username\": \"test\",\n        \"password\": \"SmGSlOg6vv+AM0cdpJjTcA==\",\n        \"nextChangeTime\": 1599113582798,\n        \"pwdStatus\": \"UNSEEN\",\n        \"eventUserEid\": \"admin\"\n    }\n]"
      }
    ],
    "contentType": "application/json",
    "description": "This API will return you the SAPM account's user information. You should send dbId of the SAPM account you wish to see. ",
    "examples": {
      "languages": [
        {
          "id": "kJhieY9l68Ec5J1DIi9s3",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/sc/sapm/getSapmUserInfo \\\n     --header 'accept: application/json'"
        },
        {
          "id": "CkTw08p9H9UnchMQTbG-2",
          "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/getSapmUserInfo\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "4KAoYKde0vGFdPVKVh1rs",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/sc/sapm/getSapmUserInfo\")\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": "GM-Tv7MBGjPp5PmeMfzxA",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"{{url}}/aioc-rest-web/rest/sc/sapm/getSapmUserInfo\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "kJhieY9l68Ec5J1DIi9s3"
    },
    "results": {
      "languages": [
        {
          "id": "Wdt303o-syMEpp-arMmgO",
          "language": "200",
          "code": "[\n    {\n        \"dbId\": 9483,\n        \"configId\": -9077,\n        \"username\": \"test\",\n        \"password\": \"SmGSlOg6vv+AM0cdpJjTcA==\",\n        \"nextChangeTime\": 1599113582798,\n        \"pwdStatus\": \"UNSEEN\",\n        \"eventUserEid\": \"admin\"\n    }\n]"
        }
      ],
      "selectedLanguageId": "Wdt303o-syMEpp-arMmgO"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}