An open API service indexing awesome lists of open source software.

https://github.com/gastonpereyra/get-sheet-data

Create APIs to get data from Google Spread Sheet
https://github.com/gastonpereyra/get-sheet-data

api excel google json spreadsheet

Last synced: 3 months ago
JSON representation

Create APIs to get data from Google Spread Sheet

Awesome Lists containing this project

README

        

# Get Sheet Data
Create APIs to get data from *Google Spread Sheet*

## Configuration

To use your *Google Spread Sheet* as an Database must follow these instructions:
* Share your document with this email: `[email protected]`
* First Row must be the key names
* The other rows are the values
* Sheet names is not allowed yet.

## API

Base URL: `https://get-sheet-data.vercel.app`

### Get Document Data

* Request:
* `google-id`: Google Spread-Sheet ID. `String`: Alphanumeric

```
GET - api/document/[google-id]

example: api/document/2ABtD2ndfB82XM0twWM3uomdsveMxykcEjBn7dQUFuBO
```

* Response:
* `object`:
* keys: `String`, Sheet Names
* values: `Array`, Rows

```json
{
"Sheet0": [
{ "name": "Tony", "lastname": "Stark" },
{ "name": "Bruce", "lastname": "Wayne" }
],
"Sheet1": [
{ "name": "Natasha", "lastname": "Romanoff" },
{ "name": "Diana", "lastname": "Price" }
]
}
```

### Get Sheet in Document

* Request:
* `google-id`: Google Spread-Sheet ID. `String`: Alphanumeric
* `sheet-number`: Number of the Sheet (first is 0). `Number`: Positive

```
GET - api/document/[google-id]/sheet/[sheet-number]

example: api/document/2ABtD2ndfB82XM0twWM3uomdsveMxykcEjBn7dQUFuBO/sheet/0
```

* Response:
* `object`:
* values: `Array`, Rows

```json
[
{ "name": "Tony", "lastname": "Stark" },
{ "name": "Bruce", "lastname": "Wayne" }
]
```