NSX-T Data Center REST API

Get specific leases of a given dhcp server (Deprecated)

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.

Request:

Method:
GET
URI Path(s):
/api/v1/dhcp/servers/<server-id>/leases
Request Headers:
n/a
Query Parameters:
DhcpLeaseRequestParameters+
Request Body:
n/a

Example Request:

GET https://<nsx-mgr>/api/v1/dhcp/servers/9f34f749-08d9-4744-b1e9-9f079f9ce726/leases?address=184.168.1.3

Successful Response:

Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
DhcpLeases+

Example Response:

{ "leases" : [ { "subnet" : "184.168.1.0", "start_time" : "2017-06-26 18:34:34 +0000", "mac_address" : "00:50:56:ae:6b:01", "lease_time" : "3600", "expire_time" : "2017-06-26 19:34:35 +0000", "ip_address" : "184.168.1.3" } ], "dhcp_server_id" : "9f34f749-08d9-4744-b1e9-9f079f9ce726", "timestamp" : 1498503052577 }

Required Permissions:

read

Feature:

dhcp_servers

Additional Errors: