Block Quick Reference
The blocks you reach for daily, grouped by what they do. Build pages with the web blocks, APIs with the register and reply blocks, and data with the storage, mutation and query blocks.
Web pages: render, then update what changed
Web pages are how you build a page or a website. A page answers finished HTML; a button or form runs an action that answers only the parts that changed.
| Block | Does what |
|---|---|
web_page | Starts a page flow on a URL. Out-pins: connection, params, query, language. |
web_render | Renders the template on the server and answers the finished HTML, with title, description, canonical, Open Graph, hreflang and JSON-LD in the head. |
web_foreach | Repeats a row template for every item of a list. Every row gets a data-key. |
web_template | Renders a template to a piece of HTML: a section, or the new version of one row. |
web_action | Runs when a button or form with data-action="name" calls it. Out-pins: form, key and the page's connection, params, query, language. |
web_replace | Replaces one element of the page with new HTML. |
web_remove | Removes one element, such as the row of a deleted document. |
web_insert | Adds HTML: append, prepend, before or after. |
web_update | Gives one element new contents and keeps the element: a counter, a total. |
web_errors | Shows validation messages next to the fields of the form that sent the action. |
web_redirect | Sends the visitor to another page. |
APIs and HTTP: register a route, reply with JSON
| Block | Does what |
|---|---|
on_startup_register_uri_get | Registers GET /api/v1/<uri>. |
on_startup_register_uri_post | Registers POST /api/v1/<uri> (webhooks, creates). |
httpconnection_current_request | The live request connection object. |
httpconnection_get_params | Reads the :name parameters of the request's URI. |
httpconnection_get_query | Reads the query string of the current request. |
httpconnection_set_json | Replies to the caller with JSON and a status code. |
function_trigger_webhook_http_get_json, function_trigger_webhook_http_post | Call external APIs. The webhooks group has one per method. |
Storage and queries: read, write and search documents
| Block | Does what |
|---|---|
storage | Selects the storage collection for connected blocks. |
function_search | Searches documents (query, limit, offset, cache key). |
function_search_single_result | Searches and returns the first hit only. |
function_get_document | Reads one document by guid. |
function_create_document_from_mutations | Creates a document from a mutation set. |
function_update_document_mutations | Applies mutations to an existing document. |
function_remove_document, function_delete_document | Soft-deletes (recoverable), hard-deletes (permanent). |
mutations_set_bp_field_multiple | Sets several document fields at once. |
mutations_set_custom_field | Sets one field with a custom value. |
mutations_increment_by_field | Atomically increments or decrements a number. |
query_and, query_bool_must | Combines query parts (AND, multi-term OR). |
query_bool_term_fields | Exact match on one field. |
query_bool_filter | Attaches filter clauses. |
query_bool_simple_query_string_field | Free-text match on a field. |
query_bool_range_field | Date or number range on a field. |
query_sort_field | Sorts results by a field. |
Data and logic: values, objects and branches
| Block | Does what |
|---|---|
value_default, number_default | A fixed text or number value. |
object_new_fields | Builds an object with named fields. |
object_update_fields | Adds or changes fields on an existing object. |
array_map | Transforms every item in an array. |
branch | Splits flow into true and false paths on a condition. |
condition_not_empty_value | True when the checked value is filled. |
function_console_log | Writes to the blueprint console. |
trigger_custom_function | Defines a reusable function. |
function_custom_execute | Calls a function and waits for it. |
function_return | Returns values from a function. |
Background and scheduling: work outside the request
| Block | Does what |
|---|---|
function_custom_execute_from_queue | Defers work to the queue (heavy jobs, retries). |
schedule_repeating_event | Fires a flow on a schedule. |
storage_event | Fires on document create, update, save or remove. |
function_redis_cache_delete_key | Deletes a Redis cache key (invalidation). |
user_current | The calling user's document. |
Integrations: ready-made blocks for outside services
Before calling a service over HTTP, check the integrations: most have their own block group, with the credentials held by a service provider.
State pages and UI components: deprecated
| Block | Does what |
|---|---|
state_page | Registers a page URL and starts the page flow. |
state_render_page | Sends the assembled HTML to the browser. |
state_h1 and other text elements | Headings, text, containers on the page. |
state_form | Form container element. |
state_input_dynamic | Typed input field inside a form. |
state_button | Button with a click event. |
state_form_get | Reads the submitted form (form-object, form-error). |
state_advanced_datatable | Pre-styled table fed from a storage. |
Next steps
All Blocks The full block library by group. Block Templates These blocks wired into working combinations. Finding Blocks Search techniques and starter sets.Frequently asked
What are the most-used blocks in RUAL?
This page lists the blocks you reach for daily, web pages first, grouped by what they do. Each entry links to the block's full documentation, and you can search for any block with ⌘K.
Which RUAL block registers a GET endpoint?
on_startup_register_uri_get registers GET /api/v1/<uri>. The POST variant on_startup_register_uri_post is used for webhooks and creates, and httpconnection_set_json replies to the caller with JSON plus a status code.
What is the difference between function_remove_document and function_delete_document in RUAL?
function_remove_document soft-deletes a document, which stays recoverable, while function_delete_document hard-deletes it.