The GET method is used to retrieve information about an OT-BASE Asset Discovery node's configuration.
Retrieve full configuration data
A GET on the URL root element will deliver the full configuration.
Example query:
GET https://192.168.0.1/
Response:
{
"nodeName": "Node Name",
"version": "7.00",
"locationId": "LocationId",
"export":{
"active": true,
"schedule": "00:00",
"type": "http",
"host": "192.168.0.1:8080",
"path": "agent-sink/agentsink.php",
"lastExport": "2021-01-28 10:00:00",
"lastResult": "Successfully queued file"
},
"networks":{
"AB233237-986B-4A6E-99AC-9B5D21AF4817": {
"deviceCount": 42,
"type": "TCP/IP",
"mask": "255.255.255.0",
"networkAddress": "192.168.0.0",
"locationId": "LocationId",
"name": "Office",
"interface": "Hyper-V Virtual Ethernet Adapter",
"active": true,
"export": true,
"probes":{
"arp":{
"enabled": true,
"rate": 10
},
"icmp":{
"enabled": false,
"rate": 10
},
"snmp":{
"enabled": true,
"method": "global"
},
"wmi":{
"enabled": true,
"method": "global"
},
"ssh":{
"enabled": true,
"timeout": 30,
"method": "global"
},
"profinet":{
"enabled": true,
"timeout": 30
},
"s7":{
"enabled": true
},
"modbus":{
"enabled": true
},
"eip":{
"enabled": true,
"rate": 10,
"timeout": 30
}
}
}
}
}
Retrieving partial configuration data
You can specify hierarchical endpoints in the URL to refer to partial configuration data. Each of the field names in the example can be used as an endpoint specification.
For example, to retrieve only the export configuration for a node, you can use the following query:
GET https://192.168.0.1/export
Response:
{
"active": true,
"schedule": "00:00",
"type": "http",
"host": "192.168.0.1:8080",
"path": "agent-sink/agentsink.php",
"lastExport": "2021-01-28 10:00:00",
"lastResult": "Successfully queued file"
}
Individual networks can be addressed by the unique id that you can retrieve with the root query and then select the network you are interested in by matching the IP address, type, location etc. In the example above, the network GUID "AB233237-986B-4A6E-99AC-9B5D21AF4817" can be used as an endpoint to pull the configuration for this network. You can also further narrow down your query by referring to a specific sub-section of the network configuration by supplementing the network GUID as in this example:
GET https://192.168.0.1/networks/AB233237-986B-4A6E-99AC-9B5D21AF4817/probes/eip/enabled
This will only report if EtherNet/IP probing for the network "AB233237-986B-4A6E-99AC-9B5D21AF4817" is enabled, so the answer would be:
true
Comments
0 comments
Please sign in to leave a comment.