Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
400 error when trying to get more that 512 IP addresses
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2023 06:52 AM
2020     0
When I am trying to run the query
https://10.10.10.10/wapi/v2.9/ipv4address?network=10.10.10.10/8
I get a 400 error. but if I do the same query with a /23 or /24 I receive no error. Is there any function that I can do paging?
Re: 400 error when trying to get more that 512 IP addresses
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2023 05:18 AM
2021     0
Yes, you will want to do paging.
Below is a simple example. To demonstrate I used a page size of 10. For a real search I'd reccommend page size of 1000 or 10000.
curl -k -u admin:infoblox -X GET 'https://gm.example.com/wapi/v2.9/ipv4address?network=10.0.0.0/8&_paging=1&_return_as_object=1&_max_results=10'
returns:
{ "next_page_id": "789c5...", "result": [ { "_ref": "ipv4address/Li5pcHY0X2FkZHJlc3MkMTkyLjE2OC4xMC4wLzA:10.0.0.0", "ip_address": "10.0.0.0", "is_conflict": false, ...
for next page, call:
curl -k -u admin:infoblox -X GET 'https://gm.example.net/wapi/v2.9/ipv4address?network=10.0.0.0/8&_return_as_object=1&_max_results=10&_paging=1&_page_id=789c5...'
this returns another next_page_id, which goes into the next page request. repeat until next_page_id is empty, When the next_page_id is empty, this means all pages have been returned.