Other methods
This section describes the other methods of the SheetDB API.
Get value of single cell
If you want to retrieve the contents of a single cell using coordinates, such as A1, B10, etc. you can use this endpoint. It returns an array with the coordinates as the key and the contents of the cell as the value.
If you want to get multiple cells, just separate them with a comma. Example:
https://sheetdb.io/api/v1/58f61be4dda40/cells/A1,A2,B5
Optional attributes
- Name
sheet
- Type
- string
- Description
The sheet (tab) you want to select.
JSON Response
{
"A1": "id",
"A2": "1",
"B5": "Steve"
}
Import JSON
If you have an empty spreadsheet, with the first row unfilled, you can use this endpoint to import the entire JSON file. Make sure the spreadsheet is empty, otherwise the content will be appended below.
Required attributes
- Name
json
- Type
- json
- Description
Should contain the json array you want to import.
Example:[{"id": 1,"name": "Mark"},{"id": 2,"name": "Susan"}]
Optional attributes
- Name
sheet
- Type
- string
- Description
The sheet (tab) you want to select.
Request
curl -X POST -H "Content-Type: application/json" \
https://sheetdb.io/api/v1/58f61be4dda40/import/json \
-d '{"json":[{"id": 1,"name": "Mark"},{"id": 2,"name": "Susan"}]}'
JSON Response
{
created: 1
}
List of available sheets
Returns a list of all available sheets (tabs).
JSON Response
{
"sheets": [
"Sheet1",
"Sheet2",
"large"
]
}
Create new sheet
Creates a new sheet (tab) in the spreadsheet.
This method works only in some plans, more in our pricing.
Required attributes
- Name
name
- Type
- string
- Description
name of the new sheet
- Name
first_row
- Type
- array
- Description
column names in the form of an array, example:
["id", "name"]
Request
curl -X POST -H "Content-Type: application/json" \
https://sheetdb.io/api/v1/58f61be4dda40/sheet \
-d '{"name": "New Sheet", "first_row":["id","name"]}'
JSON Response
{
created: 1
}
Delete a sheet
Deletes a sheet (tab) and the content. Requires one param:
This method works only in some plans, more in our pricing.
Required attributes
- Name
name
- Type
- string
- Description
name of the sheet you want to delete
Request
curl -X DELETE -H "Content-Type: application/json" \
https://sheetdb.io/api/v1/58f61be4dda40/sheet \
-d '{"name": "New Sheet"}'
JSON Response
{
created: 1
}