Convert Google Sheet to RESTful API with this Free Website

0 Comments
Editor Ratings:
User Ratings:
[Total: 0 Average: 0]




Sheetson lets you convert Google Sheet to RESTful API easily. With this, you can use Google Sheet as the backend database for your staging applications. You can retrieve data from sheet by making simple API calls and you can update that sheet as well. You just have to invite a special email address to the sheet and make it public in order to make it work. You can easily insert new records in the sheet by API calls and delete them as well. If you don’t want to get into the heavy database configuration then you will like this method.

If you have some small applications that require a database then you will like Sheetson. For your small-scale application testing, you will not have to download and install database servers such as MySQL, MSSQL, PostgreSQL, etc. But with Sheetson, you will not have to do that. You can turn any Google Sheet as a backend database server and perform some operations right from your applications. Make API calls to the endpoint that Sheetsons gives you and then you are free to do anything you want. However, I will request you not to abuse this API by heavy requests.

Google Sheet to RESTful API with this Free Website

How to Convert Google Sheet to RESTful API with this Free Website?

To use Sheetson, you don’t even have to create an account in order to use it. You just invite a specific user to a Google Sheet, make it public, and then generate the API endpoint URL. To do that, you will have to obtain the SheetID and it will take Sheet name from you as well.

So, the very first step is to open a Google Sheet that you want to use a backend server. Next, make this sheet public and then invite the following email address as he collaborator with editing rights. Save the changes and then it’s time to generate the API endpoint for the sheet that you have created.

sheetson@project-id-9647564749903618942.iam.gserviceaccount.com

Make Sheet Public and invite collab

Now, you have to copy the name of the Google Sheet and its ID. The ID is in the URL of the sheet between “d/” and “/edit” string. After that, you can enter these values in the following URL. The final URL is the endpoint URL which will give al the sheet data in JSON when you paste it in the browser.

https://api.sheetson.com/v1/sheets/SheetName?spreadsheetId=SheetID

Get sheet data as JSON objects

In the above screenshot, you can see the response it produces in JSON format. Now, you can start fetching records from the sheet. To fetch a row from the sheet, you can use the following syntax of the URL. You can either use this URL in address bar of the browser or you can use cURL to make API requests. Just specify the “SheetID” and “rowIndex” in the following URL to get the desired record.

curl https://api.sheetson.com/v1/sheets/Test/rowIndex?spreadsheetId=SheetID

Get specific row from Google Sheet

You can update data in the Google Sheet as well. For that, you have to use the following syntax of the call. In this, you have to specify values for the row fields and then send it. It will add a new row in the sheet and will show you its row index. You can see the example below.

curl -X POST \
-H "X-Sheetson-Spreadsheet-Id: SheetID" \
-H "Content-Type: application/json" \
-d '{"FieldName": "Value", "FieldName": "Value"}' \
https://api.sheetson.com/v1/sheets/SheetName

Sheetson add a new row

In the above call, you can see how you can add new row in the Google Sheet with a simple command. There are other operations that you can do on the Google Sheet and there is a specific syntax for that. Apart from this, you can delete a row, update a row, and retrieve multiple rows. You can examples of those on its homepage.

Final thoughts

Sheetson is a fantastic tool for developers and database programmers. You can use it very easily to convert any Google Sheet to a working database and use it in any way you want. If you have worked on network programming and JSON then you can easily use this in your web and desktop applications. So, if you are looking for ways to convert a Google Sheet into a database then this post will help you.

Editor Ratings:
User Ratings:
[Total: 0 Average: 0]
Free/Paid: Free

Leave A Reply

 

Get 100 GB FREE

Provide details to get this offer