JSON-RPC Client
Call JSON-RPC 2.0 Method.
Sends one JSON-RPC 2.0 request as an HTTP POST and returns the result member, or the JSON-RPC error member through the error port.
How it works
- Resolves the config.
connection_id,method,paramsandidfall back to the same keys of the incoming payload;connection_idandmethodare required. - Resolves the credential: the URL is
config.url(orconfig.endpoint); when the secret hasusernameandpassword, HTTP Basic authentication is used. - Builds
{ jsonrpc: "2.0", method, params, id }: a stringparamsis parsed as JSON, a missing one becomes[];iddefaults to1. - POSTs the request. A response with an
errormember leaves througherror; otherwise{ result }leaves throughout.
In a workflow
The node as it appears in a workflow file (draft_nodes[]), and the envelope of a successful run.
{
"node_id": "node-get-balance",
"label": "Get balance",
"operator_slug": "io.jsonrpc",
"operator_version": "1.0.0",
"config": {
"connection_id": "pi-credential-xxxx",
"method": "account.getBalance",
"params": "[\"{{ $json.account_id }}\"]",
"id": "1"
}
}{
"ok": true,
"data": {
"result": {
"balance": "1250.40",
"currency": "USD"
}
},
"port": "out"
}Configuration
-
connection_idstring Required -
Credential for the JSON-RPC endpoint. Accepts credentials of type `api-key` or `basic-auth`.
-
methodstring Required -
Method Name
-
paramsstring Optional -
Parameters (Array/Object as JSON string or array)
-
idstring Optional -
Request ID
Behaviour in the code
What the implementation does with these keys beyond what the schema says.
-
connection_id - Only
username+passwordare read from the secret (basic-auth); anapi-keycredential adds no authentication. A value starting withhttp://orhttps://is used as the endpoint URL itself, without authentication. -
params - Accepts an array, an object or a JSON string; strings are parsed before sending.
-
id - Sent as configured (a string when set in the config); the number
1when empty.
Output ports
out default The server answered 2xx without an error member. result is the JSON-RPC result.
{
"result": {
"balance": "1250.40",
"currency": "USD"
}
}error The response has a JSON-RPC error (data is { error: { code, message, data? } }), or the request failed (data is { error, response } with a message string).
{
"error": {
"code": -32601,
"message": "Method not found"
}
}In expressions
What a later node can read from this node's output with $("JSON-RPC Client").item.json.<path> (write your node's label instead of JSON-RPC Client). Editor marks the paths the workflow editor suggests under Previous Nodes (the output contract); Worker marks the paths the worker really returns through out, from the output shown in Ports.
| Expression | Editor | Worker |
|---|---|---|
$("JSON-RPC Client").item.json.resultJSON-RPC Result | ||
$("JSON-RPC Client").item.json.result.balance | — | |
$("JSON-RPC Client").item.json.result.currency | — |
— Worker: The worker returns it but the editor does not suggest it: write it by hand. Keys inside objects can depend on your data or configuration (for example one key per label).
Errors
| Message | Port | Cause and fix |
|---|---|---|
connection_id is required | error | No credential selected. |
method is required | error | The method name is empty in the config and in the incoming payload. |
<JSON parse error> | error | params is a string that is not valid JSON. Write a JSON array or object, for example ["acc_001"]. |
Request failed with status code <status> | error | The HTTP call answered non-2xx; response holds the body. |
Input contract
-
connection_idstring Required -
methodstring Required -
paramsstring Optional -
idstring Optional
Output contract
-
resultobject Optional -
JSON-RPC Result
Contracts (JSON Schema)
The definition exactly as the orchestrator declares it. All is the whole *.definition.js; compare it with the sections above to spot differences between the documentation and the schema. Use it to validate a node before you publish.
{
"slug": "io.jsonrpc",
"name": "JSON-RPC Client",
"category": "io",
"version": "1.0.0",
"description": "Call JSON-RPC 2.0 Method.",
"capabilities": [
"jsonrpc",
"api",
"http"
],
"config_schema": {
"type": "object",
"properties": {
"connection_id": {
"type": "string",
"title": "JSON-RPC Credential",
"description": "Credential for the JSON-RPC endpoint. Accepts credentials of type `api-key` or `basic-auth`.",
"ui_widget": "connection_picker",
"ui_options": {
"credential_types": [
"api-key",
"basic-auth"
],
"types": [
"jsonrpc",
"http"
]
}
},
"method": {
"type": "string",
"description": "Method Name"
},
"params": {
"type": "string",
"description": "Parameters (Array/Object as JSON string or array)"
},
"id": {
"type": "string",
"default": "1",
"description": "Request ID"
}
},
"required": [
"connection_id",
"method"
]
},
"input_contract_schema": {
"type": "object",
"properties": {
"connection_id": {
"type": "string"
},
"method": {
"type": "string"
},
"params": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"connection_id",
"method"
]
},
"output_contract_schema": {
"type": "object",
"properties": {
"result": {
"type": "object",
"description": "JSON-RPC Result"
}
}
},
"ports": [
{
"port_id": "out",
"label": "Result",
"description": "JSON-RPC Result",
"is_default": true,
"supports_condition": true
},
{
"port_id": "error",
"label": "Error",
"description": "JSON-RPC Error",
"is_default": false,
"supports_condition": false
}
],
"execution_mode": "async",
"required_resources": [],
"compatible_worker_pools": [
"standard-io"
],
"tags": [
"rpc",
"api"
],
"is_stateful": false,
"publisher": {
"identity": "org_link_loom",
"profile": {
"name": "Link Loom",
"verified": true,
"url": "https://me.veripass.com/link-loom",
"logo_url": null
}
}
}{
"type": "object",
"properties": {
"connection_id": {
"type": "string",
"title": "JSON-RPC Credential",
"description": "Credential for the JSON-RPC endpoint. Accepts credentials of type `api-key` or `basic-auth`.",
"ui_widget": "connection_picker",
"ui_options": {
"credential_types": [
"api-key",
"basic-auth"
],
"types": [
"jsonrpc",
"http"
]
}
},
"method": {
"type": "string",
"description": "Method Name"
},
"params": {
"type": "string",
"description": "Parameters (Array/Object as JSON string or array)"
},
"id": {
"type": "string",
"default": "1",
"description": "Request ID"
}
},
"required": [
"connection_id",
"method"
]
}{
"type": "object",
"properties": {
"connection_id": {
"type": "string"
},
"method": {
"type": "string"
},
"params": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"connection_id",
"method"
]
}{
"type": "object",
"properties": {
"result": {
"type": "object",
"description": "JSON-RPC Result"
}
}
}[
{
"port_id": "out",
"label": "Result",
"description": "JSON-RPC Result",
"is_default": true,
"supports_condition": true
},
{
"port_id": "error",
"label": "Error",
"description": "JSON-RPC Error",
"is_default": false,
"supports_condition": false
}
]Execution
- Execution
async- Stateful
- No
- Credentials
- Resolved on the server from
connection_id; the secret never reaches the workflow. - Capabilities
jsonrpcapihttp- Tags
rpcapi
Notes and limits
- One request per run; batch requests and notifications (requests without
id) are not supported. No timeout and no retries.
Reviewed against the orchestrator code · 31e874b · 2026-11-26