MemoryLookupKeyValue
Defines an in-memory lookup key-value pair.
This object can be configured from the WebUI under Settings › Lookups › In-Memory Key-Values
Fields
namespace
Type:
String· requiredThe namespace of the key
key
Type:
String· required · max length: 255The key name
value
Type:
String· requiredThe key value
isGlobPattern
Type:
Boolean· default:falseWhether the key is a glob pattern
JMAP API
The MemoryLookupKeyValue object is available via the urn:stalwart:jmap capability.
x:MemoryLookupKeyValue/get
This is a standard Foo/get method as defined in RFC 8620, Section 5.1.
This method requires the sysMemoryLookupKeyValueGet permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:MemoryLookupKeyValue/get",
{
"ids": [
"id1"
]
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
x:MemoryLookupKeyValue/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 sysMemoryLookupKeyValueCreate permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:MemoryLookupKeyValue/set",
{
"create": {
"new1": {
"isGlobPattern": false,
"key": "Example",
"namespace": "Example",
"value": "Example"
}
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
Update
This operation requires the sysMemoryLookupKeyValueUpdate permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:MemoryLookupKeyValue/set",
{
"update": {
"id1": {
"namespace": "updated value"
}
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
Destroy
This operation requires the sysMemoryLookupKeyValueDestroy permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:MemoryLookupKeyValue/set",
{
"destroy": [
"id1"
]
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
x:MemoryLookupKeyValue/query
This is a standard Foo/query method as defined in RFC 8620, Section 5.5.
This method requires the sysMemoryLookupKeyValueQuery permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:MemoryLookupKeyValue/query",
{
"filter": {
"namespace": "example"
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
The x:MemoryLookupKeyValue/query filter argument accepts the following conditions (combinable with AnyOf / AllOf / Not per RFC 8620):
| Condition | Kind |
|---|---|
namespace | text |
CLI
stalwart-cli wraps the same JMAP calls. See the CLI reference for installation, authentication, and general usage.
Fetch
stalwart-cli get memory-lookup-key-value id1
Create
stalwart-cli create memory-lookup-key-value \
--field namespace=Example \
--field key=Example \
--field value=Example \
--field isGlobPattern=false
Query
stalwart-cli query memory-lookup-key-value
stalwart-cli query memory-lookup-key-value --where namespace=example
Update
stalwart-cli update memory-lookup-key-value id1 --field description='Updated'
Delete
stalwart-cli delete memory-lookup-key-value --ids id1