Sharing
Sharing
Section titled “Sharing”Configures sharing settings for calendars, address books, and files.
This object can be configured from the WebUI under Settings › Files & Sharing › Sharing
Fields
Section titled “Fields”allowDirectoryQueries
Section titled “allowDirectoryQueries”Type:
Boolean· default:falseWhether authenticated users can query the directory via WebDAV and JMAP
maxShares
Section titled “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
Section titled “JMAP API”The Sharing singleton is available via the urn:stalwart:jmap capability.
x:Sharing/get
Section titled “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
Section titled “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" ] }'stalwart-cli wraps the same JMAP calls. See the CLI reference for installation, authentication, and general usage.
stalwart-cli get SharingUpdate
Section titled “Update”stalwart-cli update Sharing --field allowDirectoryQueries=false