TablePress REST API

Read table data via the WordPress REST API.

The TablePress REST API module offers “read” access to TablePress tables via the WordPress REST API, so that tables can be embedded into external apps and systems or read from other sites.

Feature description

Accessing tables via the REST API is useful when data needs to be accessed from external systems, like smartphone apps or single-page JavaScript apps.

These can then query the list of tables or an individual table and will get the table’s JSON data back, for processing with their own business logic.

Usage instructions

To use this feature with your tables, enable the “REST API” module on the TablePress “Modules” screen.

Tables will then be available to authenticated users via the WordPress REST API.

The TablePress REST API namespace is tablepress/v1 and the (currently only) REST base for accessing table-related endpoints is tables. With this, the default route is

http://example.com/wp-json/tablepress/v1/tablesCode language: plaintext (plaintext)

An authenticated HTTP GET request to that would return the list of tables, essentially replicating the data that is available on the “List of tables” screen.

An HTTP POST request can add a new (empty) table of a given size, essentially replicating the “Add new table” screen.

Appending a table ID to the /tables API endpoint, like

http://example.com/wp-json/tablepress/v1/tables/<id>Code language: plaintext (plaintext)

will allow reading the table data (with an HTTP GET request) or deleting the table (with an HTTP DELETE request).

Updating or modifying table data through the TablePress REST API is planned for an upcoming feature release.