---
title: Get User Details By Name
slug: single-connect-api-3-0-3/get-user-details-by-name
description: Get a comprehensive code example using cURL for making a GET request to a specific URL, complete with detailed instructions on including specific headers and data. Maximize your understanding of cURL usage with this helpful resource.
docTags: 
createdAt: 2022-11-10T14:21:49.000Z
---

{
  "id": "irZwNqP9D88enx1jUIwNs",
  "data": {
    "url": "{{url}}/aioc-rest-web/rest/user/getUserByName/USERNAME",
    "method": "GET",
    "request": {
      "pathParameters": [],
      "queryParameters": [],
      "headerParameters": [
        {
          "name": "X-XSRF-TOKEN",
          "type": "string",
          "example": "{{csrftoken}}",
          "description": ""
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "type": "string",
          "example": "",
          "description": ""
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Get User Details By Name",
        "jsonExample": "{\n    \"id\": \"25e53f47-ce66-4df2-9abc-6961dc668264\",\n    \"eid\": \"admin\",\n    \"personelId\": null,\n    \"name\": \"Administrator\",\n    \"passwordAlgorithm\": null,\n    \"password\": \"0192023a7bbd73250516f069df18b500\",\n    \"secondPassword\": null,\n    \"email\": null,\n    \"surname\": \"Administrator\",\n    \"internal\": true,\n    \"properties\": {\n        \"ubaThreshold\": \"50\"\n    },\n    \"groups\": [\n        \"DEFAULT_GROUP_SYSYEM_USERS\",\n        \"DEFAULT_GROUP_SYSYEM_ADMINS\"\n    ],\n    \"managerGroups\": [\n        \"DEFAULT_GROUP_SYSYEM_ADMINS\"\n    ],\n    \"lastLogin\": 1590067359763,\n    \"lastLoginIp\": \"10.0.8.30\",\n    \"groupPropertyKey4Search\": null,\n    \"groupPropertyValue4Search\": null,\n    \"recordLimit4Search\": null,\n    \"passwordDirty\": false,\n    \"secondPasswordChange\": false,\n    \"passwordAutoGenerated\": false,\n    \"filterFunctionName\": null,\n    \"filterMembershipUserId\": null,\n    \"filterManagerId\": null,\n    \"filterEidList\": null,\n    \"filterManagerOfUserId\": null,\n    \"externalDirectorySource\": null,\n    \"userPropertyKey4Search\": null,\n    \"userPropertyValue4Search\": null,\n    \"phoneNumber\": null,\n    \"forceChangePasswordOnNextLogin\": false,\n    \"lockReason\": null,\n    \"unlockOnPasswordChanged\": false,\n    \"unlockTime\": null,\n    \"tempUserEndTime\": null,\n    \"tempUserStartTime\": null,\n    \"tempUser\": false,\n    \"locked\": false\n}"
      }
    ],
    "contentType": "application/json",
    "description": "This method lists the user details which is specified with its name in the request URL.",
    "examples": {
      "languages": [
        {
          "id": "tCoDf2LlJDI6c1l98yzK3",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url {{url}}/aioc-rest-web/rest/user/getUserByName/USERNAME \\\n     --header 'accept: application/json'"
        },
        {
          "id": "k7BgW6HTLPylp3BZiFgM6",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/user/getUserByName/USERNAME\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "IfJgq333b0wEZfRbp1qeI",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/user/getUserByName/USERNAME\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "ksziGPZVYxA_ewyN332nH",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"{{url}}/aioc-rest-web/rest/user/getUserByName/USERNAME\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "tCoDf2LlJDI6c1l98yzK3"
    },
    "results": {
      "languages": [
        {
          "id": "UpJ783xDEFAZZGfSpBDSB",
          "language": "200",
          "code": "{\n    \"id\": \"25e53f47-ce66-4df2-9abc-6961dc668264\",\n    \"eid\": \"admin\",\n    \"personelId\": null,\n    \"name\": \"Administrator\",\n    \"passwordAlgorithm\": null,\n    \"password\": \"0192023a7bbd73250516f069df18b500\",\n    \"secondPassword\": null,\n    \"email\": null,\n    \"surname\": \"Administrator\",\n    \"internal\": true,\n    \"properties\": {\n        \"ubaThreshold\": \"50\"\n    },\n    \"groups\": [\n        \"DEFAULT_GROUP_SYSYEM_USERS\",\n        \"DEFAULT_GROUP_SYSYEM_ADMINS\"\n    ],\n    \"managerGroups\": [\n        \"DEFAULT_GROUP_SYSYEM_ADMINS\"\n    ],\n    \"lastLogin\": 1590067359763,\n    \"lastLoginIp\": \"10.0.8.30\",\n    \"groupPropertyKey4Search\": null,\n    \"groupPropertyValue4Search\": null,\n    \"recordLimit4Search\": null,\n    \"passwordDirty\": false,\n    \"secondPasswordChange\": false,\n    \"passwordAutoGenerated\": false,\n    \"filterFunctionName\": null,\n    \"filterMembershipUserId\": null,\n    \"filterManagerId\": null,\n    \"filterEidList\": null,\n    \"filterManagerOfUserId\": null,\n    \"externalDirectorySource\": null,\n    \"userPropertyKey4Search\": null,\n    \"userPropertyValue4Search\": null,\n    \"phoneNumber\": null,\n    \"forceChangePasswordOnNextLogin\": false,\n    \"lockReason\": null,\n    \"unlockOnPasswordChanged\": false,\n    \"unlockTime\": null,\n    \"tempUserEndTime\": null,\n    \"tempUserStartTime\": null,\n    \"tempUser\": false,\n    \"locked\": false\n}"
        }
      ],
      "selectedLanguageId": "UpJ783xDEFAZZGfSpBDSB"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}