GCBGutenberg
Control Blocks
Buy

Reference

REST API routes

Reference, generated from the plugin source

Every REST route GCB registers, read from its register_rest_route() calls. Methods come from the methods key (WP_REST_Server::READABLE is GET, CREATABLE is POST, DELETABLE is DELETE); access comes from each route's permission_callback.

MethodRouteAccessSource
GET/wp-json/gcblite/v1/iconsNeeds edit_postsIcons/IconSources.php:123
POST/wp-json/gcblite/v1/iconsNeeds manage_optionsIcons/SiteIcons.php:252
GET/wp-json/gcblite/v1/options/{slug}PublicOptions/Registrar.php:288
GET/wp-json/gcblite/v1/blocksPublicRestAPI/BlocksAPI.php:36
GET/wp-json/gcblite/v1/builder/blocksNeeds edit_postsRestAPI/BuilderAPI.php:59
POST/wp-json/gcblite/v1/builder/blocksNeeds edit_themesRestAPI/BuilderAPI.php:59
DELETE/wp-json/gcblite/v1/builder/blocks/{slug}Needs edit_themesRestAPI/BuilderAPI.php:74
GET/wp-json/gcblite/v1/builder/control-docs/{type}Needs edit_postsRestAPI/BuilderAPI.php:86
GET/wp-json/gcblite/v1/builder/blocks/{slug}/fieldsNeeds edit_postsRestAPI/BuilderAPI.php:95
POST/wp-json/gcblite/v1/builder/blocks/{slug}/fieldsNeeds edit_themesRestAPI/BuilderAPI.php:95
GET/wp-json/gcblite/v1/builder/structured-fieldsNeeds edit_postsRestAPI/BuilderAPI.php:118
GET/wp-json/gcblite/v1/builder/structured-fields/{kind}[/{id}]Needs edit_postsRestAPI/BuilderAPI.php:124
POST/wp-json/gcblite/v1/builder/structured-fields/{kind}[/{id}]Needs edit_themesRestAPI/BuilderAPI.php:124
GET/wp-json/gcblite/v1/builder/tokensNeeds edit_postsRestAPI/BuilderAPI.php:143
POST/wp-json/gcblite/v1/builder/tokens/customNeeds edit_themesRestAPI/BuilderAPI.php:149
GET/wp-json/gcblite/v1/builder/post-typesNeeds edit_postsRestAPI/BuilderAPI.php:162
POST/wp-json/gcblite/v1/builder/post-typesNeeds edit_themesRestAPI/BuilderAPI.php:162
POST/wp-json/gcblite/v1/previewNeeds edit_postsRestAPI/PreviewAPI.php:26
GET/wp-json/gcblite/v1/queryPublicRestAPI/QueryLoopAPI.php:34
POST/wp-json/gcblite/v1/renderPublicRestAPI/RenderAPI.php:66
POST/wp-json/gcblite/v1/render-batchPublicRestAPI/RenderAPI.php:72
POST/wp-json/gcblite/v1/validation-stateNeeds edit_postsRestAPI/ValidationAPI.php:58
GET/wp-json/gcblite/v1/terms/{taxonomy}/{term_id}/fieldsPublicTaxonomy/Registrar.php:201
GET/wp-json/gcblite/v1/users/{user_id}/fieldsPublicUser/Registrar.php:308

Source paths are under the plugin's includes/ folder.

Notes from the code

GET, POST /wp-json/gcblite/v1/icons

GET gcblite/v1/icons?search=arrow&limit=120 or ?names[]=tabler/bolt — for anyone who can edit.

Registered by more than one file (includes/Icons/IconSources.php, includes/Icons/SiteIcons.php); the later registration wins for the same method.

GET /wp-json/gcblite/v1/options/{slug}

GET /wp-json/gcblite/v1/options/{slug}

GET /wp-json/gcblite/v1/blocks

GET, POST /wp-json/gcblite/v1/builder/blocks

DELETE /wp-json/gcblite/v1/builder/blocks/{slug}

DELETE /builder/blocks/{slug} — remove a block (its whole dir) from the active theme. Theme blocks only; plugin-example blocks are never deletable.

Arguments: slug.

GET /wp-json/gcblite/v1/builder/control-docs/{type}

Per-control docs — read from the same schemas/controls/{type}.md files the docs site reads. Drives the right-pane help panel in the Edit Fields view.

Arguments: type.

GET, POST /wp-json/gcblite/v1/builder/blocks/{slug}/fields

Arguments: slug.

GET /wp-json/gcblite/v1/builder/structured-fields

Structured fields — JSON schemas autoloaded by StructuredFields\Autoloader. List endpoint enumerates all four kinds; per-item read/write endpoints mirror the block-fields shape so the React side can reuse the EditFields view.

GET, POST /wp-json/gcblite/v1/builder/structured-fields/{kind}[/{id}]

GET /wp-json/gcblite/v1/builder/tokens

Design tokens — read the live theme.json token tree for the field token-picker, and (write) append a custom token to the theme.

POST /wp-json/gcblite/v1/builder/tokens/custom

Arguments: category, slug, value, name.

GET, POST /wp-json/gcblite/v1/builder/post-types

Custom post types — config-driven (PostTypes\PostTypeRegistrar).

Arguments: config.

POST /wp-json/gcblite/v1/preview

Arguments: blockName, attributes, default.

GET /wp-json/gcblite/v1/query

Arguments: blockName, page.

POST /wp-json/gcblite/v1/render

Both routes are public-readable by design. They only render gcb/* blocks already registered on the site — content the site has chosen to publish. The render output is the same HTML a visitor would see embedded in a public page, so gating these would just force the headless front-end to ship a service- account password. SSRF mitigation (matters to plugin reviewers): these endpoints can proxy to a configurable frontend URL via wp_remote_get(), but the URL is ONLY settable via: - GCBLITE_COMPONENT_SERVER_URL defined in wp-config.php, OR - the gcblite_frontend_url PHP filter It is NOT stored in any WordPress option or settable via REST. An attacker therefore cannot retarget the proxy without filesystem access. The destination's response is also extracted through a strict <wp-block-wrapper> regex (HtmlExtractor) that drops any non-component markup — there is no arbitrary HTML pass-through.

POST /wp-json/gcblite/v1/render-batch

POST /wp-json/gcblite/v1/validation-state

Arguments: post_id, has_errors, errors.

GET /wp-json/gcblite/v1/terms/{taxonomy}/{term_id}/fields

GET /wp-json/gcblite/v1/terms/{taxonomy}/{term_id}/fields

GET /wp-json/gcblite/v1/users/{user_id}/fields

GET /wp-json/gcblite/v1/users/{user_id}/fields

Fields added to WordPress's own routes

blocks_raw

Exposes a post's raw block markup (the source with block comments) as a public REST field on pages and posts.

Added with register_rest_field() to the post-type routes under /wp-json/wp/v2/. Source: includes/RestAPI/RawBlocksField.php.

Built from GCB Lite 0.4.0 (ce232d4). Source: includes/.

Copyright © 2026 Runchain. WordPress is a trademark of the WordPress Foundation.