Log
Represents a server log entry.
This object can be configured from the WebUI under Management › Observability › Logs
Fields
Section titled “Fields”timestamp
Section titled “timestamp”Type:
UTCDateTime· requiredTimestamp of the log entry
Type:
TracingLevel· requiredSeverity level of the log entry
Type:
EventType· requiredEvent type of the log entry
details
Section titled “details”Type:
Text· requiredLog message
JMAP API
Section titled “JMAP API”The Log object is available via the urn:stalwart:jmap capability.
x:Log/get
Section titled “x:Log/get”This is a standard Foo/get method as defined in RFC 8620, Section 5.1.
This method requires the sysLogGet permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:Log/get", { "ids": [ "id1" ] }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'x:Log/set
Section titled “x:Log/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 sysLogCreate permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:Log/set", { "create": { "new1": { "details": "Example", "level": "error", "timestamp": "2026-01-01T00:00:00Z" } } }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'Update
Section titled “Update”This operation requires the sysLogUpdate permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:Log/set", { "update": { "id1": { "details": "updated value" } } }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'Destroy
Section titled “Destroy”This operation requires the sysLogDestroy permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:Log/set", { "destroy": [ "id1" ] }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'x:Log/query
Section titled “x:Log/query”This is a standard Foo/query method as defined in RFC 8620, Section 5.5.
This method requires the sysLogQuery permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:Log/query", { "filter": { "text": "example" } }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'The x:Log/query filter argument accepts the following conditions (combinable with AnyOf / AllOf / Not per RFC 8620):
| Condition | Kind |
|---|---|
text | text |
stalwart-cli wraps the same JMAP calls. See the CLI reference for installation, authentication, and general usage.
stalwart-cli get Log id1Create
Section titled “Create”stalwart-cli create Log \ --field timestamp=2026-01-01T00:00:00Z \ --field level=error \ --field details=Examplestalwart-cli query Logstalwart-cli query Log --where text=exampleUpdate
Section titled “Update”stalwart-cli update Log id1 --field details='updated value'Delete
Section titled “Delete”stalwart-cli delete Log --ids id1TracingLevel
Section titled “TracingLevel”| Value | Label |
|---|---|
error | Error |
warn | Warning |
info | Info |
debug | Debug |
trace | Trace |