What is the correct syntax for includeAll=true when pulling a report from the API?
Hi,
I am using an API token to import smartsheet report data into Power Query in MS Excel.
If I pass no information about pageSize or includeAll I get 100 rows returned.
If I use the following:
= Json.Document(Web.Contents("https://api.smartsheet.com/2.0/reports/8695992879998852/?pageSize=10013", [Headers=[Authorization="Bearer MY-API-KEY-GOES-HERE"]]))
then 10,000 rows are returned, despite the report being 10013 rows right now. So it seems there is a limit on pageSize.
If I use the following:
= Json.Document(Web.Contents("https://api.smartsheet.com/2.0/reports/8695992879998852/?includeAll=true", [Headers=[Authorization="Bearer MY-API-KEY-GOES-HERE"]]))
then I get 100 rows.
How can I retrieve all rows in my report via the API via Power Query please?
Best Answer
-
Hi @CycleBagEd
The default Page Size (if not specified) is 100, and the maximum rows that a Get Report call can retrieve is 10,000 rows at a time, as you've found.
Here's the information in our previous documentation that specifies this: https://smartsheet-platform.github.io/api-docs/#get-report
I will let the API documentation team know that this isn't clearly outlined in our new, updated version.
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
Answers
-
Hi @CycleBagEd
The default Page Size (if not specified) is 100, and the maximum rows that a Get Report call can retrieve is 10,000 rows at a time, as you've found.
Here's the information in our previous documentation that specifies this: https://smartsheet-platform.github.io/api-docs/#get-report
I will let the API documentation team know that this isn't clearly outlined in our new, updated version.
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
Thanks @Genevieve P. - it's interesting that I can retrieve over 10,000 rows via ODBC but the API has a 10,000 record limit - This will lead me to implement workarounds - it would be good if that could be removed.
Thanks very much for getting back to me on this. I am not a programmer, and couldn't find the correct way to append the options onto the report ID number in Power Query and had to source these from the general online community.
cheers
Ed
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives