ClusterNode
Represents a node in the cluster
This object can be configured from the WebUI under Management › Cluster
Fields
nodeId
Type:
UnsignedInt· default:1Unique identifier for the node in the cluster
hostname
Type:
String· requiredHostname of the node
lastRenewal
Type:
UTCDateTime· requiredTimestamp of the last lease renewal from this node, used to determine if the node is still active in the cluster
status
Type:
ClusterNodeStatus· requiredCurrent status of the node in the cluster
JMAP API
The ClusterNode object is available via the urn:stalwart:jmap capability.
x:ClusterNode/get
This is a standard Foo/get method as defined in RFC 8620, Section 5.1.
This method requires the sysClusterNodeGet permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:ClusterNode/get",
{
"ids": [
"id1"
]
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
x:ClusterNode/set
This is a standard Foo/set method as defined in RFC 8620, Section 5.3.
Supports create, update, and destroy operations in a single call.
Create
This operation requires the sysClusterNodeCreate permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:ClusterNode/set",
{
"create": {
"new1": {
"hostname": "Example",
"lastRenewal": "2026-01-01T00:00:00Z",
"nodeId": 1,
"status": "active"
}
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
Update
This operation requires the sysClusterNodeUpdate permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:ClusterNode/set",
{
"update": {
"id1": {
"hostname": "updated value"
}
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
Destroy
This operation requires the sysClusterNodeDestroy permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:ClusterNode/set",
{
"destroy": [
"id1"
]
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
x:ClusterNode/query
This is a standard Foo/query method as defined in RFC 8620, Section 5.5.
This method requires the sysClusterNodeQuery permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:ClusterNode/query",
{
"filter": {}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
CLI
stalwart-cli wraps the same JMAP calls. See the CLI reference for installation, authentication, and general usage.
Fetch
stalwart-cli get cluster-node id1
Create
stalwart-cli create cluster-node \
--field nodeId=1 \
--field hostname=Example \
--field lastRenewal=2026-01-01T00:00:00Z \
--field status=active
Query
stalwart-cli query cluster-node
Update
stalwart-cli update cluster-node id1 --field description='Updated'
Delete
stalwart-cli delete cluster-node --ids id1
Enums
ClusterNodeStatus
| Value | Label |
|---|---|
active | Active |
stale | Stale |
inactive | Inactive |