---
title: List Unassigned Devices
slug: single-connect-api-3-0-3/list-unassigned-devices
description: Learn how to make a successful GET request with Curl using specific headers and a URL. This comprehensive document offers a code example for beginners, guiding you through the process step-by-step. Enhance your coding skills and improve your understanding
docTags: 
createdAt: 2022-11-10T14:21:49.000Z
---

{
  "id": "8nBKvGW9P8GfDGZE_7gA1",
  "data": {
    "url": "{{url}}/aioc-rest-web/rest/discovery/getUnassignedDevices",
    "method": "GET",
    "request": {
      "pathParameters": [],
      "queryParameters": [],
      "headerParameters": [
        {
          "name": "Content-Type",
          "type": "string",
          "example": "application/json",
          "description": ""
        },
        {
          "name": "X-XSRF-TOKEN",
          "type": "string",
          "example": "{{csrftoken}}",
          "description": ""
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "getUnassignedDevices",
        "jsonExample": "[\n    {\n        \"dbId\": 138030,\n        \"id\": \"eed25b96-ff1b-4736-8402-6aeee88996f7\",\n        \"name\": \"10.20.40.232\",\n        \"accessProtocol\": \"SSHv2\",\n        \"managementIp\": \"10.20.40.232\",\n        \"elementType\": {\n            \"dbId\": -1256593,\n            \"elementTypeId\": \"linux\",\n            \"elementTypeName\": \"Linux Server\",\n            \"vendor\": null,\n            \"category\": null,\n            \"elementTypeProperties\": [\n                {\n                    \"dbId\": -224107347,\n                    \"elementTypePropertyValue\": \".*?(&gt|\\\\$|#|%)\",\n                    \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.prompt_pattern\",\n                    \"elementTypePropertyType\": null\n                },\n                {\n                    \"dbId\": -224107345,\n                    \"elementTypePropertyValue\": \"abort\",\n                    \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.ctrl_c\",\n                    \"elementTypePropertyType\": null\n                },\n                {\n                    \"dbId\": -316330256,\n                    \"elementTypePropertyValue\": \"-1\",\n                    \"elementTypePropertyKey\": \"shell.terminal.config.fixed_pty_columns\",\n                    \"elementTypePropertyType\": null\n                },\n                {\n                    \"dbId\": -328315408,\n                    \"elementTypePropertyValue\": \"^Quit.*\",\n                    \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.exc_last_line_patterns\",\n                    \"elementTypePropertyType\": null\n                },\n                {\n                    \"dbId\": -328317181,\n                    \"elementTypePropertyValue\": \"^Are you sure.*\",\n                    \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.exc_last_line_patterns\",\n                    \"elementTypePropertyType\": null\n                },\n                {\n                    \"dbId\": -328321729,\n                    \"elementTypePropertyValue\": \"^Enter the date.*\",\n                    \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.exc_last_line_patterns\",\n                    \"elementTypePropertyType\": null\n                },\n                {\n                    \"dbId\": -328318769,\n                    \"elementTypePropertyValue\": \".*(?i)password[:|&gt].*\",\n                    \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.exc_last_line_patterns\",\n                    \"elementTypePropertyType\": null\n                },\n                {\n                    \"dbId\": -224107346,\n                    \"elementTypePropertyValue\": \"do_nothing\",\n                    \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.ctrl_z\",\n                    \"elementTypePropertyType\": null\n                },\n                {\n                    \"dbId\": -355141703,\n                    \"elementTypePropertyValue\": \"^Select choice.*\",\n                    \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.exc_last_line_patterns\",\n                    \"elementTypePropertyType\": null\n                }\n            ]\n        },\n        \"discoveryTime\": 1549517480022,\n        \"properties\": {\n            \"pseudoDevice\": \"true\"\n        },\n        \"deviceGroups\": [],\n        \"availability\": null,\n        \"currentMaintenanceWindow\": null,\n        \"interfaceName\": null,\n        \"nameManagementIp\": \"10.20.40.232-10.20.40.232\",\n        \"regionName\": null,\n        \"pseudoDevice\": true,\n        \"domainController\": null,\n        \"discoverySource\": null,\n        \"portNum\": null\n    }\n]"
      }
    ],
    "contentType": "application/json",
    "description": "This method list unassigned devices in Single Connect.",
    "examples": {
      "languages": [
        {
          "id": "R_W1nVw289iHCwmgZPh9B",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url {{url}}/aioc-rest-web/rest/discovery/getUnassignedDevices \\\n     --header 'accept: application/json'"
        },
        {
          "id": "dNNUq_ZOr0Vqy7Ws3cCEs",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/discovery/getUnassignedDevices\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "ukgMGHEo047U9zDalOc58",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/discovery/getUnassignedDevices\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "lVGzTbgMdn6_G2WpZumfw",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/aioc-rest-web/rest/discovery/getUnassignedDevices\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "R_W1nVw289iHCwmgZPh9B"
    },
    "results": {
      "languages": [
        {
          "id": "c-Kn9246lDTzVObjuCjsn",
          "language": "200",
          "code": "[\n    {\n        \"dbId\": 138030,\n        \"id\": \"eed25b96-ff1b-4736-8402-6aeee88996f7\",\n        \"name\": \"10.20.40.232\",\n        \"accessProtocol\": \"SSHv2\",\n        \"managementIp\": \"10.20.40.232\",\n        \"elementType\": {\n            \"dbId\": -1256593,\n            \"elementTypeId\": \"linux\",\n            \"elementTypeName\": \"Linux Server\",\n            \"vendor\": null,\n            \"category\": null,\n            \"elementTypeProperties\": [\n                {\n                    \"dbId\": -224107347,\n                    \"elementTypePropertyValue\": \".*?(&gt|\\\\$|#|%)\",\n                    \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.prompt_pattern\",\n                    \"elementTypePropertyType\": null\n                },\n                {\n                    \"dbId\": -224107345,\n                    \"elementTypePropertyValue\": \"abort\",\n                    \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.ctrl_c\",\n                    \"elementTypePropertyType\": null\n                },\n                {\n                    \"dbId\": -316330256,\n                    \"elementTypePropertyValue\": \"-1\",\n                    \"elementTypePropertyKey\": \"shell.terminal.config.fixed_pty_columns\",\n                    \"elementTypePropertyType\": null\n                },\n                {\n                    \"dbId\": -328315408,\n                    \"elementTypePropertyValue\": \"^Quit.*\",\n                    \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.exc_last_line_patterns\",\n                    \"elementTypePropertyType\": null\n                },\n                {\n                    \"dbId\": -328317181,\n                    \"elementTypePropertyValue\": \"^Are you sure.*\",\n                    \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.exc_last_line_patterns\",\n                    \"elementTypePropertyType\": null\n                },\n                {\n                    \"dbId\": -328321729,\n                    \"elementTypePropertyValue\": \"^Enter the date.*\",\n                    \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.exc_last_line_patterns\",\n                    \"elementTypePropertyType\": null\n                },\n                {\n                    \"dbId\": -328318769,\n                    \"elementTypePropertyValue\": \".*(?i)password[:|&gt].*\",\n                    \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.exc_last_line_patterns\",\n                    \"elementTypePropertyType\": null\n                },\n                {\n                    \"dbId\": -224107346,\n                    \"elementTypePropertyValue\": \"do_nothing\",\n                    \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.ctrl_z\",\n                    \"elementTypePropertyType\": null\n                },\n                {\n                    \"dbId\": -355141703,\n                    \"elementTypePropertyValue\": \"^Select choice.*\",\n                    \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.exc_last_line_patterns\",\n                    \"elementTypePropertyType\": null\n                }\n            ]\n        },\n        \"discoveryTime\": 1549517480022,\n        \"properties\": {\n            \"pseudoDevice\": \"true\"\n        },\n        \"deviceGroups\": [],\n        \"availability\": null,\n        \"currentMaintenanceWindow\": null,\n        \"interfaceName\": null,\n        \"nameManagementIp\": \"10.20.40.232-10.20.40.232\",\n        \"regionName\": null,\n        \"pseudoDevice\": true,\n        \"domainController\": null,\n        \"discoverySource\": null,\n        \"portNum\": null\n    }\n]"
        }
      ],
      "selectedLanguageId": "c-Kn9246lDTzVObjuCjsn"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}