pagehive

create_data_share

Share one table or one value from its owning site to another site.

Data sharesChanges dataAll plans

What it does

Share one table or one value from its owning site to another site. Only an agent that works as the owner on the whole hive, with no sites left out, may call this; site keys and agents limited to some sites are refused (reason share_whole_hive). access is read or read_write. The same pair again updates access.

Plans

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

Parameters

NameTypeAbout
to_site_idrequiredstringThe site that gets access.
tablestringThe table to share. Give either table or value.
valuestringThe value to share, by key. Give either table or value.
accessrequiredone of: read, read_writeread lets the other site read it; read_write also lets it change it.
idempotency_keystringAny unique string (1-200 printable ASCII). A retry with the same key and arguments returns the first call's result instead of running again. Same as the Idempotency-Key header.

Example

Call create_data_share with these arguments:

{
  "to_site_id": "01a1…",
  "table": "recipes",
  "access": "read"
}

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

Related guides