---
title: Check New Users with SAPM Account
slug: single-connect-api-3-0-3/check-new-users-with-sapm-account
description: Learn how to make a POST request using curl with this code example. Discover how to send the request to a specific URL and include headers for accepting and sending JSON data. The example even includes the body of the request for a comprehensive understan
docTags: 
createdAt: 2022-11-10T14:21:49.000Z
---

{
  "id": "CSK_Tdpmtfwo6g3CLBpbL",
  "data": {
    "url": "{{url}}/aioc-rest-web/rest/sc/sapm/checkNewUsers",
    "method": "POST",
    "request": {
      "pathParameters": [],
      "queryParameters": [],
      "headerParameters": [
        {
          "name": "X-XSRF-TOKEN",
          "type": "string",
          "example": "{{csrftoken}}",
          "description": ""
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "type": "string",
          "example": "{\r\n\t\"sapmDbId\":6778\r\n}",
          "description": ""
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Check New Users with SAPM Account",
        "jsonExample": "SUCCESS"
      }
    ],
    "contentType": "application/json",
    "description": "<p>This API will make Single Connect connect to the device of SAPM account(which you send dbId of) and check if there is any new user on that device. You can see new users that are found under \"New Users Log\" on WebUI.</p>",
    "examples": {
      "languages": [
        {
          "id": "vf3WzRoEnQ_jiv0mipAca",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/sc/sapm/checkNewUsers \\\n     --header 'accept: application/json'"
        },
        {
          "id": "UUNAjJck8WOFz0yIsARzi",
          "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/checkNewUsers\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "MHvPRXJAq1L7coxXCAaLq",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/sc/sapm/checkNewUsers\")\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": "8wYxH79dzfV9vtYoO-9nZ",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"{{url}}/aioc-rest-web/rest/sc/sapm/checkNewUsers\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "vf3WzRoEnQ_jiv0mipAca"
    },
    "results": {
      "languages": [
        {
          "id": "dgahwET76nIRjkDbPk9xz",
          "language": "200",
          "code": "SUCCESS"
        }
      ],
      "selectedLanguageId": "dgahwET76nIRjkDbPk9xz"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}