Devices
A device is the central record of a tracked entity in Kismet. Clients, bridges, access points, wireless sensors, and every other type of entity seen by Kismet will ultimately be a device.
Each PHY layer will add fields to the device record and populate thec ommon fields.
For complex relationships (such as 802.11 Wi-Fi), a list of related devices in the device record describes the access point-client relationship, shared hardware, etc.
All devices will have a basic set of records (held in the kismet.base.foo
group of fields, generally) and sub-trees of records attached by the phy-specific handlers. A device may have multiple phy-specific records, for instance a device may contain both a device.dot11
record and a device.uav
record if it is seen to be a Wi-Fi based UAV/Drone device.
Some care must be taken when requesting large numbers of device records: Kismet may be tracking tens or hundreds of thousands of devices in a single session, and requesting all devices can run both the Kismet server and your UI out of resources.
Whenever possible, use the pagination functions of the device view API and request devices groups.
Since the 2019-06
release, Kismet has migrated most device interactions to the device view api. Any new users of the API should use the device views.
Recently active devices
Returns devices which have been active (traffic observed from the device address) since the supplied timestamp.
Timestamps can be absolute or relative.
This endpoint is most typically used to repeatedly monitor recent devices, but can be replaced with the more efficient push-style device monitoring websocket below for many use cases.
readonly
/devices/last-time/{TIMESTAMP}/devices.json
/devices/last-time/{TIMESTAMP}/devices.ekjson
/devices/last-time/{TIMESTAMP}/devices.prettyjson
GET
POST
PARAMETERS
TIMESTAMP
number
REQUIREDTimestamps can be absolute (UNIX epochal) timestamps, or they can be relative negativ numbers, indiciating "number of seconds before now".
You can read more about timestamp handling and how to use it here.
PARAMETERS
This endpoint takes additional parameters by using a `POST` request and supplying a
JSON document or json
form variable.
You can find more information about API parameters here.
fields
field simplification
OPTIONALKismet can reduce the amount of information being processed and returned by an API by simplifying the fields to only return the data needed by the caller.
You can read more about the field simplification API and how to use it here.
regex
regular expression
OPTIONALWhen compiled with PCRE support, Kismet can apply regular expression filters.
Regular expressions can be applied to multiple fields.
You can read more about the field regex API and how to use it here.
Device by key
Fetch a complete device record (with optional simplification), indexed by the device key.
Typically a UI would use this endpoint to fetch a full device for displaying device details.
readonly
/devices/by-key/{DEVICEKEY}/device.json.json
/devices/by-key/{DEVICEKEY}/device.json.ekjson
/devices/by-key/{DEVICEKEY}/device.json.prettyjson
GET
POST
PARAMETERS
DEVICEKEY
string
REQUIREDKismet unique device key for matching
PARAMETERS
This endpoint takes additional parameters by using a `POST` request and supplying a
JSON document or json
form variable.
You can find more information about API parameters here.
fields
field simplification
OPTIONALKismet can reduce the amount of information being processed and returned by an API by simplifying the fields to only return the data needed by the caller.
You can read more about the field simplification API and how to use it here.
Devices by MAC address
Fetch devices which match the supplied MAC address.
It is possibkle (though usually not likely) that there may be MAC address collisions between different PHY types. This becomes more likely when using either non-Wi-Fi datasources which synthesize completely artificial MAC addresses for indexing when no actual MAC address is available (such as RTL-433, ADSB, and other SDR based datasources), or when capturing two wireless devices from the same physical component, like a combo Wi-Fi/Bluetooth.
This API will always return a list of devices, even when only one device matches the supplied MAC address.
readonly
/devices/by-mac/{MACADDRESS}/devices.json.json
/devices/by-mac/{MACADDRESS}/devices.json.ekjson
/devices/by-mac/{MACADDRESS}/devices.json.prettyjson
GET
POST
PARAMETERS
MACADDRESS
string
REQUIREDMAC address for device matching
PARAMETERS
This endpoint takes additional parameters by using a `POST` request and supplying a
JSON document or json
form variable.
You can find more information about API parameters here.
fields
field simplification
OPTIONALKismet can reduce the amount of information being processed and returned by an API by simplifying the fields to only return the data needed by the caller.
You can read more about the field simplification API and how to use it here.
Multiple devices by MAC addresses
Fetch devices matching any of multiple MAC address (or partial MAC address).
Typically this endpoint would be used to monitor the presence of target devices.
This API always returns a list of devices, even if only one device is matched.
readonly
/devices/multimac/devices.json
/devices/multimac/devices.ekjson
/devices/multimac/devices.prettyjson
POST
PARAMETERS
This endpoint takes additional parameters by using a `POST` request and supplying a
JSON document or json
form variable.
You can find more information about API parameters here.
fields
field simplification
OPTIONALKismet can reduce the amount of information being processed and returned by an API by simplifying the fields to only return the data needed by the caller.
You can read more about the field simplification API and how to use it here.
Multiple devices by key (as list)
Fetch devices matching any of multiple device keys.
Typically this endpoint would be used to monitor the presence of target devices.
This API always returns a list of devices, even if only one device is matched.
readonly
/devices/multikey/devices.json
/devices/multikey/devices.ekjson
/devices/multikey/devices.prettyjson
POST
PARAMETERS
This endpoint takes additional parameters by using a `POST` request and supplying a
JSON document or json
form variable.
You can find more information about API parameters here.
fields
field simplification
OPTIONALKismet can reduce the amount of information being processed and returned by an API by simplifying the fields to only return the data needed by the caller.
You can read more about the field simplification API and how to use it here.
devices
list of strings
REQUIREDA list of device keys to search
Multiple devices by key (as dictionary)
Fetch devices matching any of multiple device keys.
Typically this endpoint would be used to monitor the presence of target devices.
This API returns a JSON dictionary of devices, indexed by device key.
readonly
/devices/multikey/as-object/devices.json
/devices/multikey/as-object/devices.ekjson
/devices/multikey/as-object/devices.prettyjson
POST
PARAMETERS
This endpoint takes additional parameters by using a `POST` request and supplying a
JSON document or json
form variable.
You can find more information about API parameters here.
fields
field simplification
OPTIONALKismet can reduce the amount of information being processed and returned by an API by simplifying the fields to only return the data needed by the caller.
You can read more about the field simplification API and how to use it here.
devices
list of strings
REQUIREDA list of device keys to search
Devices by capture source
A device view endpoint which automatically filters devices by datasource.
Only devices seen by the specified datasource UUID will be returned.
For complete documentation, check the device view api
readonly
/devices/views/seenby-{UUID}/devices.json
/devices/views/seenby-{UUID}/devices.ekjson
/devices/views/seenby-{UUID}/devices.prettyjson
GET
POST
PARAMETERS
UUID
string
REQUIREDData source UUID
Devices by capture source and timestamp
A device view endpoint which automatically filters devices by datasource.
Only devices which have been active since the specified time and seen by the specified datasource UUID will be returned.
For complete documentation, check the device view api
readonly
/devices/views/seenby-{UUID}/last-time/{TIMESTAMP}/devices.json
/devices/views/seenby-{UUID}/last-time/{TIMESTAMP}/devices.ekjson
/devices/views/seenby-{UUID}/last-time/{TIMESTAMP}/devices.prettyjson
GET
POST
PARAMETERS
UUID
string
REQUIREDData source UUID
TIMESTAMP
number
REQUIREDTimestamps can be absolute (UNIX epochal) timestamps, or they can be relative negativ numbers, indiciating "number of seconds before now".
You can read more about timestamp handling and how to use it here.
Devices by capture phy
A device view endpoint which automatically sorts devices by phy layer type.
For complete documentation, check the device view api
readonly
/devices/views/phy/{PHYNAME}/devices.json
/devices/views/phy/{PHYNAME}/devices.ekjson
/devices/views/phy/{PHYNAME}/devices.prettyjson
GET
POST
PARAMETERS
PHYNAME
string
REQUIREDPHY handler name. Information about PHY handlers can be found with the PHY handler endpoints
Devices by capture phy
A device view endpoint which automatically sorts devices by phy layer type.
Devices which have been active since the specified time will be returned.
For complete documentation, check the device view api
readonly
/devices/views/phy/{PHYNAME}/last-time/{TIMESTAMP}/devices.json
/devices/views/phy/{PHYNAME}/last-time/{TIMESTAMP}/devices.ekjson
/devices/views/phy/{PHYNAME}/last-time/{TIMESTAMP}/devices.prettyjson
GET
POST
PARAMETERS
PHYNAME
string
REQUIREDPHY handler name. Information about PHY handlers can be found with the PHY handler endpoints
TIMESTAMP
number
REQUIREDTimestamps can be absolute (UNIX epochal) timestamps, or they can be relative negativ numbers, indiciating "number of seconds before now".
You can read more about timestamp handling and how to use it here.
Editing device tags
Kismet devices contain a collection of arbitrary tag fields which are held in the
kismet.device.base.tags
tree.
These tags can be used to store persistent notes or other data, either user-supplied or auto-generated.
admin
/devices/by-key/{DEVICEKEY}/set_tag.cmd
POST
PARAMETERS
DEVICEKEY
string
REQUIREDKey of target device
PARAMETERS
This endpoint takes additional parameters by using a `POST` request and supplying a
JSON document or json
form variable.
You can find more information about API parameters here.
tagname
string
REQUIREDDevice tag to set
tagvalue
string
REQUIREDTag value to set
Device presence alerts (view)
Kismet can raise alerts when a device (by MAC address) is seen, or has been seen and is no
longer present. These alerts are configured by the kismet_alerts.conf
options devicefound
and devicelost
.
The list of devices being monitored can be viewed and altered realtime using these APIs.
readonly
/devices/alerts/mac/{TYPE}/macs.json
/devices/alerts/mac/{TYPE}/macs.ekjson
/devices/alerts/mac/{TYPE}/macs.prettyjson
GET
PARAMETERS
TYPE
string
REQUIREDAlert type to view, must be one of found
lost
or both
Device presence alerts (changing)
Kismet can raise alerts when a device (by MAC address) is seen, or has been seen and is no
longer present. These alerts are configured by the kisemt_alerts.conf
options devicefound
and devicelost
.
The list of devices being monitored can be viewed and altered realtime using these APIs.
admin
/devices/alerts/mac/{TYPE}/{ACTION}.cmd
POST
PARAMETERS
TYPE
string
REQUIREDAlert type to view, must be one of found
lost
or both
ACTION
string
REQUIREDAction to perform, must be one of add
or remove
PARAMETERS
This endpoint takes additional parameters by using a `POST` request and supplying a
JSON document or json
form variable.
You can find more information about API parameters here.
mac
string
OPTIONALA single MAC to add or remove from the monitored list.
macs
string
OPTIONALA list of MACs to add or remove from the monitored list.
Realtime device monitoring
Devices can be monitored in realtime using the device monitor websocket API, which will push device changes to listeners as they occur.
By subscribing to devices, or groups of devices, a client can receive a push event of the device record.
The device data pushed can also be simplified by the standard field simplification.
readonly
/devices/monitor.ws
WEBSOCKET UPGRADE
PARAMETERS
user
string
OPTIONALLogin user ID; most websocket client APIs do not support basic-auth, cookies, or other header-based login methods.
You must provide either user
and password
GET variables, or an API token or logins ession token via the
KISMET
GET variable.
password
string
OPTIONALPassword associated with the user.
You must provide either user
and password
GET variables, or an API token or logins ession token via the
KISMET
GET variable.
KISMET
string
OPTIONALAn API key or session token key.
You must provide either user
and password
GET variables, or an API token or logins ession token via the
KISMET
GET variable.
The device monitoring subscription API accepts JSON objects with a subscription or removal request for a device or group of devices specified by key, MAC, or group MAC, and optional field simplification.
Subscription API
Multiple subscriptions can be made on a single websocket connection, so long as each subscription request has a unique ID. Use of duplicate IDs will automatically unsubscribe the previous subscription.
monitor
string
REQUIREDDevice identifier specified by key, MAC, or group of MACs with a masking value, as defined in Keys and MACs
The wildcard *
can be used to monitor all devices.
request
number
REQUIREDUnique request ID, supplied by the client. This ID will be used if the client wishes to unsubscribe from events in the future via the cancel API.
rate
number
REQUIREDRate limit, in seconds, to push updates. More frequent device updates are discarded.
fields
field simplification
OPTIONALKismet can reduce the amount of information being processed and returned by an API by simplifying the fields to only return the data needed by the caller.
You can read more about the field simplification API and how to use it here.
Removal API
To cease monitoring a device (or group of devices) without disconnecting the websocket, use the unsubscribe API.
cancel
number
REQUIREDStop monitoring reports from the provided id.
Constructing and connecting a websocket uses the standard Javascript websocket
API, we’ll request all devices with the OUI of AA:BB:CC
, updated at once per second,
fetching the key, last-active time, and last signal level.
var ws = new WebSocket('ws://host:2501/devices/monitor.ws?'
'user=username&password=password');
ws.onmessage = function(msg) {
var json = JSON.parse(msg.data);
console.log(json);
}
ws.onopen = function(event) {
var req = {
"monitor": "AA:BB:CC:00:00:00/FF:FF:FF:00:00:00",
"request": 31337,
"rate": 1,
"fields": [
"kismet.device.base.key",
"kismet.device.base.last_time",
"kismet.device.base.signal/kismet.common.signal.last_signal"
],
}
ws.send(JSON.stringify(req));
}
This would return pushed records like:
{
"kismet.common.signal.last_signal": -77,
"kismet.device.base.last_time": 1605736428,
"kismet.device.base.key": "4202770D00000000_AABBCCDDEEFF"
}
{
"kismet.common.signal.last_signal": -81,
"kismet.device.base.last_time": 1605736427,
"kismet.device.base.key": "4202770D00000000_001122334455"
}
Which would be highly appropriate for monitoring signal levels of a group of devices, for instance.
Legacy device summary
all
view.The device summary API is the base API beneath a scrollable view of devices Kismet is tracking.
It is designed to be connected to a jquery-datatables view, but can be used by any UI mechanism with a concept of a scrolling sub-view.
Whenever possible, a UI is highly encouraged to use a scrolling window mechanism to view the devices: Kismet can track tens or hundreds of thousands of devices, and trying to render them all as a single view will likely over-tax both the Kismet server and whatever is rendering the UI.
When in datatables mode (datatable
set to true
in the JSON argument), this API
takes additional FORM
variables from the jquery-datatables implementation.
readonly
/devices/summary/devices.json
GET
POST
PARAMETERS
start
number
OPTIONALWhen in datatables mode, the start of the windowed view.
length
number
OPTIONALWhen in datatables mode, the length of the windowed view.
draw
number
OPTIONALWhen in datatables mode, the datatable draw sequence number.
search[value]
string
OPTIONALWhen in datatables mode, the search term to be applied to all fields in the summary list.
order[0][column]
string
OPTIONALWhen in datatables mode, the display column number for shorting, indexed by the colmap JSON data parameter.
order[0][dir]
string
OPTIONALWhen in datatables mode, the sort direction sent by jquery-datatables.
PARAMETERS
This endpoint takes additional parameters by using a `POST` request and supplying a
JSON document or json
form variable.
You can find more information about API parameters here.
fields
field simplification
OPTIONALKismet can reduce the amount of information being processed and returned by an API by simplifying the fields to only return the data needed by the caller.
You can read more about the field simplification API and how to use it here.
regex
regular expression
OPTIONALWhen compiled with PCRE support, Kismet can apply regular expression filters.
Regular expressions can be applied to multiple fields.
You can read more about the field regex API and how to use it here.
colmap
list
OPTIONALColumn map information generated by the Kismet UI for mapping jquery-datatable column information for sorting and ordering.
datatable
boolean
OPTIONALWrap output in a container suitable for connecting to a jquery-datatable container in the web UI.
Bulk device list
This endpoint can run smaller systems out of memory and is generally not encouraged.
A much safer method is to use the device view API
all
view, using sort-by first seen and a sliding window.
This is a special ekjson
endpoint which provides a dump of all devices.
This endpoint only supports the ekjson
method, and returns one object per
row, formatted for use with a tool like Elastic Search.
readonly
/devices/all_devices.ekjson
/devices/all_devices.itjson
GET
POST
PARAMETERS
This endpoint takes additional parameters by using a `POST` request and supplying a
JSON document or json
form variable.
You can find more information about API parameters here.
fields
field simplification
OPTIONALKismet can reduce the amount of information being processed and returned by an API by simplifying the fields to only return the data needed by the caller.
You can read more about the field simplification API and how to use it here.
regex
regular expression
OPTIONALWhen compiled with PCRE support, Kismet can apply regular expression filters.
Regular expressions can be applied to multiple fields.
You can read more about the field regex API and how to use it here.