Getting Tables
Learn to fetch database tables using the Tables API.
We'll cover the following...
Get published tables
We can create multiple tables using HubSpot CMS. We can send a GET
request to the tables endpoint to obtain a list of all tables created under our account.
The base URL to retrieve all published tables is as follows:
https://api.hubspot.com/cms/v3/hubdb/tables
We don’t need to provide any request parameters to this endpoint. However, we can provide some optional query parameters to filter our results. The following table gives details about these parameters:
Request parameters
Parameter | Type | Category | Description |
| string | optional | A UTC timestamp to filter the tables created at the exact time specified by this parameter |
| string | optional | A UTC timestamp to filter the tables created after the time specified by this parameter |
| string | optional | A UTC timestamp to filter the tables created before the time specified by this parameter |
| string | optional | A UTC timestamp to filter the tables updated at the exact time specified by this parameter. |
| string | optional | A UTC timestamp to filter the tables updated after the time specified by this parameter. |
| string | optional | A UTC timestamp to filter the tables updated before the time specified by this parameter. |
| string | optional | This value represents the sorting order of the returned tables. Accepted values for this parameter are |
| string | optional | A cursor value for forward pagination |
| number | optional | This specifies the number of tables to be returned. The default value is |
| boolean | optional | This is set to |
Let’s retrieve a list of tables we have created in the following code. We won’t use any parameters, but you can try providing some. Feel free to play around!
Note: If your access token has expired, go to the Refreshing Tokens lesson in the Appendix to retrieve a new ...