The transition to NetApp MS Azure AD B2C is complete. If you missed the pre-registration, you will be invited to register at next log in.
Please note that access to your NetApp data may take up to 1 hour.
To learn more, read the FAQ and watch the video.
Need assistance? Complete this form and select “Registration Issue” as the Feedback Category.

Software Development Kit (SDK) and API Discussions

maxRecords query parameter over 500

CSiegle

Group -

 

OCAPI 1.2

 

I'm trying to retrieve greater than 500 records from the GET volumes REST call.  If I set the maxRecords query parameter to a number greater than 500, I always get 500 records.  However, the query will be adjusted downwards if I place a number less than 500.

 

REST syntax:

https://apiserver:8443/api/1.0/ontap/volumes?maxRecords=10000

 

Is this a bug or am I missing something?

1 ACCEPTED SOLUTION

CSiegle

Great!  nextTag worked well.  Thanks.

View solution in original post

5 REPLIES 5

pukale

This is as per design. at the most, you can fetch 500 records.  this is done considaring many factors. one of them is performance. still, if you wanted to have maxrecords more than 500, please get touch with product management.

 

pukale

If your requirement is get records beyond 500, then please use nextTag. This, you will find end of each response body

 

Example:

https://apiserver:8443/api/1.0/ontap/volumes?NextTag=<nextTagValue>

 

CSiegle

Great!  nextTag worked well.  Thanks.

View solution in original post

RameshN

curl -v -k -u admin:$Pass -L -H "Content-Type: application/json" https://10.64.56.251:8443/api/5.0/ontap/aggregates?maxRecords=3

 

Got the nexttag value like this "nextTag":"PiM+bG9jYWxob3N0OnR5cGU9b2N1bSx1dWlkPWxvY2FsaG9zdH4zLypAbWF4UmVjb3Jkcz0zPCM8"

 

and

 

curl -k -u admin:$Pass -L -H "Content-Type: application/json" https://10.64.56.251:8443/api/5.0/ontap/aggregates?nextTag=PiM+bG9jYWxob3N0OnR5cGU9b2N1bSx1dWlkPWxvY2FsaG9zdH4zLypAbWF4UmVjb3Jkcz0zPCM8
{"status":{"code":"FAILED","error":{"errno":2004,"message":"The specified parameter values are invalid.","reason":" Invalid parameter value for nextTag "}}}

 

Please help

 

we have more than 500 volumes; for the nexttag I am testing with aggregates.

 

 

thanks
Ramesh

ekashpureff

 

CSiegle -

 

Yes, you're missing something.

 

There was a race condition bug with the old 7-mode API calls to get various objects, including volumes.

Hence the max records for the new APIs.

 

BCP is to get 20 records at a time (default) and populate the 'next' tag with the results from the previous call.

 


I hope this response has been helpful to you.

At your service,

Eugene E. Kashpureff, Sr.
Independent NetApp Consultant http://www.linkedin.com/in/eugenekashpureff
Senior NetApp Instructor, Fast Lane US http://www.fastlaneus.com/
(P.S. I appreciate 'kudos' on any helpful posts.)

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public