ClusterRole
ClusterRole
Section titled “ClusterRole”Defines a cluster node role with enabled tasks and listeners.
This object can be configured from the WebUI under Settings › Cluster › Roles
Fields
Section titled “Fields”Type:
String· read-onlyUnique identifier for the role
description
Section titled “description”Type:
String?Description of the role
Type:
ClusterTaskGroup· requiredWhich tasks are enabled for this cluster role
listeners
Section titled “listeners”Type:
ClusterListenerGroup· requiredWhich network listeners are enabled for this cluster role
JMAP API
Section titled “JMAP API”The ClusterRole object is available via the urn:stalwart:jmap capability.
x:ClusterRole/get
Section titled “x:ClusterRole/get”This is a standard Foo/get method as defined in RFC 8620, Section 5.1.
This method requires the sysClusterRoleGet permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:ClusterRole/get", { "ids": [ "id1" ] }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'x:ClusterRole/set
Section titled “x:ClusterRole/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
Section titled “Create”This operation requires the sysClusterRoleCreate permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:ClusterRole/set", { "create": { "new1": { "listeners": { "@type": "EnableAll" }, "tasks": { "@type": "EnableAll" } } } }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'Update
Section titled “Update”This operation requires the sysClusterRoleUpdate permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:ClusterRole/set", { "update": { "id1": { "description": "updated value" } } }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'Destroy
Section titled “Destroy”This operation requires the sysClusterRoleDestroy permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:ClusterRole/set", { "destroy": [ "id1" ] }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'x:ClusterRole/query
Section titled “x:ClusterRole/query”This is a standard Foo/query method as defined in RFC 8620, Section 5.5.
This method requires the sysClusterRoleQuery permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:ClusterRole/query", { "filter": { "name": "example" } }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'The x:ClusterRole/query filter argument accepts the following conditions (combinable with AnyOf / AllOf / Not per RFC 8620):
| Condition | Kind |
|---|---|
name | text |
stalwart-cli wraps the same JMAP calls. See the CLI reference for installation, authentication, and general usage.
stalwart-cli get ClusterRole id1Create
Section titled “Create”stalwart-cli create ClusterRole \ --field 'tasks={"@type":"EnableAll"}' \ --field 'listeners={"@type":"EnableAll"}'stalwart-cli query ClusterRolestalwart-cli query ClusterRole --where name=exampleUpdate
Section titled “Update”stalwart-cli update ClusterRole id1 --field description='updated value'Delete
Section titled “Delete”stalwart-cli delete ClusterRole --ids id1Nested types
Section titled “Nested types”ClusterTaskGroup
Section titled “ClusterTaskGroup”Defines which cluster tasks are enabled for a cluster role.
EnableAll: Enable all tasks. No additional fields.DisableAll: Disable all tasks. No additional fields.EnableSome: Enable some tasks. Carries the fields ofClusterTaskGroupProperties.DisableSome: Disable some tasks. Carries the fields ofClusterTaskGroupProperties.
ClusterTaskGroupProperties
Section titled “ClusterTaskGroupProperties”Specifies which tasks are enabled or disabled.
taskTypes
Section titled “taskTypes”Type:
ClusterTaskType[]Tasks to enable or disable for this group
ClusterListenerGroup
Section titled “ClusterListenerGroup”Defines which network listeners are enabled for a cluster role.
EnableAll: Enable all network listeners. No additional fields.DisableAll: Disable all network listeners. No additional fields.EnableSome: Enable some network listeners. Carries the fields ofClusterListenerGroupProperties.DisableSome: Disable some network listeners. Carries the fields ofClusterListenerGroupProperties.
ClusterListenerGroupProperties
Section titled “ClusterListenerGroupProperties”Specifies which listeners are enabled or disabled.
listenerIds
Section titled “listenerIds”Type:
Id<NetworkListener>[]List of network listeners to enable or disable for this group
ClusterTaskType
Section titled “ClusterTaskType”| Value | Label |
|---|---|
storeMaintenance | Store Maintenance |
accountMaintenance | Account Maintenance |
metricsCalculate | Calculate Metrics |
metricsPush | Push Metrics |
pushNotifications | Push Notifications |
searchIndexing | Search Indexing |
spamClassifierTraining | Spam Classifier Training |
outboundMta | Outbound Email MTA |
taskQueueProcessing | Task Queue Processing |
taskScheduler | Task Scheduling |