Sharing
Configures sharing settings for calendars, address books, and files.
This object can be configured from the WebUI under Settings › Files & Sharing › Sharing
Fields
allowDirectoryQueries
Type:
Boolean· default:falseWhether authenticated users can query the directory via WebDAV and JMAP
maxShares
Type:
UnsignedInt· default:10· min: 1Specifies the maximum number of sharees that can be added to a single shared item (calendar, address book or file)
JMAP API
The Sharing singleton is available via the urn:stalwart:jmap capability.
x:Sharing/get
This is a standard Foo/get method as defined in RFC 8620, Section 5.1.
For singletons, the ids argument should be the literal singleton (or null to return the single instance).
This method requires the sysSharingGet permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:Sharing/get",
{
"ids": [
"singleton"
]
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
x:Sharing/set
This is a standard Foo/set method as defined in RFC 8620, Section 5.3.
For singletons, only the update argument with id singleton is accepted; create and destroy arguments are rejected.
This method requires the sysSharingUpdate permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:Sharing/set",
{
"update": {
"singleton": {
"allowDirectoryQueries": false
}
}
},
"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 sharing
Update
stalwart-cli update sharing --field description='Updated'