0

I am using smartsheet as a database and I want to query the smartsheet by column name equals value like in sql db for example: To get the particular row of Employee sheet where salary equal to 10000. But documentation describes only how to get list of rows and how to update and delete rows by row id.

https://smartsheet-platform.github.io/api-docs/?java

What i want is to achieve without knowing id of the row. But I can do by search function by searching the salary of the employee

https://api.smartsheet.com/2.0/search?query=10000

and the response of above call will have row id and again i should make a call with rowid to get that row by below call which I don't want.

GET /sheets/{sheetId}/rows/{rowId}

Can anyone help me out?

Anas Ahamed
  • 186
  • 10

1 Answers1

4

Although some folks do try to use Smartsheet like a database, it's not really designed to be queried via API in the same way that you'd use transact SQL to query a SQL database.

I don't believe the scenario that you've described (i.e., using the Smartsheet API to retrieve row(s) in a sheet where [column value] = [specified value]) is possible. Instead, you'll have to use the API to get the data in the sheet (Get Sheet) and then in your code, query the data that you received in the API response (to identify the row(s) that match your query criteria).

Kim Brandl
  • 13,125
  • 2
  • 16
  • 21