Python equivalent of API doesn't give the same result

I tried using the python equivalent function of the api

https://api.smartsheet.com/2.0/reports?modifiedSince=2024-08-01T00:00:00Z&include_all=True

as

self.smartsheet_client.Reports.list_reports(modified_since='2024-08-01T00:00:00Z', include_all=True)

This time it's giving me all the reports 360 of it, why didn't the python function limit the reports to just after the date provided?

thanks,

Sandeep

Answers

  • Brian_Richardson
    Brian_Richardson Overachievers Alumni
    edited 09/13/24

    There's not too many on here that do Python. I'm afraid I don't either but I didn't want you left hanging. I only have a couple of suggestions that might be dumb, as I'm not super familiar with Python.

    If these don't cut it, then I'd suggest reaching out to your account rep and see if they can get someone from the development team to connect with you or identify this as a bug. Also check through the Developers site to see if there's any helpful info there.

    https://developers.smartsheet.com/index.html

    • Does the date need to be in quotes? Maybe try without?
    • Why include_all ? Try removing that perhaps and see if you get a different result?
    • Why self.smartsheet_client instead of just smartsheet_client as in the documentation?
    • I saw some alternative documentation that had the arguments in this format (modified_since, '2024-08-01T00:00:00Z'). Maybe try that instead of =
    • In the sample script here the format of the call is completely different than the API documentation. In this example they use smartsheet.Smartsheet().Sheets.get_sheet(…) not self.smartsheet_client.Sheets.get_sheet(…) so maybe you need this other format? Confusing!

    If none of that works or even makes sense, then I'm afraid I don't have other ideas for you.

    BRIAN RICHARDSON | PMO TOOLS AND RESOURCES | HE|HIM

    SEATTLE WA, USA

    IRON MOUNTAIN