A Go library for interacting with Linksys Smart WiFi-enabled routers using the JNAP protocol described below.
All API requests are POST requests made to http://192.168.1.1/JNAP/. The API endpoint can be changed if 192.168.1.1 does not point to the router. The special domain LinksysSmartWIFI.com points to the router ONLY if the DNS server is still the default. If using any other DNS server, such as Google's 8.8.8.8, it will point to 54.183.80.213.
All requests contain a JSON object as the POST data. Even if the action doesn't require any parameters, the POST data must be {}. All actions below take no parameters unless otherwise documented. The Content-Type header does not matter and is assumed to be application/json.
All responses are JSON objects with two keys: output and response. The response key indicates the status of the action. A value of OK indicates the operation was successful, any other value indicates an error. When an error occurs, another field, error, may be returned.
Every request has an HTTP header, X-JNAP-Action, that describes the action, request, and response parameters. Every action starts with http://linksys.com/jnap/ (alternatively, http://cisco.com/jnap/ could be used, but it seems to be deprecated). The actions described below have the prefix omitted, but are required in the header. For example, if the heading below is core/GetDeviceInfo, the HTTP header X-JNAP-Action in the request will be http://linksys.com/jnap/core/GetDeviceInfo.
Most actions require authorization provided by the X-JNAP-Authorization HTTP header. The header is a basic access authentication with the username admin. An example of the value of X-JNAP-Authorization in pseudocode would be:
"Basic "+base64("admin:"+password)
For example, if the password was password, the header would be Basic YWRtaW46cGFzc3dvcmQ=
This action returns the password hint.
This action returns the restrictions for the admin password.
This action returns information about the router including the model, firmware, and a list of supported actions.
This action returns whether the admin password is the default password.
This action returns every device that has connected to the router (whether it is currently connected or not) with information such as it's local IP address (if currently connected), hostname, MAC addresses, device model (if detected), and operating system (if detected). Surprisingly, this action does not require authorization.
sinceRevisionan integer that, when provided, makes the response only contain devices that have connected since the specified revision.
This action returns the router-assigned GUID of the device performing the request.
This action returns the firewall ALG settings.
This action returns the timestamp of the last time the router checked for an update.
This action returns the time zone of the router.
This action returns information associated with every connected device including its MAC address, Mbps, band (2.4GHz, 5GHz, ...), and signal decibels. Surprisingly, this action does not require authorization.
Same as networkconnections/GetNetworkConnections, but with the radio ID.
This action returns the parental controls settings, such as if it's enabled and rules.
This action returns QoS settings.
This action returns WLAN QoS settings.
This action returns DHCP leases for every connected device.
This action returns ethernet port connections.
This action returns whether express forwarding is enabled.
This action returns IPv6 settings.
Same as router/GetIPv6Settings, but with more information.
This action returns LAN settings.
This action returns the MAC address clone settings.
This action returns routing settings.
This action returns information about the WAN status of the router.
This action returns a bit more information than router/GetWANStatus.
This action returns a bit more information than router/GetWANStatus2.
This action returns a list of activated LEDs on the router.
This action returns DHCP log entries.
firstEntryIndexan integerentryCountan integer
This action returns incoming log entries.
firstEntryIndexan integerentryCountan integer
This action returns log settings.
This action returns outgoing log entries.
firstEntryIndexan integerentryCountan integer
This action returns security log entries.
firstEntryIndexan integerentryCountan integer
This action returns management settings of the router.
Same as routermanagement/GetManagementSettings, but with more information.
This action returns the remote management status of the router.
This action returns UPnP settings.
This action returns a list of external storage devices.
This action returns the hours that wireless access is permitted by parental controls.
This action validates the password provided with the X-JNAP-Authorization.
This action instructs the router to reboot.
This action sets the router admin password, NOT the network password.
adminPassworda string set to the passwordpasswordHinta hint viewable by anyone connected to the network
This action sets properties for a specified device.
deviceIDthe device GUID assigned by the routerpropertiesToModifyan array of objects of properties to modifynamethe property to modify. known values are:urn:cisco-com:ui:qos(QoS)valuethe value to set the property- QoS
userPrioritizedprioritizes the device over other devices
- QoS
This action sets the interval at which to check for updates and whether to automatically check for updates.
autoUpdateWindowan object containing information on when to check for updatesdurationMinutesinterval at which to check for updates in minutesstartMinute
updatePolicya string set toManualorAutomaticallyCheckAndInstall
This action instructs the router to perform a firmware upgrade.
This action returns information about the guest network, such as if it's enabled, its SSID, and password.
This action sets the settings for the guest network.
isGuestNetworkEnableda boolean that is set to true when the guest network will be enabled.maxSimultaneousGuestsan integer that is set to the maximum number of devices that are allowed to be connected to the guest network.radiosan array containing information about the networkbroadcastGuestSSIDa string containing the SSID for the guest networkguestPassworda string containing the guest passwordguestSSIDa string containing the guest SSIDisEnableda boolean that is set to true when the guest network is enabled. only takes effect whenisGuestNetworkEnabledis set to trueradioIDa string containing the radio ID. can be obtained withguestnetwork/GetGuestRadioSettings
This action sets the time zone for the router.
autoAdjustForDSTa boolean set to true when configured to automatically adjust for daylight savings timetimeZoneIDthe id for the time zone
This action sets the parental controls settings.
isParentalControlEnableda boolean that is set to true when parental controls are enabledrulesan array of objects of rulesblockedURLsan array of blocked URLsdescriptiona string with no meaningisEnableda booleanmacAddressesan array of affected MAC addresseswanSchedulean object of days and restricted hourssundaya 48-length string of restricted hours. every character in the string is either a 0 or a 1. 0 means restricted and 1 means allowed. the numbers are in 30-minute intervals. for example, a value of "0101..." would restrict access from 12am-12:30am and 1am-1:30ammondaysame as sundaytuesdaysame as sundaywednesdaysame as sundaythursdaysame as sundayfridaysame as sundaysaturdaysame as sunday
This action enables or disables LEDs on the router.
isSwitchportLEDEnableda boolean
This action enables or disables logging.
isLoggingEnableda boolean
This action returns VLAN tagging profiles.
This action returns VLAN tagging settings.
This action returns information about the main network, such as its SSID and password.
Same as wirelessap/GetRadioInfo, but with more information.
Same as wirelessap/GetRadioInfo2, but with more information.
This action sets the SSID and password for the main networks.
bandSteeringModea string set to the band steering modeisBandSteeringEnableda boolean set to true when band steering is enabledradiosan array of objects describing settings for different frequenciesradioIDthe ID of the frequencysettingsan object containing the settings of the frequencybroadcastSSIDa boolean set to false when the network is hiddenchannelchannelWidthisEnabledmodesecuritya string set to the security protocolssidwpaPersonalSettingsan object containing the passwordpassphrasea string set to the password of the network