---
title: Get SAPM User Info
slug: kron-pam-api-collection-340/get-sapm-user-info
docTags: 
createdAt: 2024-07-12T13:38:00.279Z
---

{
  "id": "wMTl7y5i3xojQiqGqJNn1",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "{{url}}/aioc-rest-web/rest/sc/sapm/getSapmUserInfo",
    "name": "",
    "description": "This API will return you the SAPM account's user information. You should send dbId of the SAPM account you wish to see. ",
    "contentType": "application/json",
    "request": {
      "headerParameters": [
        {
          "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": "{\n\t\"deviceIp4Search\": \"10.20.40.251\"\n}",
          "value": "{\n\t\"deviceIp4Search\": \"10.20.40.251\"\n}",
          "type": "object"
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "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]"
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "KejbzqS0iHCMyHVB58Oid",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/sc/sapm/getSapmUserInfo \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'x-xsrf-token: {{csrftoken}}' \\\n     --data '\"{\\n\\t\\\"deviceIp4Search\\\": \\\"10.20.40.251\\\"\\n}\"'"
        },
        {
          "id": "HitWM7XhWn-H0zmStAcAH",
          "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(\"{\\n\\t\\\"deviceIp4Search\\\": \\\"10.20.40.251\\\"\\n}\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\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": "tmF2kMpv8Sl7gIAgCkZCD",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\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\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-xsrf-token\"] = \"{{csrftoken}}\"\nrequest.body = JSON.dump(\"{\\n\\t\\\"deviceIp4Search\\\": \\\"10.20.40.251\\\"\\n}\")\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "jmh-j891-ah_kdudW-Hyd",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/aioc-rest-web/rest/sc/sapm/getSapmUserInfo\"\n\npayload = json.dumps(\"{\\n\\t\\\"deviceIp4Search\\\": \\\"10.20.40.251\\\"\\n}\")\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": "KejbzqS0iHCMyHVB58Oid"
    },
    "results": {
      "languages": [
        {
          "id": "XCs4qtiw06LaN8Ozt0TyG",
          "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": "XCs4qtiw06LaN8Ozt0TyG"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}