Update Devices
1 min
POST
{{url}}/aioc-rest-web/rest/discovery/updateDevices
Header Parameters
- Content-TypestringExample
- X-XSRF-TOKENstringExample
Body Parameters
- bodystringExample
[ { "dbId": 391662, "id": "3b1b99cb-46a9-4f27-83bd-9d7ea14ed3fa", "name": "10.20.40.167", "accessProtocol": "SSHv2", "managementIp": "10.20.40.166", "elementType": { "dbId": -1256593, "elementTypeId": "linux", "elementTypeName": "Linux Server", "vendor": null, "category": null, "elementTypeProperties": [ { "dbId": -316330256, "elementTypePropertyValue": "-1", "elementTypePropertyKey": "shell.terminal.config.fixed_pty_columns", "elementTypePropertyType": null }, { "dbId": -328318769, "elementTypePropertyValue": ".*(?i)password[:|>].*", "elementTypePropertyKey": "enforcer.terminal.behaviour.exc_last_line_patterns", "elementTypePropertyType": null }, { "dbId": -355141703, "elementTypePropertyValue": "^Select choice.*", "elementTypePropertyKey": "enforcer.terminal.behaviour.exc_last_line_patterns", "elementTypePropertyType": null }, { "dbId": -328317181, "elementTypePropertyValue": "^Are you sure.*", "elementTypePropertyKey": "enforcer.terminal.behaviour.exc_last_line_patterns", "elementTypePropertyType": null }, { "dbId": -328315408, "elementTypePropertyValue": "^Quit.*", "elementTypePropertyKey": "enforcer.terminal.behaviour.exc_last_line_patterns", "elementTypePropertyType": null }, { "dbId": -224107345, "elementTypePropertyValue": "abort", "elementTypePropertyKey": "enforcer.terminal.behaviour.ctrl_c", "elementTypePropertyType": null }, { "dbId": -224107347, "elementTypePropertyValue": ".*?(>|\\$|#|%)", "elementTypePropertyKey": "enforcer.terminal.behaviour.prompt_pattern", "elementTypePropertyType": null }, { "dbId": -328321729, "elementTypePropertyValue": "^Enter the date.*", "elementTypePropertyKey": "enforcer.terminal.behaviour.exc_last_line_patterns", "elementTypePropertyType": null }, { "dbId": -224107346, "elementTypePropertyValue": "do_nothing", "elementTypePropertyKey": "enforcer.terminal.behaviour.ctrl_z", "elementTypePropertyType": null } ] }, "discoveryTime": 1542488267577, "properties": { "pseudoDevice": "true" }, "deviceGroups": [ "feba5a25-7f1b-462e-bb45-711a27783cb0" ], "availability": null, "currentMaintenanceWindow": null, "interfaceName": null, "nameManagementIp": "10.20.40.166-10.20.40.166", "regionName": null, "portNum": null, "domainController": null, "pseudoDevice": true, "discoverySource": null }, { "dbId": 2660933, "id": "75507a2b-a11d-4ba1-9973-bc4195a08e86", "name": "10.20.40.248", "accessProtocol": "SSHv2", "managementIp": "10.20.40.248", "elementType": { "dbId": -1256593, "elementTypeId": "linux", "elementTypeName": "Linux Server", "vendor": null, "category": null, "elementTypeProperties": [ { "dbId": -316330256, "elementTypePropertyValue": "-1", "elementTypePropertyKey": "shell.terminal.config.fixed_pty_columns", "elementTypePropertyType": null }, { "dbId": -328318769, "elementTypePropertyValue": ".*(?i)password[:|>].*", "elementTypePropertyKey": "enforcer.terminal.behaviour.exc_last_line_patterns", "elementTypePropertyType": null }, { "dbId": -355141703, "elementTypePropertyValue": "^Select choice.*", "elementTypePropertyKey": "enforcer.terminal.behaviour.exc_last_line_patterns", "elementTypePropertyType": null }, { "dbId": -328317181, "elementTypePropertyValue": "^Are you sure.*", "elementTypePropertyKey": "enforcer.terminal.behaviour.exc_last_line_patterns", "elementTypePropertyType": null }, { "dbId": -328315408, "elementTypePropertyValue": "^Quit.*", "elementTypePropertyKey": "enforcer.terminal.behaviour.exc_last_line_patterns", "elementTypePropertyType": null }, { "dbId": -224107345, "elementTypePropertyValue": "abort", "elementTypePropertyKey": "enforcer.terminal.behaviour.ctrl_c", "elementTypePropertyType": null }, { "dbId": -224107347, "elementTypePropertyValue": ".*?(>|\\$|#|%)", "elementTypePropertyKey": "enforcer.terminal.behaviour.prompt_pattern", "elementTypePropertyType": null }, { "dbId": -328321729, "elementTypePropertyValue": "^Enter the date.*", "elementTypePropertyKey": "enforcer.terminal.behaviour.exc_last_line_patterns", "elementTypePropertyType": null }, { "dbId": -224107346, "elementTypePropertyValue": "do_nothing", "elementTypePropertyKey": "enforcer.terminal.behaviour.ctrl_z", "elementTypePropertyType": null } ] }, "discoveryTime": 1550042482516, "properties": { "pseudoDevice": "true" }, "deviceGroups": [ "feba5a25-7f1b-462e-bb45-711a27783cb0" ], "availability": null, "currentMaintenanceWindow": null, "interfaceName": null, "nameManagementIp": "10.20.40.248-10.20.40.248", "regionName": null, "portNum": null, "domainController": null, "pseudoDevice": true, "discoverySource": null } ]
Responses
200
curl
curl --request POST \
--url {{url}}/aioc-rest-web/rest/discovery/updateDevices \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
var requestOptions = {
method: 'POST',
headers: myHeaders,
redirect: 'follow'
};
fetch("{{url}}/aioc-rest-web/rest/discovery/updateDevices", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "net/http"
url = URI("{{url}}/aioc-rest-web/rest/discovery/updateDevices")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
response = http.request(request)
puts response.read_body
python
import requests
url = "{{url}}/aioc-rest-web/rest/discovery/updateDevices"
payload = {}
headers = {
'accept': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
{
"10.20.40.166": "Success",
"10.20.40.248": "Success"
}