What it does
Read the source of up to 10 draft pages in one call: for each page its template, page CSS, global CSS, the partials it includes and the scripts it references, as read_page returns them without rendered HTML, element ids or comments. files limits that set for every page, as in read_page. All pages share one budget of 32000 characters of file text, filled in the order of paths; a page that does not fit has complete false and next, the arguments (path included) for read_page to continue it. version is the current draft version, which patch_page accepts as base_version; an optional version must equal it, or the call fails with validation_failed reason page_changed. A path that is not a page on the draft fails the whole call with not_found, details.index and details.path. Repeated paths are read once.
Plans
Works on every plan: Free, Basic, Pro and Ultra.
Parameters
| Name | Type | About |
|---|---|---|
site_idrequired | string | The id of the site. list_sites gives the ids of your sites. |
pathsrequired | array of string | Up to 10 pages to read, such as / and /about, in the order to read them. |
files | string or array of string | Limits the files returned for every page, as in read_page. |
version | integer | The draft version you expect. If the draft changed, the call fails with page_changed. |
Example
Call read_pages with these arguments:
{
"site_id": "01a1…",
"paths": [
"/",
"/about"
]
}
Ids like 01a1… stand for your own. list_sites and list_tables give you the real ones.
Related guides
- Pages and partialsOne page per address, with shared headers and footers.