Skip to content
Florian edited this page Mar 20, 2023 · 11 revisions

The REST API provides access for mostly authenticated users to their data inside the Nextcloud tables app.

Prerequisites

The URL to access the API interface can be found at tld/index.php/apps/tables/api/<api-version>/<whatever>.

Endpoints

Tables

GET /tables Get a list of tables and some basic information about them.

Example: http://nextcloud.local/index.php/apps/tables/api/1/tables.

Available since: API 1 shipped with v0.3

Request parameters

none

Response

Success

Returns an json array of table-objects.

[
    {
        "id": 32,
        "title": "Staffing",
        "emoji": "🤡",
        "ownership": "admin",
        "ownerDisplayName": "admin",
        "createdBy": "admin",
        "createdAt": "2023-01-27 11:51:46",
        "lastEditBy": "admin",
        "lastEditAt": "2023-02-02 12:23:35",
        "isShared": false,
        "onSharePermissions": null
    },
    {
        "id": 2,
        "title": "Share test",
        "emoji": "😭",
        "ownership": "jane",
        "ownerDisplayName": "jane",
        "createdBy": "jane",
        "createdAt": "2023-01-17 13:11:28",
        "lastEditBy": "jane",
        "lastEditAt": "2023-01-17 13:11:28",
        "isShared": true,
        "onSharePermissions": {
            "read": true,
            "create": true,
            "update": true,
            "delete": false,
            "manage": false
        }
    }
]

POST /table Create a new table

Example: http://nextcloud.local/index.php/apps/tables/api/1/table.

Available since: API 1 shipped with v0.4

Request parameters

  • title The title for the new table.
  • emoji The emoji for the new table, is optional.
  • template Template name if table definition should come from a template, is optional.

Response

Success

Returns an json object of the new table.

Data

GET /table/<tableId>[?limit=<limit>[&offset=<offset>]] Get a list of rows. The first row contains the column titles. There is a default row limit by 1000 rows. If you need more (or want to limit less), you can set a limit on your own. Additionally set an offset if needed, would be good for lazy loading etc.

Examples:

  • http://nextcloud.local/index.php/apps/tables/api/1/table/34.
  • http://nextcloud.local/index.php/apps/tables/api/1/table/34?limit=20.
  • http://nextcloud.local/index.php/apps/tables/api/1/table/34?limit=20&offset=40.

Available since: API 1 shipped with v0.3

Request parameters

  • tableId has to be integer
  • limit has to be integer
  • offset has to be integer

Response

Success

Returns an json array of table-rows. The first row contains the emoji + column title.

[
    [
        "Task",
        "Description",
        "Target",
        "Progress",
        "Comments",
        "Test column"
    ],
    [
        "wert",
        "<p>wert</p>",
        "<p>wert</p>",
        55,
        "<p>wert</p>",
        "hier"
    ],
    [
        "Neu",
        "<p>Super</p>",
        "foo bar",
        8,
        "<p>Comments!</p>",
        ""
    ]
]

Clone this wiki locally