cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1620
Views
0
Helpful
2
Replies

REST API Huge Dataset

ecsnnsls
Level 1
Level 1

I am trying to download all v6 routes from the fabric along with the nexthop. I used the following URL to retrieve the v6 routes

api/class/uribv6Route.xml?rsp-subtree=full&query-target-filter=wcard(uribv6Route.dn,"<vrfName") 

and I got this

<error code="400" text="Unable to process the query, result dataset is too big"/>

Then, I tried the below URL but I was able to download only 100,000 entries. When I increase the count beyond 100,000 I get the result dataset is too big error.

api/class/uribv6Route.xml?rsp-subtree=full&query-target-filter=wcard(uribv6Route.dn,"<vrfName>")&page=0&page-size=100000

How do I download the entire dataset?

 

[UPDATE]

Something that I noticed,

With the below URL, the totalCount was 154674 but the number of entries was limited to 100,000(I counted the tags) in the response

api/class/uribv6Route.xml?rsp-subtree=full&query-target-filter=wcard(uribv6Route.dn,"<vrfName>")&page=0&page-size=100000

Now, with this URL, the totalCount was still 154674 but the number of entries was 54674 in the response

/api/class/uribv6Route.xml?query-target-filter=wcard(uribv6Route.dn,"<vrfName>")&page=0&page=1&page-size=100000

Finally with this URL, the totalCount was still at 154674 but I received no output

/api/class/uribv6Route.xml?query-target-filter=wcard(uribv6Route.dn,"<vrfName>")&page=0&page=1&page=2&page-size=100000

Does this mean when I set "page0" in the URL the script returns the page0 and when I set "page0&page1" it returns page1 and when I set "page0&page1&page2" it returns page2. Can someone confirm my assumption?

2 Replies 2

Sergiu.Daniluk
VIP Alumni
VIP Alumni

Hi @ecsnnsls 

You can try using "page-size=100000&page=[0-4]" if you wish to retrieve all pages at the same time.

 

Cheers,

Sergiu

Thank you for responding.

I tried using the parameters that you suggested but I still see only 100,000 entries whereas the totalCount is 154674

Save 25% on Day-2 Operations Add-On License