2.3. Flow sensor creation
Flow sensors can be created issuing a POST request to the following URI:
HTTP Verb: POST
URI: https://hostname/api/v1/sensors/flow
STATUS: DEPRECATED
HTTP Verb: POST
URI: https://hostname/api/v1/sensors/create/flow
This request accepts the following payload parameters:
ip
(Mandatory) IP address of the flow sensor.
name
(Mandatory) Name given to the flow sensor.
parent_uuid
(Optional) Specifies the parent sensor UUID. If none is specified it defaults to root sensor.
snmp_community
(Optional) Specifies the community name for SNMP.
snmp_version
(Optional) Specifies the community version for SNMP. Allowed versions are: 1, 2c.
spanport
(Optional) Enable or disable SPAN Port. Allowed values are: "1" to enable and "0" to disable.
nmsp
(Optional) Enable or disable NMSP. Allowed values are: "1" to enable and "0" to disable.
nmsp_wireless_health
(Optional) Enable or disable NMSP Wireless Health. Allowed values are: "1" to enable and "0" to disable.
nmsp_client_stats
(Optional) Enable or disable NMSP Client Stats. Allowed values are: "1" to enable and "0" to disable.
dns_ptr_client
(Optional) Enable or disable client DNS resolution. Allowed values are: "1" to enable and "0" to disable.
dns_ptr_target
(Optional) Enable or disable target DNS resolution. Allowed values are: "1" to enable and "0" to disable.
homenets
(Optional) Set multiple Home Networks to this sensor. This parameters contains an array with the following format:
{
...
"homenets": [
{ "name" : "NameOfHomenet", "value" : "192.168.1.0/24" },
{ "name" : "NameOfHomenet2", "value" : "192.168.2.0/24" },
...
]
}
router_macs
(Optional) Set Router's MAC addresses of this sensor. This parameters contains an array with the following format:
{
...
"router_macs": [
{ "name" : "Interface1", "value" : "aa:bb:cc:dd:ee:ff" },
{ "name" : "Interface2", "value" : "ff:bb:aa:cc:bb:dd" },
...
]
}
If request was successful HTTP 200 OK status code will be returned alongside a JSON response describing the new flow sensor.
In the following lines you may find an example response to a successful request:
Request:
HTTP Verb: POST
URI: https://hostname/api/v1/sensors/flow?auth_token=xxxxxx
Payload: {"name":"test_flow", "parent_uuid":"7549459708256671519", "ip":"10.0.2.10"}
Response:
{
"query": true,
"sensor": {
"id": 901,
"uuid": "894798882298873783",
"name": "test_flow",
"ip": "10.0.2.10"
}
}