Vision App Maker rules work with JSON through a set of operators and call HTTP APIs through the RestClient plugin. Inside a rule, JSON is an object that the rule builds and queries. It becomes text only once, at the boundary, when it is sent to a plugin.
How it works
A typical exchange with an external API follows five steps.
- Build the request with
JsonObjectandJsonArray. - Serialize it once with
JsonText. - Send it with the RestClient plugin.
- Parse the response with
JsonParse. - Read values with
JsonValueorJsonValues.
Types are kept at both ends: numbers stay numbers, booleans stay booleans and null stays null. The serializer handles escaping of quotes and diacritics.
JSON operators
| Operator | Result | Behavior |
|---|---|---|
JsonObject(key, value, ...) | JSON object | Values can be scalars, entities, lists or other JSON objects. Null() writes an explicit null. With duplicate keys, the last one wins. |
JsonArray(value, ...) | JSON array | Each operand becomes one element. A single list operand becomes a nested array. |
JsonText(json, [indented]) | JSON text | Compact by default; with true, formatted for logs. |
JsonParse(text) | Queryable object or array | Empty or null text returns null. The result works with Len, Iterate, First and Index. |
JsonValue(json, path, [default]) | Typed value | Accepts an object or JSON text. Returns the first match; the default covers missing paths. |
JsonValues(json, path) | Typed list | Returns all matches; an empty list when nothing matches. |
ToJson(CustomType) | Object or array | Converts a custom type value to JSON. |
Paths
profile.agereads a property.roles[0]reads an array element by index.$[?(@.role=='UX Designer')].namefilters an array of objects;@is the current element, likeCurrentValue.
Common patterns
- List of entities to a JSON array:
Iteratebuilds oneJsonObjectper element, andJsonTextserializes the collection as an array. When member names match the API keys,JsonText(ToJson(List))is enough. - Find an element by property:
Firstwith aJsonValue(CurrentValue, ...)condition suits values that come from a parameter. A JSONPath filter is shorter for fixed queries.
RestClient plugin
RestClient is a generic HTTP client with built-in authorization. It supports any HTTP verb and any content type. It returns the raw response; a 404 or 500 status does not raise an exception, and the rule decides what to do.
Calling it
The plugin takes HttpRequest(url, method, [body], [content type], [headers], [authorization], [timeout]). A rule calls it with CallPluginWithParams and passes headers and authorization as JSON text. The outputs are read by index:
| Output | Content |
|---|---|
| #0 | HTTP status code (200, 404...) |
| #1 | Response body, as text |
| #2 | Response headers, as JSON |
| #3 | Success flag, true for 2xx statuses |
A rule typically checks #0, then reads the body with JsonValue(JsonParse(#1), ...). For an unexpected status it can stop with Throw and a formatted message.
Request body by content type
| Content type | Body |
|---|---|
| application/json (default) | JSON text |
| application/x-www-form-urlencoded | An object with the form fields; the plugin does the URL encoding |
| multipart/form-data | An object with fields and files; file content in Base64, from FileToBase64 |
Authorization
Authorization is a JSON object with a type field:
basic, with user name and password;bearer, with a token;apikey, with the header name and its value.
For other schemes, the rule sets the Authorization header directly through the headers parameter.
RestClient and MakeHttpCall
MakeHttpCall, a System plugin, sends a URL, method, JSON body and headers and returns the response. RestClient adds:
- a correct Content-Type for each body;
- form and file uploads;
- the status code and response headers as outputs;
- a timeout per call.







