Datasources

Every source of packet and device data in Kismet is a datasource. Typically a datasource is analogous to a network interace, but may encompass other captures such as SDR, serially attached capture systems, or summarized scan data posted to an endpoint.

Datasoruces are defined on startup in kismet.conf as a source=..., or on the command line with -c {source definition}

Supported datasource types

DESC

Datasource types are defined by the Kismet server code and plugins.

Clients can use this API to determine if Kismet has been started with required plugins or to display all possible datasource types.

ROLES
readonly
URI
/datasource/types.json
/datasource/types.ekjson
/datasource/types.prettyjson
METHODS
GET

Datasource defaults

DESC
Datasource defaults are defined in kismet.conf, and include options likw default hopping behavior, hopping speeds, and other generic settings for all datasources.
ROLES
readonly
URI
/datasource/defaults.json
METHODS
GET
RETURN
JSON object of configured datasource defaults

Datasource list

DESC
Retrive a list of all datasources, current running state, driver and configuration information, packet counts, and historical data.
ROLES
readonly
URI
/datasource/all_sources.json
/datasource/all_sources.ekjson
/datasource/all_sources.prettyjson
METHODS
GET

Datasource details

DESC
Returns full information about a datasource, with statistics and current state.
ROLES
readonly
URI
/datasource/by-uuid/{UUID}/source.json
METHODS
GET
URI
PARAMETERS
UUID string REQUIRED

Source UUID

Adding datasources

DESC

Dynamically add a new datasource at runtime.

New datasources use a complete source definition line, as if they were defined as a source= configuration option.

ROLES
admin
URI
/datasource/add_source.cmd
METHODS
POST
JSON
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.

definition string REQUIRED

RESPONSES
200
Returned when the sources is *added*. A source may be added which *cannot be opened*
ERROR
Returned if the source can not be added, such as when the definition is invalid.
NOTES

This endpoint will block until the source has been added.

Typically this is instantaneous, but may take several seconds on some configurations.

Setting channels

DESC
ROLES
admin
URI
/datasource/by-uuid/{UUID}/set_channel.cmd
METHODS
POST
URI
PARAMETERS
UUID string REQUIRED

Source UUID

JSON
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.

channel string OPTIONAL

Set a single channel and disable channel hopping.

rate number OPTIONAL

Channel hopping speed, as channels per second. To hop slower than one channel per second, use the formula hoprate = 1 / (6 / N) where N is the number of hops per minute.

channels list of strings OPTIONAL

List of channels for hopping

shuffle number OPTIONAL

Enable channel list shuffling

RESPONSES
200
Returned when the channel set command succeeds. When setting multiple channels, individual channels may not succeed.
ERROR
Returned if the channel set command is not successdul, such as an unknown UUID or malformed channel list.
EXAMPLE

To lock a Wi-Fi source to channel 6 with HT40 enabled:

{
  "channel": "6HT40"
}

To set a Wi-Fi source channel hop list, but leave the existing hopping rate:

{
  "channels": ["1", "6", "11", "6HT40"]
}

To set a Wi-Fi source channel hop list and change the hop rate:

{
  "channels": ["1", "6", "11", "6HT40"],
  "hoprate": 5
}
NOTES
This endpoint will block until the source channel configuration is complete.

Control channel hopping

DESC

Enable hopping on the specified source.

Most useful to enable hopping again after locking to a single channel.

ROLES
admin
URI
/datasource/by-uuid/{UUID}/set_hop.cmd
METHODS
POST
URI
PARAMETERS
UUID string REQUIRED

Source UUID

Close a source

DESC

Close a source.

A source will remain closed until re-opened, unless it is a remote capture source. Remote capture sources are re-opened when the remote reconnects.

A closed source is not deleted from the sources list, but will no longer generate packets or consume resources.

ROLES
admin
URI
/datasource/by-uuid/{UUID}/close_source.cmd
METHODS
POST
URI
PARAMETERS
UUID string REQUIRED

Source UUID

Re-open a source

DESC

Re-open a closed source.

Re-opening a source uses the existing source definition.

ROLES
admin
URI
/datasource/by-uuid/{UUID}/open_source.cmd
METHODS
POST
URI
PARAMETERS
UUID string REQUIRED

Source UUID

Pausing a source

DESC

Pause a source.

Paused sources are not clsoed, but packets received from them will be discarded.

ROLES
admin
URI
/datasource/by-uuid/{UUID}/pause_source.cmd
METHODS
POST
URI
PARAMETERS
UUID string REQUIRED

Source UUID

Resuming a source

DESC

Resume a paused source.

Paused sources are not clsoed, but packets received from them will be discarded.

ROLES
admin
URI
/datasource/by-uuid/{UUID}/resume_source.cmd
METHODS
POST
URI
PARAMETERS
UUID string REQUIRED

Source UUID

Interface list

DESC

A datasource is a packet source which provides data. An interface is a physical device that a datasource may capture from, for example wlan0 for a Wi-Fi interface, or a USB address for a RTL-SDR device.

This endpoint causes Kismet to index available interfaces by calling every datasource helper with the probe option.

The Kismet UI uses this endpoint to provide the runtime list of potential capture devices in the Datasources panel.

This endpoint can be stressful for the Kismet server, depending on the type of hardware Kismet is runnig on. It’s recommended that a UI call this less frequently - for instance once every 10 or 20 seconds.

ROLES
admin
URI
/datasource/list_interfaces.json
/datasource/list_interfaces.ekjson
/datasource/list_interfaces.prettyjson
METHODS
GET

Remote capture websocket

DESC

Kismet remote capture tools can connect via a legacy TCP connection, or the more modern websocket implementation.

Contained within the websocket is the standard Kismet remote capture protocol.

This endpoint is designed for use with Kismet remote capture tools, and uses a binary message type.

ROLES
datasource
ADDED
API added 2020-10
URI
/datasource/remote/remotesource.ws
METHODS
WEBSOCKET UPGRADE