Skip to main content

Get Worksheet Data

  • To get data from a worksheet, you need the following 3 parameters:
  • 1.Access Token
  • 2.Worksheet Id
  • 3.App Id

How to get the Access token

POST

https://{region}-api.tablesprint.com/api/platform/worksheet/data/{appId}/{worksheetId}

URL Parameters

ParameterTypeRequiredDescription
appIdstringYesThe unique identifier of the application
worksheetIdstringYesThe unique identifier of the worksheet

To get URL parameters follow these steps:

  • 1.Click on the downward arrow beside the worksheet name.
  • 2.A dialog box with options will open image

  • 3.Click on More Info, and you'll see the worksheetId and AppId. image

Request Body Parameters

ParameterTypeRequiredDescription
viewstringNoName of the view to filter worksheet data
sortarrayNoAn array of objects specifying the sorting order for multiple columns. Each object must include a column name and an order (asc for ascending or desc for descending)

View :

{
"view": "your-view-name-here"
}

Sort:


"sort": [
{
"column": "Name",
"order": "asc"
},
{
"column": "City",
"order": "desc"
}
],

Filter :

How to apply filter operator

"filter": [
{
"condition": "where",
"columnId": "Product Id",
"operator": "=",
"operand1": {
"type": "value",
"value": "2"
}
}
]

Example :

  • If you pass view and sort, you will get all columns from the specified view, along with the main view results sorted accordingly.

{
"view":"viewName",
"sort": [
{
"column": "Name",
"order": "asc"
},
{
"column": "City",
"order": "desc"
}
],
},

  • If you pass view and filter, you will get all columns from the specified view, along with filtered results from the main view.
{
"view":"viewName",
"filter": [
{
"condition": "where",
"columnId": "Product Id",
"operator": "=",
"operand1": {
"type": "value",
"value": "2"
}
}
]
},
  • If you pass sort and filter, you will get all filtered columns in ascending or descending order from the main view.
{
"sort": [
{
"column": "text",
"order": "asc"
},
{
"column": "email",
"order": "desc"
}
],
"filter": [
{
"condition": "where",
"columnId": "Product Id",
"operator": "=",
"operand1": {
"type": "value",
"value": "2"
}
}
]
}
  • If you pass all three parameters (sort, filter, and view), you will get all filtered columns in ascending or descending order, along with all results from the specified view.

{
"view":"sheetviewapi",
"sort": [
{
"column": "text",
"order": "asc"
},
{
"column": "indianmobile",
"order": "desc"
}
],
"filter": [
{
"condition": "where",
"columnId": "Product Id",
"operator": "=",
"operand1": {
"type": "value",
"value": "2"
}
}
]
}

Request Headers

HeaderValue
AuthorizationBearer YOUR_ACCESS_TOKEN
Content-Typeapplication/json

Example Request

Here's an example of how to make this request:

curl --request POST \
--url https://ind-mumbai-api.tablesprint.com/api/platform/worksheet/data/app123/worksheet456
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"view": "your-view-name-here"
}'

Response

A successful request returns the HTTP 200 OK status code and JSON response body.

{
"results": {
"data": [
{
"Product ID": "2",
"Product Name": "LEGO Star Wars Set",
"Description": "Fun building set for Star Wars fans.",
"Price": 150,
"_id": "859ca3dea4"
},
{
"Product ID": "2",
"Product Name": "Running Shoes",
"Description": "Comfortable running shoes for all terrains.",
"Price": 80,
"_id": "dcc213beb6"
}
],
"total": "2",
"summary": {
"rowcount": "2"
}
},
"success": true
}

Response Headers

HeaderDescription
Content-Typeapplication/json
info

Make sure to select the appropriate region from the dropdown in the UI before sending your request. The request URL depends on the selected region.

Get data playground