Skip to content

SieveScript

Capability: urn:ietf:params:jmap:sieve

Arguments

PropertyTypeRequiredDescription
accountIdAccountIdYesThe account to fetch scripts from.
idsanyNoIDs of specific scripts to fetch. Null or omitted to fetch all scripts.
propertiesanyNoSieveScript properties to include in the response. Null or omitted for all properties.

Response

PropertyTypeRequiredDescription
accountIdAccountIdYesThe account the scripts belong to.
statestringYesThe current state of the SieveScript type.
listSieveScript[]YesThe list of SieveScript objects that were found.
notFoundstring[]YesIDs from the request that could not be found.

Capability: urn:ietf:params:jmap:sieve

Arguments

PropertyTypeRequiredDescription
accountIdAccountIdYesThe account to apply changes to.
ifInStatestring?NoOptimistic concurrency guard. Fails with stateMismatch if the SieveScript state differs.
createobject?NoMap of client-assigned creation ids to SieveScript create objects. name is optional and nullable (defaults to the script id); blobId is required and is an upload id or an sv: id of this account.
updateobject?NoMap of SieveScript id to PatchObject. Only explicitly listed properties are changed; server-set properties may be included only with their current value.
destroyarray?NoSieveScript ids to delete.
onSuccessActivateScriptstring?NoId of the script to activate if every create, update and destroy succeeded. Creation references (#id) are allowed. An invalid or unknown id is ignored.
onSuccessDeactivateScriptbooleanNoIf true and every create, update and destroy succeeded, deactivate the active script. Processed before onSuccessActivateScript.

Response

PropertyTypeRequiredDescription
accountIdAccountIdYesThe account the changes were applied to.
oldStatestring?NoThe SieveScript state before this set, or null if the server cannot calculate it.
newStatestringYesThe SieveScript state after this set.
createdobject?NoSuccessfully created scripts, keyed by client creation id. isActive is true when onSuccessActivateScript activated the script in the same call.
updatedobject?NoMap of successfully updated SieveScript id to the server-side changes from every cause, or null when nothing changed server-side. Contains only changed properties: blobId after a content change, name after a null reset, isActive after activation or deactivation.
destroyedanyNoSieveScript ids that were successfully destroyed.
notCreatedobject?NoCreation ids that failed, with a SetError.
notUpdatedobject?NoSieveScript ids that failed to update, with a SetError.
notDestroyedobject?NoSieveScript ids that failed to destroy, with a SetError.

Capability: urn:ietf:params:jmap:sieve

Arguments

PropertyTypeRequiredDescription
accountIdAccountIdYesThe account to query scripts from.
filteranyNoFilter: a SieveScriptFilterCondition (name: case-insensitive contains; isActive: Boolean) or a FilterOperator over such conditions. Null or omitted returns all scripts.
sortarray?NoSort criteria. Each Comparator has a property (name or isActive), optional isAscending (default true) and optional collation. Supported collations: i;unicode-casemap (the default), i;ascii-casemap and i;octet; any other is unsupportedSort.
positionintegerNoZero-based index of the first id to return. A negative value is an offset from the end of the list (RFC 8620 section 5.5). Ignored when anchor is given.
anchorstring?NoAn id. When given, position is ignored and the first id returned is at the index of this id in the results plus anchorOffset, clamped to 0; an id that is not in the results is the error anchorNotFound (RFC 8620 section 5.5).
anchorOffsetintegerNoIndex of the first id to return relative to the index of the anchor; may be negative. Ignored without an anchor.
limitinteger?NoMaximum number of ids to return. A negative value is invalidArguments.
calculateTotalbooleanNoIf true, return the total number of matching scripts.

Response

PropertyTypeRequiredDescription
accountIdAccountIdYesThe account the query ran against.
queryStatestringYesOpaque state string for the SieveScript query.
canCalculateChangesbooleanYesAlways false: SieveScript/queryChanges is not offered.
positionintegerYes0-based index of the first id in the ids array.
idsId[]YesThe matching SieveScript ids in the requested order.
totalintegerNoTotal number of matching scripts. Only present if calculateTotal was true.
limitintegerNoThe limit applied. Only present if a limit was applied.

Capability: urn:ietf:params:jmap:sieve

Arguments

PropertyTypeRequiredDescription
accountIdAccountIdYesThe account the blob belongs to.
blobIdBlobIdYesUpload blob id, or sv: blob id of this account, of the script content to check.

Response

PropertyTypeRequiredDescription
accountIdAccountIdYesThe account the blob belongs to.
erroranyYesThe SetError describing why the content is invalid, or null if it is valid.