- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
WAPI Integration Failure: DHCP Lease Retrieval Comes Back With Blank Results from WAPI
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2020 11:36 PM - edited 08-14-2020 12:18 AM
Hi,
I am trying to obtain a list of DHCP leases from inflobox for which I tried this command from WAPI reference docs, and it comes back empty handed -
$ curl -k1 -u <username>:<password> -X GET 'https://<ip_address>/wapi/v2.9.5/lease?_return_fields%2b=address,starts,ends,tstp,binding_state,hardware,uid&_return_as_object=1' { "result": [] }
And as you can see above it comes back empty ^^
I also tried another request for "networkview" which is in the list of supported objects in the schema seen further below and even that came back blank, as seen below -
$ curl -k1 -u <username>:<password> -X GET 'https://<ip_address>/wapi/v2.9.5/networkview?_return_type=xml-pretty' <?xml version="1.0"?> <list> </list>
I printed out the schema supported by my inflobox version, which I have pasted below.
Does the below list of supported objects, support the retrieval of the dhcp leases? If not, what can I do to get the dhcp leases? Any tweaks/settings changes in inflobox that would allow me to obtain the dhcp leases?
$ curl -k -u <username>:<password> -X GET "https://<ip_address>/wapi/v1.0/?_schema" { "requested_version": "1.0", "supported_objects": [ "ipv4address", "ipv6address", "ipv6network", "ipv6networkcontainer", "ipv6range", "macfilteraddress", "network", "networkcontainer", "networkview", "range", "record:a", "record:aaaa", "record:cname", "record:host", "record:host_ipv4addr", "record:mx", "record:ptr", "record:srv", "record:txt", "search" ], "supported_versions": [ "1.0", "1.1", "1.2", "1.2.1", "1.3", "1.4", "1.4.1", "1.4.2", "1.5", "1.6", "1.6.1", "1.7", "1.7.1", "1.7.2", "1.7.3", "1.7.4", "1.7.5", "2.0", "2.1", "2.1.1", "2.1.2", "2.10", "2.10.1", "2.10.2", "2.10.3", "2.2", "2.2.1", "2.2.2", "2.3", "2.3.1", "2.4", "2.5", "2.6", "2.6.1", "2.7", "2.7.1", "2.7.2", "2.7.3", "2.8", "2.9", "2.9.1", "2.9.5" ] }
Re: WAPI Integration Failure: DHCP Lease Retrieval Comes Back With Blank Results from WAPI
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2020 12:07 AM
Hi,
Could you please check the permissions assigned to the user that you are using to make the WAPI calls below?
Thanks,
Krishna
Re: WAPI Integration Failure: DHCP Lease Retrieval Comes Back With Blank Results from WAPI
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2020 02:43 AM
Thank you for replying back Krishna.
I have requested the administrator to provide me the permissions for the user that I am using to make the WAPI calls.
Also is there a specific permission that I can request him to check for?
Re: WAPI Integration Failure: DHCP Lease Retrieval Comes Back With Blank Results from WAPI
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2020 07:20 AM
Thank you. The permissions was the issue indeed. Fixed it.