pagehive

read_site_data

On a site shared with you (whoami lists them): read what you, as its member, can read on the site.

Shared sitesRead-onlyAll plans

What it does

On a site shared with you (whoami lists them): read what you, as its member, can read on the site. With table: that table's rows, the same as bp.query on the site (public and site tables, and only your own rows of a members_own table); query takes where, search, sort, limit, mine, fields and the other query options. Without table: the site's public values. On the account's own sites, list_rows and list_values read the same data.

Plans

Works on every plan: Free, Basic, Pro and Ultra.

Parameters

NameTypeAbout
site_idrequiredstringThe id of the site. list_sites gives the ids of your sites.
tablestringThe table to read. Leave it out to read the site's public values.
queryobjectQuery options: where, search, sort, limit, fields, mine and the others query_table takes.
fieldsarray of stringWith table: column keys to return. id, position, revision, created_at, updated_at, _member, _created_by and _updated_by always come back. It keeps long text columns out of the response.

Example

Call read_site_data with these arguments:

{
  "site_id": "01a1…",
  "table": "tasks"
}

Ids like 01a1… stand for your own. list_sites and list_tables give you the real ones.

Related guides