Skip to content

Latest commit

 

History

History
121 lines (95 loc) · 2.45 KB

Data - DHCP Leases.adoc

File metadata and controls

121 lines (95 loc) · 2.45 KB

Data - DHCP Leases

A HTTP GET to /api/edge/data.json?data=dhcp_leases can be used to get a JSON formatted list of DHCP leases.

Response

Root

Name Type Values Description

success

String

A boolean encapsulated in a string (e.g. "0" or "1")

Whether the API request was successful.

output

Object

output object

The output to the data request.

output Object

Name Type Values Description

dhcp-server-leases

Dictionary

dhcp-server-leases object(s)

A dictionary that contains each of the DHCP servers and their leases.

dhcp-server-leases Object

Name Type Values Description

Key

String

The unique name of a particular DHCP server (e.g. LAN1)

A property that represents the unique DHCP server name.

Value

Object or empty string

leases object

An object that represents a particular DHCP server’s leases.

leases Object

Name Type Values Description

Key

String

The IP address of a specific lease (e.g. 192.168.0.180)

A property that represents a specific DHCP lease.

Value

Object or empty string

lease-details object

An object that represents a particular DHCP server lease.

lease-details Object

Name Type Values Description

expiration

String

A date in YYYY/MM/DD HH:mm:ss format

The date of a specific lease expiry.

pool

String

DHCP pool name (e.g. LAN1)

The pool this lease corresponds to (appears to be a repetition of the DHCP server name).

mac

String

MAC Address (e.g. FF:FF:FF:FF:FF:01)

The MAC address of this particular DHCP server lease.

client-hostname

String

Client supplied hostname

The client supplied hostname for a DHCP server lease.

Examples

Successful Response

GET /api/edge/data.json?data=dhcp_leases Response
{"success": "1", "output": {"dhcp-server-leases": {"LAN2": "", "LAN1": {"192.168.0.180": {"expiration": "2020/06/08 13:07:17", "pool": "LAN1", "mac": "xx:xx:xx:xx:xx:xx", "client-hostname": "Versa"}, "192.168.0.165": {"expiration": "2020/06/08 08:42:42", "pool": "LAN1", "mac": "xx:xx:xx:xx:xx:xx", "client-hostname": ""}, "192.168.0.104": {"expiration": "2020/06/07 16:19:20", "pool": "LAN1", "mac": "xx:xx:xx:xx:xx:xx", "client-hostname": "andys-6s"}}}}}