GET: Read your sheet data

Use a GET request to read data from your Google Sheet.

The basics

curl \
https://sheetmetal.io/api/v1/YOUR_METAL_KEY/TAB

This will get all rows in TAB

Examples

Get all rows from "Employees":

curl \
https://sheetmetal.io/api/v1/YOUR_METAL_KEY/Employees

Read first two rows from the "Employees" tab:

curl \
https://sheetmetal.io/api/v1/YOUR_METAL_KEY/Employees?limit=2

Read the third row from sheet "Employees":

curl \
https://sheetmetal.io/api/v1/YOUR_METAL_KEY/Employees?limit=1&offset=2

Get all "Employees" who are male and still employed:

curl \
https://sheetmetal.io/api/v1/YOUR_METAL_KEY/Employees?criteria=status.eq.employed+gender.eq.male

Options

All options are passed as query parameters

ParameterDefaultDescription
limitNumber of how many rows should be returned
offset0Number from which row response should start
criteria@todo

Returns

200: Success

An array of objects. Each object is a row from the Google Spreadsheet. For example:

{
"values": [
{ "id": "1", "name": "Erlich Bachman", "gender": "male" },
{ "id": "2", "name": "Richard Hendricks", "gender": "male" },
{ "id": "3", "name": "Dinesh Chugtai", "gender": "male" },
{ "id": "4", "name": "Bertram Gilfoyle", "gender": "male" },
{ "id": "5", "name": "Jared Dunn", "gender": "male" },
{ "id": "6", "name": "Jian Yang", "gender": "not hotdog" }
]
}

The values data will ALWAYS be an array, even if you request with limit=1.

We do not return the cell range in the sheet, as this data may be incorrect if another client subsequently updates the sheet (for example, deleting a row).

401: Unauthorized

The metal key was invalid.

404: Not found

The tab you were looking for was not found.