---
title: Check New Users with SAPM Account
slug: single-connect-api-3-2-0/check-new-users-with-sapm-account
description: Learn how to make a POST request to any desired URL using the curl command with this helpful code example. This document illustrates how to include JSON data with specified headers, and demonstrates sending a JSON object with a "body" property set to a st
docTags: 
createdAt: 2022-11-10T14:24:52.000Z
---

{
  "id": "CjiXKB2Ptz5UdBJb4Ctcn",
  "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": "t18h6BK8NwCdF9lURwZgK",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/sc/sapm/checkNewUsers \\\n     --header 'accept: application/json'"
        },
        {
          "id": "k-JSUgvsX3IYk5UZO9Q_b",
          "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": "jZ_i_BGG9K0PjSw6G1p2Z",
          "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": "NwJvJZ-bvCmsqRtOwUE17",
          "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": "t18h6BK8NwCdF9lURwZgK"
    },
    "results": {
      "languages": [
        {
          "id": "E3mTZFEg4w4F_ayQ0ud-4",
          "language": "200",
          "code": "SUCCESS"
        }
      ],
      "selectedLanguageId": "E3mTZFEg4w4F_ayQ0ud-4"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}