Skip to main content

Get Worksheet Data

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

How to get the token

POST

https://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",
"column": "columnName",
"operator": "=",
"operand_1": "Narayan"
}

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",
"column": "name",
"operator": "=",
"operand_1": "value"
}
},
  • 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": "indianmobile",
"order": "desc"
}
],
"filter":{
"condition": "where",
"column": "text",
"operator": "=",
"operand_1": "Narayana"
}
}
  • 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",
"column": "text",
"operator": "=",
"operand_1": "Narayana"
}
}

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://api.example.com/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": {
"sheet": [
{
"hggffj": "sample1",
"Dropdown": "Data",
"richtext": null,
"Contact2": null,
"dasfa": null,
"pn germany": null,
"email": null,
"dropdowm": null,
"IndianPhone": null,
"_id": "62fc9829bd"
},
],
"view": [
{
"hggffj": "sample2",
"Dropdown": "Data",
"richtext": null,
"Contact2": null,
"Contact": null,
"dasfa": null,
"pn germany": null,
"email": null,
"dropdowm": null,
"IndianPhone": null,
"_id": "62fc9829bd"
}
]
},
"success": true
}

Response Headers

HeaderDescription
Content-Typeapplication/json

Get data playground​