Skip to content
gist.link ↗

rows

Query Sheets API — POST https://sheets.api.gist.link/graphql

The rows query on the Sheets API.

sheets:query:rows

The calling IAM key must hold this permission (or a wildcard that covers it: sheets:query:* or sheets:*) and the access token must have been minted with audience=sheets. See Permissions.

type Query {
rows(worksheetId: String!, startRow: Int, first: Int): RowPage!
}
Argument Type Required Description
worksheetId String! Yes —
startRow Int No —
first Int No —

RowPage! — see the Sheets types reference.

Terminal window
curl https://sheets.api.gist.link/graphql \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d @- <<'JSON'
{
"query": "query Rows($worksheetId: String!, $startRow: Int, $first: Int) { rows(worksheetId: $worksheetId, startRow: $startRow, first: $first) { startRow endRow hasNextPage revision items { index } } }",
"variables": {
"worksheetId": "example",
"startRow": 10,
"first": 10
}
}
JSON