How to retrieve only the newest rows via the Smartsheet API

747 views Asked by At

I need to be able to retrieve only the newest (most recently modified) rows via the Smartsheet API.

The only way to get a sheet's rows seems to be via the Get Sheet call here: http://www.smartsheet.com/developers/api-documentation#h.4930jur8qsvs

I have a large sheet that is taking this call over 30 seconds to return. What I really need is just a way to get the most recently modified rows since a given timestamp.

Is there a way?

3

There are 3 answers

1
stmcallister On BEST ANSWER

Grabbing rows by modified date is not currently supported by the Smartsheet API at this time.

0
Alex Argumedo On

Just to provide an update of a hard to find correct syntax for version 2.0:

ten_ago = datetime.now() - timedelta(minutes=10)

ten_ago = ten_ago.isoformat()

page = smart.Sheets.get_sheet(sheet, level=2, rows_modified_since=ten_ago, include=object_value)

This will retrieve only the rows that has been modified 10 min ago including smartsheet object values.

0
Sk Shahnawaz-ul Haque On

Try this (REST GET operation):

/sheet/{sheetID}?rowsModifiedSince={DATETIME}

DATETIME: Must be in UTC Format. e.x.: https://api.smartsheet.com/1.1/sheet/##########?rowsModifiedSince=2015-03-26T11:40:00Z

This is an undocumented parameter of Smartsheet API 1.1.