Can you use the API to call and get just the first row ID?

Options
Lucas Rayala
Lucas Rayala ✭✭✭✭✭✭
edited 02/21/23 in API & Developers

I have 10,000K line database and I need just the row ID for the first row -- currently I'm grabbing the entire JSON table to then query for the ID, but that takes a bit of time. Is there a re way to just ask for that first row ID?

You can do this for columns like this:

first_column = []
first_column.append(ss.Sheets.get_columns(sheet_id, include_all=True).data[0].id)

But you can't do the same thing for a row, such as this:

first_row = []
first_row.append(ss.Sheets.get_rows(sheet_id, include_all=True).data[0].id)

Any thoughts?

Best Answer

Answers