By default we will always work with the first tab of the Sheet for all operations, but you can also work with different tabs by using the suffix: /tabs/<Tab Name>
.
Tab operations will work with all basic and operations.
___________________
Shell
# Display data from the "Admin" tab curl 'https://sheet.best/api/sheets/cf969697-682a-40e3-bad4-d54803eeeacf/tabs/Admin' # Writing data to "Admin" tab curl 'https://sheet.best/api/sheets/cf969697-682a-40e3-bad4-d54803eeeacf/tabs/Admin' \ -H 'Content-Type: application/json' \ -d '[{"Name": "Jack Doe", "Age": 97, "Created at": "2019-08-19T13:32:11.744Z"}]'
Python
import requests # Display data from the "Admin" tab requests.get("https://sheet.best/api/sheets/cf969697-682a-40e3-bad4-d54803eeeacf/tabs/Admin") # Writing data to "Admin" tab requests.post( "https://sheet.best/api/sheets/cf969697-682a-40e3-bad4-d54803eeeacf/tabs/Admin", json=[{ 'Name': 'Jack Doe', 'Age': '97', 'Created at': datetime.now().isoformat(), }], )
Javascript
// Display data from the "Admin" tab fetch( "https://sheet.best/api/sheets/cf969697-682a-40e3-bad4-d54803eeeacf/tabs/Admin" ) .then((response) => response.json()) .then((data) => { console.log(data); }) .catch((error) => { console.error(error); }); const data = [ { Name: "Jack Doe", Age: 97, "Created at": new Date(), }, ]; // Writing data to "Admin" tab fetch( "https://sheet.best/api/sheets/cf969697-682a-40e3-bad4-d54803eeeacf/tabs/Admin", { method: "POST", mode: "cors", headers: { "Content-Type": "application/json", }, body: JSON.stringify(data), } ) .then((r) => r.json()) .then((data) => { // The response comes here console.log(data); }) .catch((error) => { // Errors are reported there console.log(error); });
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article