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 the common 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.prettyjsonGET
POSTPARAMETERS
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/devices/by-key/{DEVICEKEY}/device.ekjson/devices/by-key/{DEVICEKEY}/device.prettyjsonGET
POSTPARAMETERS
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/devices/by-mac/{MACADDRESS}/devices.ekjson/devices/by-mac/{MACADDRESS}/devices.prettyjsonGET
POSTPARAMETERS
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.prettyjsonPOSTPARAMETERS
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.prettyjsonPOSTPARAMETERS
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.prettyjsonPOSTPARAMETERS
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.prettyjsonGET
POSTPARAMETERS
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.prettyjsonGET
POSTPARAMETERS
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.prettyjsonGET
POSTPARAMETERS
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.prettyjsonGET
POSTPARAMETERS
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.cmdPOSTPARAMETERS
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.prettyjsonGETPARAMETERS
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}.cmdPOSTPARAMETERS
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.wsWEBSOCKET UPGRADEPARAMETERS
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.
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.itjsonGET
POSTPARAMETERS
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.
Recently modified devices
Returns devices which have been modified since the supplied timestamp.
This is similar to recently active devices, but includes devices which have changed without new traffic being seen, such as a name or tag set through the API. Devices which have seen traffic are also considered modified.
Timestamps can be absolute or relative.
readonly/devices/modified-since/{TIMESTAMP}/devices.json/devices/modified-since/{TIMESTAMP}/devices.ekjson/devices/modified-since/{TIMESTAMP}/devices.prettyjsonGET
POSTPARAMETERS
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.
Set device name
Set a custom name for a device. The name is stored in the kismet.device.base.username
field, and is shown in place of the device name.
Device names are stored in the Kismet devicetracker database in the Kismet configuration directory, and are restored when the device is seen again, including across restarts.
Setting a name updates the device modification time, so it is visible to the recently modified devices endpoint.
admin/devices/by-key/{DEVICEKEY}/set_name.cmdPOSTPARAMETERS
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.
username
string
REQUIREDName to give the device
Delete device tag
Delete a tag from a device, previously set with the editing device tags endpoint. The tag is also removed from the devicetracker database.
Deleting a tag updates the device modification time.
admin/devices/by-key/{DEVICEKEY}/delete_tag.cmdPOSTPARAMETERS
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 delete
PHY list
List the phy (protocol) handlers loaded in Kismet, with the number of devices and packets seen by each.
The phy ID is assigned when Kismet starts, and may change between runs; use the phy name to identify a phy.
readonly/phy/all_phys.json/phy/all_phys.ekjson/phy/all_phys.prettyjsonGET
POSTPARAMETERS
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.
JSON list of phy records:
| Field | Content |
|---|---|
kismet.phy.phy_name | Phy name, such as IEEE802.11 |
kismet.phy.phy_id | Phy ID for this run of Kismet |
kismet.phy.device_count | Number of devices seen |
kismet.phy.packet_count | Number of packets seen |