Welcome to the Smartsheet Forum Archives
The posts in this forum are no longer monitored for accuracy and their content may no longer be current. If there's a discussion here that interests you and you'd like to find (or create) a more current version, please Visit the Current Forums.
API Report restricted to first page
We wish to download through url access a report that is 850 rows so expands over 2 pages. When we access it we only get the first page. Is there a way to get all pages?
Below is our curl code (the XXXXX.... is our authorization which we have masked):
curl https://api.smartsheet.com/2.0/reports/1321831786407812?includeAll=true -H "Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXX" -H "Accept: application/vnd.ms-excel" -o P:\Documentation\Engineering\EngineeringPlanningExtract.xlsx
We researched and found the IncludeAll function but could not get it to work. Do we have it in the wrong place?
Comments
-
Hi Gary,
GET report supports paging:
- pageSize: Number of rows per page. Default is 100, it can be at most 500 (i.e. 500 rows per page)
- page: Which page number (starting from 1) to return.
In your situation, please get the report in 2 pages:
https://api.smartsheet.com/2.0/reports/1321831786407812?pageSize=500&page=1
https://api.smartsheet.com/2.0/reports/1321831786407812?pageSize=500&page=2
-
Thanks Jenny. We tried this syntax as you wrote it and got a "page' is not recognized as an internal or external command" error. Any ideas?
Full error:
"errorCode" : 1004,
"message" : "You are not authorized to perform this action.",
"refId" : "o5pnv2zuv3zb"
}'page' is not recognized as an internal or external command, operable program or batch file.
-
Hi Gary,
Looks like the curl command exports the report as a spreadsheet. So the paging option is not applicable.
The pageSize and page parameters are applicable to retrieving a report as a Report object only (not export).
I will look a bit more into this ...
-
Thanks Jenny,
Actually we don't have to have export as xlmx - is it possible to do csv or html?
-
Hi Gary,
I have tried the curl command. I also receive the first page (500 rows) when getting the report as xlsx or csv.
I am going to speak with my team and will post here when I know more.
-
Hi Gary,
I have spoken with my team and we are working on this. At the mean time, please get the report as xlsx / csv via the website (https://app.smartsheet.com/b/home) to retrieve a report with more than 500 rows.
Thanks a lot!
-
Hi Gary,
You should be able to get the report as xlsx/csv with more than the first page using GET reports/{id} now. Please give it a try.
Thanks,
Jenny
-
Thanks Jenny it works now.
Gary
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64K Get Help
- 410 Global Discussions
- 220 Industry Talk
- 459 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 137 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 298 Events
- 37 Webinars
- 7.3K Forum Archives