Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Get Report Function Not Allowing all data to be returned in a Single Page #184

Open
matthew1davis opened this issue Sep 22, 2022 · 0 comments

Comments

@matthew1davis
Copy link

According the Smartsheet API documentation, the Get Report endpoint should allow all rows of a Summary Report to be returned when you do not enter the pageSize or page query parameters in the API call:

If neither pageSize nor page is specified, returns all rows in the sheet.

However, when I use the get_report function in practice, the page_size argument must be still defaulting to 100, because I only get the first 100 rows of my Summary Report returned.

import smartsheet

report_name = "My Summary Report Example"

# Get Report Id using name
action = smartsheet_client.Reports.list_reports(include_all=True)
reports = action.data
for report_info in reports:
    if report_info.name == report_name:
        report_id = report_info.id

# Retrieve rows from Report
sheet = smartsheet_client.Reports.get_report(report_id, page_size=None, page=None, level=2)

I tried setting page_size=None only, both page_size=None and page=None (as shown in code snippet above), and omitting page_size entirely, but none of those combinations were able to return my full report (181 rows). Only when I explicitly set page_size=200 then did my result return as expected (all 181 rows).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant