Get Dhcp Lease Info
Get specific leases of a given dhcp server. As a dhcp server could manage millions of leases, the API has to limit the number of the returned leases via two mutually-excluded request parameters, i.e. "pool_id" and "address". Either a "pool_id" or an "address" can be provided, but not both in a same call.
If a "pool_id" is specified, the leases of the specific pool are returned. If an "address" is specified, only the lease(s) represented y this address is(are) returned. The "address" can be a single IP, an ip-range, or a mac address.
Please use Policy API: GET /policy/api/v1/infra/dhcp-server-configs/{config-id}/leases
server-id
can be an ip address, or an ip range, or a mac address
The uuid of dhcp ip pool
Data source type.
OK
{
"_links": [
{
"action": "string",
"href": "string",
"rel": "string"
}
],
"_schema": "string",
"_self": {},
"cursor": "string",
"result_count": 0,
"sort_ascending": false,
"sort_by": "string",
"dhcp_server_id": "string",
"ipv6_leases": [
{
"duid": "string",
"expire_time": "string",
"ia_type": "string",
"iaid": 0,
"ip_addresses": [
"string"
],
"lease_time": "string",
"start_time": "string"
}
],
"leases": [
{
"expire_time": "string",
"ip_address": "string",
"lease_time": "string",
"mac_address": "string",
"start_time": "string",
"subnet": "string"
}
],
"timestamp": 0
}
Not Found
curl -H 'Authorization: <value>' https://{api_host}/api/v1/dhcp/servers/{server-id}/leases