---
title: Logged on User List
slug: kronpam-api-collection-350/logged-on-user-list
docTags: 
createdAt: 2024-07-22T09:58:47.220Z
---

{
  "id": "-gLkmnCv3Cwv9e-20b8k8",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "{{url}}/aioc-rest-web/rest/user/getActiveSessionsOfUsers",
    "name": "",
    "description": "<h3>Overview</h3>\n<p>This method returns user information of the users who are logged on.</p>",
    "contentType": "application/json",
    "request": {
      "headerParameters": [
        {
          "name": "Content-Type",
          "description": "",
          "default": "application/json",
          "value": "application/json",
          "type": "string"
        },
        {
          "name": "X-XSRF-TOKEN",
          "description": "",
          "default": "{{csrftoken}}",
          "value": "{{csrftoken}}",
          "type": "string"
        }
      ],
      "queryParameters": [],
      "pathParameters": [
        {
          "name": "url",
          "description": "",
          "default": "url",
          "value": "url",
          "type": "string"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Logged on User List",
        "jsonExample": "[\n    {\n        \"sessionId\": \"01b54866-42ff-456d-ab0f-a8672a96d24c\",\n        \"userId\": \"cdc00366-56b6-4874-bd8b-7862549510ab\",\n        \"sessionTime\": 1548401553405,\n        \"lastActivityTime\": 1548401559298,\n        \"properties\": {\n            \"password\": \"6Qdv8VzoWPONvvptBFCtkg==\",\n            \"auth\": \"testuser\",\n            \"ifSystemLiUser\": \"NotLiUser\",\n            \"clientIp\": \"10.20.50.237\"\n        },\n        \"userEid\": \"testuser\"\n    },\n    {\n        \"sessionId\": \"e59a7839-1a62-4d71-a44e-8c32e66ebd8b\",\n        \"userId\": \"25e53f47-ce66-4df2-9abc-6961dc668264\",\n        \"sessionTime\": 1548398210113,\n        \"lastActivityTime\": 1548399449997,\n        \"properties\": {\n            \"password\": \"RsMm2xUhX+gP/F9JYCrPOQ==\",\n            \"auth\": \"admin\",\n            \"ifSystemLiUser\": \"NotLiUser\",\n            \"clientIp\": \"10.20.50.237\"\n        },\n        \"userEid\": \"admin\"\n    },\n    {\n        \"sessionId\": \"168ef2ab-51d3-446c-b9d7-392beb0444f7\",\n        \"userId\": \"25e53f47-ce66-4df2-9abc-6961dc668264\",\n        \"sessionTime\": 1548399607102,\n        \"lastActivityTime\": 1548401566397,\n        \"properties\": {\n            \"password\": \"RsMm2xUhX+gP/F9JYCrPOQ==\",\n            \"auth\": \"admin\",\n            \"ifSystemLiUser\": \"NotLiUser\",\n            \"clientIp\": \"10.20.50.237\"\n        },\n        \"userEid\": \"admin\"\n    }\n]"
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "1SuFqsx6URS6HMGonTBHm",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url {{url}}/aioc-rest-web/rest/user/getActiveSessionsOfUsers \\\n     --header 'accept: application/json' \\\n     --header 'x-xsrf-token: {{csrftoken}}'"
        },
        {
          "id": "T1wFa3mBpj1rnfeY2x-pe",
          "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 requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/user/getActiveSessionsOfUsers\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "kBNI3v9K-n2yUFSoofxHc",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/user/getActiveSessionsOfUsers\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-xsrf-token\"] = \"{{csrftoken}}\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "qh_4D23L5dBZ1lJRe_pUR",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/aioc-rest-web/rest/user/getActiveSessionsOfUsers\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-xsrf-token': '{{csrftoken}}'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "1SuFqsx6URS6HMGonTBHm"
    },
    "results": {
      "languages": [
        {
          "id": "X9nEXd_L0Ef7XBNoqDITg",
          "language": "200",
          "code": "[\n    {\n        \"sessionId\": \"01b54866-42ff-456d-ab0f-a8672a96d24c\",\n        \"userId\": \"cdc00366-56b6-4874-bd8b-7862549510ab\",\n        \"sessionTime\": 1548401553405,\n        \"lastActivityTime\": 1548401559298,\n        \"properties\": {\n            \"password\": \"6Qdv8VzoWPONvvptBFCtkg==\",\n            \"auth\": \"testuser\",\n            \"ifSystemLiUser\": \"NotLiUser\",\n            \"clientIp\": \"10.20.50.237\"\n        },\n        \"userEid\": \"testuser\"\n    },\n    {\n        \"sessionId\": \"e59a7839-1a62-4d71-a44e-8c32e66ebd8b\",\n        \"userId\": \"25e53f47-ce66-4df2-9abc-6961dc668264\",\n        \"sessionTime\": 1548398210113,\n        \"lastActivityTime\": 1548399449997,\n        \"properties\": {\n            \"password\": \"RsMm2xUhX+gP/F9JYCrPOQ==\",\n            \"auth\": \"admin\",\n            \"ifSystemLiUser\": \"NotLiUser\",\n            \"clientIp\": \"10.20.50.237\"\n        },\n        \"userEid\": \"admin\"\n    },\n    {\n        \"sessionId\": \"168ef2ab-51d3-446c-b9d7-392beb0444f7\",\n        \"userId\": \"25e53f47-ce66-4df2-9abc-6961dc668264\",\n        \"sessionTime\": 1548399607102,\n        \"lastActivityTime\": 1548401566397,\n        \"properties\": {\n            \"password\": \"RsMm2xUhX+gP/F9JYCrPOQ==\",\n            \"auth\": \"admin\",\n            \"ifSystemLiUser\": \"NotLiUser\",\n            \"clientIp\": \"10.20.50.237\"\n        },\n        \"userEid\": \"admin\"\n    }\n]"
        }
      ],
      "selectedLanguageId": "X9nEXd_L0Ef7XBNoqDITg"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}