pagehive

get_site

Get one site and the files in its draft.

SitesRead-onlyAll plansUpdated

What it does

Get one site and the files in its draft. current_version_id is the version visitors see. published_at is the first publish time and does not change. last_published_at updates on every publish. The rename object says how many renames are left and what happens to the old address. fields returns only some parts, such as ["agent_guide"]. hash fingerprints the answer; with if_hash set to it, an unchanged site answers only { unchanged: true, hash }.

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.
fieldsarray of stringParts to return, such as ["agent_guide"]: site keys (agent_guide, title, settings, status and the others site holds) and "files" for the draft file list. site.id always comes back; the hash then covers only these parts.
if_hashstringThe hash from an earlier answer of this tool with the same arguments. When the content is the same, the answer is only { unchanged: true, hash }.
draftstringOptional name of your own draft of this site (lowercase letters, digits and dashes, at most 40), such as "pricing-redesign". Each agent has its own drafts, so other agents' work never mixes into yours; give a name when you might work on this site from more than one chat at once, and use the same name on every read, write and publish of that piece of work. Without it you use your default draft.

Example

Call get_site with these arguments:

{
  "site_id": "01a1…"
}

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

Related guides