- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Error in fileop getleasehistoryfiles API
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2021 07:43 AM
Hello,
I'm trying to use the getleasehistoryfiles fileop API in order to get the leases from my infoblox server but after sending the first API call that creates the file i receive an error regarding a download_file_name which i haven't seen used anywhere and it isn't documented anywhere.
My API call:
curl -k1 -u admin:infoblox -X POST \ 'https://<infoblox_server_ip>/wapi/v2.9/fileop?_function=getleasehistoryfiles' \ -H "Content-Type: application/json" \ -d '{"member": "infoblox.localdomain", "start_time": "1514764800", "end_time" :"1533686400"}'
And the error i receive:
{ "Error": "AdmConDataError: None (IBDataError: IB.Data:Missing download name file: /storage/tmp/http_direct_file_io/req_id-DOWNLOAD-0712142357079164/download_file_name)", "code": "Client.Ibap.Data", "text": "Missing download name file: /storage/tmp/http_direct_file_io/req_id-DOWNLOAD-0712142357079164/download_file_name" }
If anyone has any idea whats going on here i would love some help.
Thanks
Re: Error in fileop getleasehistoryfiles API
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2021 12:02 PM
Hi,
I tried the same API call against my environment and I got the expected output:
API: curl --location --request POST 'https://<grid-master>/wapi/v2.9/fileop?_function=getleasehistoryfiles' \ --header 'Content-Type: application/json' \ --header 'Authorization: Basic <auth>' \ --data-raw '{"member": "m1.infoblox.com", "start_time": "1514764800", "end_time" :"1533686400"}' Output: { "token": "eJytUU1vwyAMvfNH2kuTQpuv3Tpl1SZVrdRO2tFKgKSWEmBAqma/flBpu+6yA+jhZ/vZD861mcHK\nnoSLa+W8nbjXlhhKlhxVp9tB3xOtZDx+NtKRuvENnGVHDCMcoJ1w8KgAiEDuidmQpTBbclnIu0E7\ng8dRLojJyJ7mLGcVK0qWFAWjGa2IuywmOwQ6DwVX7417SlNasYTmZUITlsYYCAzDeehwkIA6tfIT\nUKzq08fxcNrVq3VBt7TMqi0r8rLaVKm4cnOQjZOv6MIyc8LdLem/gkwRFVEEVAbBvxqFtMeIImwc\nMF2HmjR2bHqZ+tH893SU/qiBVFwLVH2MsiD7/HaMcPObMGoRbaXR6Xr3voPzyz6+M+L82dA8/gIt\nAtmhHIQDr4Hr0TT2UVWSYzSibQygMpOHm7QOtYpcFbg2+QZaOqdc\n", "url": "https://192.168.1.2/http_direct_file_io/req_id-DOWNLOAD-0714185942768939/dhcpLeaseHistory.csv.gz" }
If it does not give you this response, then i would suggest opening a support ticket.
Regards,
Krishna Vasudevan
Re: Error in fileop getleasehistoryfiles API
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2021 09:56 AM - edited 06-27-2023 01:44 PM
Hello Nir,
I've replicated the exact error you see, by changing the member to save the lease log. What i mean is the member selected at :
Grid DHCP Properties -> Logging -> "Send leases to"
If your script has been working well, did you recently modify this member selection ? Can you try switching this member to see if the call gets through ? In my case I selected the GM & i received the expected result(Though GM isn't recommended as the logging member).
Even if your call gets through after selecting the GM or any other node, I'd still suggest you to ask Technical Support to understand why would the download_file_name go missing if this member is switched(dhcpLeaseHistory.csv.gz is what i'd expect here). Hope this helps
Best regards,