Reply

400 error when trying to get more that 512 IP addresses

New Member
Posts: 1
2164     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

Moderator
Moderator
Posts: 321
2165     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.

 

Showing results for 
Search instead for 
Did you mean: 

Recommended for You