Stein Docs

Stein Docs

  • Docs
  • GitHub

›Getting Started

Getting Started

  • Introduction & Core Concepts
  • Create an API
  • Read Data from Sheet
  • Search for Data
  • Add Rows to Sheet
  • Update Rows
  • Delete Rows
  • Authentication
  • Using Client Libraries

Hosting

  • Introduction
  • Manual Installation & Setup

Stein Expedite

  • Introduction
  • Installation
  • Display Data from Sheet
  • Search for Data
  • Connect HTML Forms to Sheet

Read Data from Sheet

You can access your sheet's complete data in JSON.

Find your API's URL in your dashboard. Perform a GET request to [your API URL]/[sheet name] to retrieve your complete data.

Let's read the contents of Sheet1 of the Blog Posts API we created earlier.

cURL
Node.js
HTML
# Read Sheet1
$ curl "https://api.steinhq.com/v1/storages/5cc158079ec99a2f484dcb40/Sheet1"

# Response ↓ (trimmed for brevity)
# [{"title":"Why the Best Things in Life Can’t Be Planned","content":"Thales of Miletus, considered ...","link":"https://medium.com/...","author":"Zat Rana"}, {...}, ...]
// Read Sheet1
const SteinStore = require("stein-js-client");
const store = new SteinStore(
"https://api.steinhq.com/v1/storages/5cc158079ec99a2f484dcb40"
);

store.read("Sheet1", { limit: 1, offset: 2 }).then(data => {
console.log(data);
});

// Logs ↓ (trimmed for brevity)
// [{"title":"Why the Best Things in Life Can’t Be Planned","content":"Thales of Miletus, considered ...","link":"https://medium.com/...","author":"Zat Rana"}, {...}, ...]
<script src="https://unpkg.com/stein-js-client"></script>
<script>
const store = new SteinStore(
"https://api.steinhq.com/v1/storages/5cc158079ec99a2f484dcb40"
);

store.read("Sheet1", { limit: 1, offset: 2 }).then(data => {
console.log(data);
});

// Logs ↓ (trimmed for brevity)
// [{"title":"Why the Best Things in Life Can’t Be Planned","content":"Thales of Miletus, considered ...","link":"https://medium.com/...","author":"Zat Rana"}, {...}, ...]
</script>

Optional request parameters

You can optionally limit and offset your response.

ParameterDescriptionType
limitMaximum number of rows to be returnedNumber (Integer)
offsetIndex of row from which response should start (default is 0)Number (Integer)
cURL
Node.js
HTML
# Read Sheet1, with a limit and an offset
$ curl "https://api.steinhq.com/v1/storages/5cc158079ec99a2f484dcb40/Sheet1?limit=1&offset=2"

# Response ↓ (trimmed for brevity)
# [{"title":"The Awkward Power Dynamics...","content":"The other night, I was...","link":"https://medium.com/...","author":"Deanna Pai"}]
// Read Sheet1, with a limit and an offset
const SteinStore = require("stein-js-client");
const store = new SteinStore(
"https://api.steinhq.com/v1/storages/5cc158079ec99a2f484dcb40"
);

store.read("Sheet1", { limit: 1, offset: 2 }).then(data => {
console.log(data);
});

// Logs ↓ (trimmed for brevity)
// [{"title":"The Awkward Power Dynamics...","content":"The other night, I was...","link":"https://medium.com/...","author":"Deanna Pai"}]
<script src="https://unpkg.com/stein-js-client"></script>
<script>
const store = new SteinStore(
"https://api.steinhq.com/v1/storages/5cc158079ec99a2f484dcb40"
);

store.read("Sheet1", { limit: 1, offset: 2 }).then(data => {
console.log(data);
});
</script>

Return value

An array of objects, with each object representing the sheet rows.

← Create an APISearch for Data →
  • Optional request parameters
  • Return value
Stein Logo
DocumentationOpen SourcePricingPartners

Privacy PolicyTerms of Service
© 2021 Stein