Difference between revisions of "Administration API - Function Reference"

[unchecked revision][pending revision]
 
(126 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<!-- DO NOT EDIT THIS ARTICLE-->
 
<!-- The content is generated from get-metadata2mediawiki.py -->
 
 
__NOTOC__
 
__NOTOC__
  
Line 11: Line 9:
 
! width=120px | Type
 
! width=120px | Type
 
! Description
 
! Description
|-
 
| <tt>instanceID</tt>
 
| string
 
| Unique ID of MailStore instance in which this command is invoked.
 
 
|-
 
|-
 
| <tt>name</tt>
 
| <tt>name</tt>
Line 20: Line 14:
 
| Meaningful name of archive store.
 
| Meaningful name of archive store.
 
|-
 
|-
| <tt>path</tt>
+
| <tt>type</tt>
| string  
+
| string
| Path of directory containing archive store data.
+
| Type of archive store.
 +
|-
 +
| <tt>databaseName</tt>
 +
| string (optional)
 +
| Name of database on Microsoft SQL Server or PostgreSQL server.
 +
|-
 +
| <tt>databasePath</tt>
 +
| string (optional)
 +
| Path to directory in which database folder information and email meta data are stored.
 +
|-
 +
| <tt>contentPath</tt>
 +
| string (optional)
 +
| Path to directory in which email headers and contents are stored.
 +
|-
 +
| <tt>indexPath</tt>
 +
| string (optional)
 +
| Path to directory in which full text search indexes are stored.
 +
|-
 +
| <tt>serverName</tt>
 +
| string (optional)
 +
| Name of Microsoft SQL Server or PostgreSQL server.
 +
|-
 +
| <tt>userName</tt>
 +
| string (optional)
 +
| User name for accessing Microsoft SQL Server or PostgreSQL server.
 +
|-
 +
| <tt>password</tt>
 +
| string (optional)
 +
| Password for accessing Microsoft SQL Server or PostgreSQL server.
 
|-
 
|-
 
| <tt>requestedState</tt>
 
| <tt>requestedState</tt>
Line 31: Line 53:
 
=== Argument Values ===
 
=== Argument Values ===
  
==== requestedState ====
+
==== type ====
 
{| class="wikitable"
 
{| class="wikitable"
 
! width=270px | Name
 
! width=270px | Name
 
! Description
 
! Description
 
|-
 
|-
| <tt>current</tt>
+
| <tt>FileSystemInternal</tt>
| Same as Normal but new messages will be archived in the archive store that is set to Current.
+
| Advanced file system-based archive store.
 
|-
 
|-
| <tt>normal</tt>
+
| <tt>SQLServer</tt>
| The content of archives store is available to users and can be modified if the user has the appropriate permission.
+
| Microsoft SQL Server-based archive store.
 +
|-
 +
| <tt>PostgreSQL</tt>
 +
| PostgreSQL server-based archive store.
 +
|}
 +
 
 +
==== requestedState ====
 +
{| class="wikitable"
 +
! width=270px | Name
 +
! Description
 +
|-
 +
| <tt>current</tt>
 +
| Same as Normal but new messages will be archived in the archive store that is set to Current.
 +
|-
 +
| <tt>normal</tt>
 +
| The content of archives store is available to users and can be modified if the user has the appropriate permission.
 
|-
 
|-
 
| <tt>writeProtected</tt>
 
| <tt>writeProtected</tt>
Line 49: Line 86:
 
|}
 
|}
  
== CompactStore ==
+
== CancelJobAsync ==
Compact archive store.
+
Cancel a running job asynchronously.
  
 
=== Arguments ===
 
=== Arguments ===
Line 57: Line 94:
 
! width=120px | Type
 
! width=120px | Type
 
! Description
 
! Description
|-
 
| <tt>instanceID</tt>
 
| string
 
| Unique ID of MailStore instance in which this command is invoked.
 
 
|-
 
|-
 
| <tt>id</tt>
 
| <tt>id</tt>
 
| number  
 
| number  
| Unique ID of archive store
+
| The unique identifier of the job to be canceled.
 
|}
 
|}
  
== CreateClientAccessServer ==
+
== ClearUserPrivilegesOnFolders ==
Register new client access server.
+
Removes all privileges of a user on all archive folders.
  
 
=== Arguments ===
 
=== Arguments ===
Line 76: Line 109:
 
! Description
 
! Description
 
|-
 
|-
| <tt>config</tt>
+
| <tt>userName</tt>
| json
+
| string
| Configuration of new Client Access Server.
+
| User name of MailStore user.
 
|}
 
|}
  
=== Argument Values ===
+
== CompactMasterDatabase ==
 +
Compact master database.
  
==== config ====
+
== CompactStore ==
<source lang="js" smart-tabs="true" toolbar="false" gutter="false">
+
Compact archive store.
{
 
  "serverName" : string,
 
  "port" : number,
 
  "serverCertificate" : {
 
    "thumbprint" : string
 
  }
 
}
 
</source>
 
 
 
== CreateClientOneTimeUrlForArchiveAdmin ==
 
Create URL including OTP for $archiveadmin access.
 
  
 
=== Arguments ===
 
=== Arguments ===
Line 103: Line 126:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>id</tt>
| string
+
| number
| Unique ID of MailStore instance in which this command is invoked.
+
| Unique ID of archive store
|-
 
| <tt>instanceUrl</tt>
 
| string (optional)
 
| Base URL for accessing instance.
 
 
|}
 
|}
  
== CreateDirectoryOnInstanceHost ==
+
== CreateBackup ==  
Create a directory on an Instance Host
+
Create a backup of the entire archive.
  
 
=== Arguments ===
 
=== Arguments ===
Line 121: Line 140:
 
! Description
 
! Description
 
|-
 
|-
| <tt>serverName</tt>
+
| <tt>path</tt>
| string  
+
| string
| Name of Instance Host.
+
| Path to directory into which the backup should be written.
 
|-
 
|-
| <tt>path</tt>
+
| <tt>excludeSearchIndexes</tt>
| string
+
| bool (optional)
| Path of directory to create.
+
| Indicates whether the search index files should be excluded from the backup.
 
|}
 
|}
  
== CreateInstance ==
+
== CreateJob ==
Create new MailStore instance.
+
Create a new job to execute Management API commands.
  
 
=== Arguments ===
 
=== Arguments ===
Line 139: Line 158:
 
! Description
 
! Description
 
|-
 
|-
| <tt>config</tt>
+
| <tt>name</tt>
| json
+
| string (optional)
| Configuration of new instance.
+
| A meaningful name for the job. Example: ''Daily Backup''.
|}
+
|-
 +
| <tt>action</tt>
 +
| string (optional)
 +
| Management API command to execute.
 +
|-
 +
| <tt>owner</tt>
 +
| string (optional)
 +
| Username of the job owner; must be an administrator.
 +
|-
 +
| <tt>timeZoneId</tt>
 +
| string (optional)
 +
| The id of the time zone the date should be converted to, e.g. ''$Local'', which represents the time zone of the operating system.
 +
|-
 +
| <tt>date</tt>
 +
| string (optional)
 +
| Datetime string (YYYY-MM-DDThh:mm:ss) for running the job once.
 +
|-
 +
| <tt>interval</tt>
 +
| number (optional)
 +
| Interval for running job.
 +
|-
 +
| <tt>time</tt>
 +
| string (optional)
 +
| Time for running job. Without additional parameter, this means daily execution.
 +
|-
 +
| <tt>dayOfWeek</tt>
 +
| string (optional)
 +
| Day of week to run job. Parameter "time" also required.
 +
|-
 +
| <tt>dayOfMonth</tt>
 +
| string (optional)
 +
| Day of month to run job. Parameter "time" also required. dayOfWeek can optionally be used to define further.
 +
|}
 +
 
 +
Use the API command [[Administration_API_-_Function_Reference#GetTimeZones|GetTimeZones]] to retrieve a list of all available time zones and their ids.
  
 
=== Argument Values ===
 
=== Argument Values ===
  
==== config ====
+
==== dayOfWeek ====
<source lang="js" smart-tabs="true" toolbar="false" gutter="false">
 
{
 
  "instanceID" : string,
 
  "alias" : string,
 
  "displayName" : string,
 
  "instanceHost" : string,
 
  "startMode" : string,
 
  "baseDirectory" : string,
 
  "debugLogEnabled" : bool,
 
  "vssWriterEnabled" : bool
 
}
 
</source>
 
 
 
== CreateInstanceHost ==
 
Create a new Instance Host.
 
 
 
=== Arguments ===
 
 
{| class="wikitable"
 
{| class="wikitable"
! width=150px | Name
+
! width=270px | Name
! width=120px | Type
 
 
! Description
 
! Description
 
|-
 
|-
| <tt>config</tt>
+
| <tt>Sunday</tt>
| json
+
| Sunday
| Configuration of new Instance Host.
+
|-
 +
| <tt>Monday</tt>
 +
| Monday
 +
|-
 +
| <tt>Tuesday</tt>
 +
| Tuesday
 +
|-
 +
| <tt>Wednesday</tt>
 +
| Wednesday
 +
|-
 +
| <tt>Thursday</tt>
 +
| Thursday
 +
|-
 +
| <tt>Friday</tt>
 +
| Friday
 +
|-
 +
| <tt>Saturday</tt>
 +
| Saturday
 
|}
 
|}
  
=== Argument Values ===
+
==== dayOfMonth ====
 
 
==== config ====
 
<source lang="js" smart-tabs="true" toolbar="false" gutter="false">
 
{
 
  "serverName" : string,
 
  "port" : number,
 
  "serverCertificate" : {
 
    "thumbprint" : string
 
  }
 
}
 
</source>
 
 
 
== CreateLicenseRequest ==
 
Create and return data of a license request.
 
 
 
== CreateStore ==
 
Create and attach a new archive store.
 
 
 
=== Arguments ===
 
 
{| class="wikitable"
 
{| class="wikitable"
! width=150px | Name
+
! width=270px | Name
! width=120px | Type
 
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>1 to 31</tt>
| string
+
| Numeric representation of day of month.
| Unique ID of MailStore instance in which this command is invoked.
 
 
|-
 
|-
| <tt>name</tt>
+
| <tt>Last</tt>
| string
+
| Last day of month.
| Meaningful name of archive store.
 
|-
 
| <tt>path</tt>
 
| string
 
| Path of directory containing archive store data.
 
|-
 
| <tt>requestedState</tt>
 
| string (optional)
 
| State of archive store after attaching.
 
 
|}
 
|}
  
=== Argument Values ===
+
==== interval ====
 
 
==== requestedState ====
 
 
{| class="wikitable"
 
{| class="wikitable"
 
! width=270px | Name
 
! width=270px | Name
 
! Description
 
! Description
 
|-
 
|-
| <tt>current</tt>
+
| <tt>5</tt>
| Same as Normal but new messages will be archived in the archive store that is set to Current.
+
| Every 5 minutes.
 +
|-
 +
| <tt>10</tt>
 +
| Every 10 minutes.
 +
|-
 +
| <tt>15</tt>
 +
| Every 15 minutes.
 +
|-
 +
| <tt>20</tt>
 +
| Every 20 minutes.
 
|-
 
|-
| <tt>normal</tt>
+
| <tt>30</tt>
| The content of archives store is available to users and can be modified if the user has the appropriate permission.
+
| Every 30 minutes.
 
|-
 
|-
| <tt>writeProtected</tt>
+
| <tt>60</tt>
| The content of write protected archive stores is available to users, but cannot be modified (e.g. delete or move messages, rename or move folders)
+
| Every hour.
 
|-
 
|-
| <tt>disabled</tt>
+
| <tt>120</tt>
| Disabled archive stores are not in use but the instance still knows about their existence. Therefore the content is not available to users.
+
| Every 2 hours.
|}
+
|-
 +
| <tt>180</tt>
 +
| Every 3 hours.
 +
|-
 +
| <tt>240</tt>
 +
| Every 4 hours.
 +
|-
 +
| <tt>360</tt>
 +
| Every 6 hours.
 +
|-
 +
| <tt>720</tt>
 +
| Every 12 hours.
 +
|}
  
== CreateSystemAdministrator ==
+
== CreateProfile ==
Create a new SPE system administrator.
+
Create a new archiving or exporting profile.
  
 
=== Arguments ===
 
=== Arguments ===
Line 245: Line 286:
 
! Description
 
! Description
 
|-
 
|-
| <tt>config</tt>
+
| <tt>properties</tt>
 
| json  
 
| json  
| Configuration of new SPE system administrator.
+
| Profile properties.
 
|-
 
|-
| <tt>password</tt>
+
| <tt>raw</tt>
| string
+
| bool
| Password of new SPE system administrator.
+
| Currently only 'true' is supported.
 
|}
 
|}
  
 
=== Argument Values ===
 
=== Argument Values ===
  
==== config ====
+
==== properties ====
<source lang="js" smart-tabs="true" toolbar="false" gutter="false">
+
To receive available profile properties create a profile of the desired type via MailStore Client and then use the GetProfiles method to receive supported values. The properties ''id'' and ''version'' must be omitted, the password field must be filled properly.
{
 
  "userName" : string,
 
  "fullName" : string
 
}
 
</source>
 
  
== DeleteClientAccessServer ==
+
== CreateStore ==
Delete Client Access Server from management database.
+
Create and attach a new archive store.
  
 
=== Arguments ===
 
=== Arguments ===
Line 273: Line 309:
 
! Description
 
! Description
 
|-
 
|-
| <tt>serverName</tt>
+
| <tt>name</tt>
 
| string  
 
| string  
| Name of Client Access Server.
+
| Meaningful name of archive store.
 +
|-
 +
| <tt>type</tt>
 +
| string (optional)
 +
| Type of archive store.
 +
|-
 +
| <tt>databaseName</tt>
 +
| string (optional)
 +
| Name of database on Microsoft SQL Server or PostgreSQL server.
 +
|-
 +
| <tt>databasePath</tt>
 +
| string (optional)
 +
| Path to directory in which database folder information and email meta data are stored.
 +
|-
 +
| <tt>contentPath</tt>
 +
| string (optional)
 +
| Path to directory in which email headers and contents are stored.
 +
|-
 +
| <tt>indexPath</tt>
 +
| string (optional)
 +
| Path to directory in which full text search indexes are stored.
 +
|-
 +
| <tt>serverName</tt>
 +
| string (optional)
 +
| Name of Microsoft SQL Server or PostgreSQL server.
 +
|-
 +
| <tt>userName</tt>
 +
| string (optional)
 +
| User name for accessing Microsoft SQL Server or PostgreSQL server.
 +
|-
 +
| <tt>password</tt>
 +
| string (optional)
 +
| Password for accessing Microsoft SQL Server or PostgreSQL server.
 +
|-
 +
| <tt>requestedState</tt>
 +
| string (optional)
 +
| State of archive store after attaching.
 
|}
 
|}
  
== DeleteInstanceHost ==
+
=== Argument Values ===
Delete Instance Host from management database.
 
  
=== Arguments ===
+
==== type ====
 
{| class="wikitable"
 
{| class="wikitable"
! width=150px | Name
+
! width=270px | Name
! width=120px | Type
 
 
! Description
 
! Description
 
|-
 
|-
| <tt>serverName</tt>
+
| <tt>FileSystemInternal</tt>
| string
+
| Standard archive store.
| Name of Instance Host.
+
|-
|}
+
| <tt>SQLServer</tt>
 
+
| Microsoft SQL Server-based archive store.
== DeleteInstances ==
 
Delete one or multiple MailStore Instances
 
 
 
=== Arguments ===
 
{| class="wikitable"
 
! width=150px | Name
 
! width=120px | Type
 
! Description
 
 
|-
 
|-
| <tt>instanceFilter</tt>
+
| <tt>PostgreSQL</tt>
| string
+
| PostgreSQL server-based archive store.
| Instance filter string.
 
 
|}
 
|}
  
=== Argument Values ===
+
==== requestedState ====
 
 
==== instanceFilter ====
 
 
{| class="wikitable"
 
{| class="wikitable"
 
! width=270px | Name
 
! width=270px | Name
 
! Description
 
! Description
 
|-
 
|-
| <tt>*</tt>
+
| <tt>current</tt>
| All instances
+
| Same as Normal but new messages will be archived in the archive store that is set to Current.
 
|-
 
|-
| <tt>instance01 instance02 instance03</tt>
+
| <tt>normal</tt>
| instance01, instance02 and instance03
+
| The content of archives store is available to users and can be modified if the user has the appropriate permission.
 
|-
 
|-
| <tt>*instancehost01 *instancehost02</tt>
+
| <tt>writeProtected</tt>
| All instances on instancehost1 and instancehost2
+
| The content of write protected archive stores is available to users, but cannot be modified (e.g. delete or move messages, rename or move folders)
 
|-
 
|-
| <tt>* .running</tt>
+
| <tt>disabled</tt>
| All running instances
+
| Disabled archive stores are not in use but the instance still knows about their existence. Therefore the content is not available to users.
|-
 
| <tt>* .stopped</tt>
 
| All stopped instances
 
 
|}
 
|}
  
== DeleteSystemAdministrator ==
+
== CreateUser ==
Delete SPE system administrator.
+
Create new MailStore user. Use [[Administration_API_-_Function_Reference#SetUserPrivilegesOnFolder|SetUserPrivilegesOnFolder]] to grant that user privileges on the user's own archive.
  
 
=== Arguments ===
 
=== Arguments ===
Line 340: Line 396:
 
| <tt>userName</tt>
 
| <tt>userName</tt>
 
| string  
 
| string  
| User name of SPE system administrator.
+
| User name of new MailStore user.
|}
 
 
 
== DetachStore ==
 
Detach archive store
 
 
 
=== Arguments ===
 
{| class="wikitable"
 
! width=150px | Name
 
! width=120px | Type
 
! Description
 
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>privileges</tt>
 
| string  
 
| string  
| Unique ID of MailStore instance in which this command is invoked.
+
| Comma separated list of privileges.
 +
|-
 +
| <tt>fullName</tt>
 +
| string (optional)
 +
| Full name of user.
 
|-
 
|-
| <tt>id</tt>
+
| <tt>distinguishedName</tt>
| number
+
| string (optional)
| Unique ID of archive store.
+
| LDAP DN string.
|}
+
|-
 
+
| <tt>authentication</tt>
== FreezeInstances ==
+
| string (optional)
Freeze a MailStore Instance
+
| Authentication setting for user: 'integrated or 'directoryServices'.
 +
|-
 +
| <tt>password</tt>
 +
| string (optional)
 +
| Password of new user.
 +
|-
 +
| <tt>loginPrivileges</tt>
 +
| string (optional)
 +
| Comma separated list of log in privileges. If not given, all login privileges are assigned.
 +
|}
 +
 
 +
=== Argument Values ===
 +
 
 +
==== privileges ====
 +
{{Administration_API_User_Privileges}}
 +
 
 +
 
 +
==== loginPrivileges ====
 +
{{Administration_API_User_Login_Privileges}}
 +
 
 +
== DeleteAppPasswords ==
 +
Deletes all app passwords of a user, hence all non-interactive logins will fail and have to be reconfigured by the user.
  
 
=== Arguments ===
 
=== Arguments ===
Line 370: Line 441:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceFilter</tt>
+
| <tt>userName</tt>
| string  
+
| string
| Instance filter string.
+
| The user name of the user whose app passwords shall be deleted.
 
|}
 
|}
  
=== Argument Values ===
+
== DeleteEmptyFolders ==
 +
Remove folders from folder tree that do not contain emails.
  
==== instanceFilter ====
+
=== Arguments ===
 
{| class="wikitable"
 
{| class="wikitable"
! width=270px | Name
+
! width=150px | Name
 +
! width=120px | Type
 
! Description
 
! Description
 
|-
 
|-
| <tt>*</tt>
+
| <tt>folder</tt>
| All instances
+
| string (optional)
|-
+
| Entry point in folder tree.
| <tt>instance01 instance02 instance03</tt>
 
| instance01, instance02 and instance03
 
|-
 
| <tt>*instancehost01 *instancehost02</tt>
 
| All instances on instancehost1 and instancehost2
 
|-
 
| <tt>* .running</tt>
 
| All running instances
 
|-
 
| <tt>* .stopped</tt>
 
| All stopped instances
 
 
|}
 
|}
  
== GetArchiveAdminEnabled ==
+
== DeleteJob ==
Get currrent state of archive admin access.
+
Deletes a job.
  
 
=== Arguments ===
 
=== Arguments ===
Line 407: Line 469:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>id</tt>
| string  
+
| string
| Unique ID of MailStore instance in which this command is invoked.
+
| The unique identifier of the job to be deleted.
 
|}
 
|}
  
== GetClientAccessServers ==
+
== DeleteMessage ==
Get list of Client Access Servers.
+
Delete a single message
  
 
=== Arguments ===
 
=== Arguments ===
Line 421: Line 483:
 
! Description
 
! Description
 
|-
 
|-
| <tt>serverNameFilter</tt>
+
| <tt>id</tt>
| string (optional)
+
| string
| Server name filter string.
+
| Unique ID of message. Format: <store_id>:<message_num>
|-
 
| <tt>withServiceStatus</tt>
 
| bool
 
| Include service status or not.
 
|}
 
 
 
=== Argument Values ===
 
 
 
==== serverNameFilter ====
 
{| class="wikitable"
 
! width=270px | Name
 
! Description
 
 
|-
 
|-
| <tt>null</tt>
+
| <tt>reason</tt>
| All servers
+
| string
|-
+
| The reason why that message has to be deleted which will be written into the audit log.
| <tt>serverName</tt>
 
| Only the given serverName. Must match exactly.
 
 
|}
 
|}
  
== GetDirectoriesOnInstanceHost ==
+
== DeleteProfile ==
Get file system directory structure from Instance Host.
+
Delete an archiving or exporting profile.
  
 
=== Arguments ===
 
=== Arguments ===
Line 453: Line 501:
 
! Description
 
! Description
 
|-
 
|-
| <tt>serverName</tt>
+
| <tt>id</tt>
| string
+
| number
| Name of Instance Host.
+
| Unique ID of profile.
|-
 
| <tt>path</tt>
 
| string (optional)
 
| Path of directory to obtain subdirectories from.
 
 
|}
 
|}
  
== GetEnvironmentInfo ==
+
== DeleteUser ==
Return general information about SPE environment.
+
Delete a MailStore user.
 
+
Neither the user's archive nor the user's archive emails are deleted when deleting a user.
== GetIndexConfiguration ==
 
Get list of attachment file types to index.
 
  
 
=== Arguments ===
 
=== Arguments ===
Line 474: Line 516:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>userName</tt>
 
| string  
 
| string  
| Unique ID of MailStore instance in which this command is invoked.
+
| User name of MailStore user.
 
|}
 
|}
  
== GetInstanceConfiguration ==
+
== DetachStore ==
Get configuration of MailStore Instance.
+
Detach an archive store.
  
 
=== Arguments ===
 
=== Arguments ===
Line 488: Line 530:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>id</tt>
| string
+
| number
| Unique ID of MailStore instance in which this command is invoked.
+
| Unique ID of archive store.
 
|}
 
|}
  
== GetInstanceHosts ==
+
== DisableMFA ==
Get list of Instance Hosts.
+
Disables multi-factor authentication of a user.
  
 
=== Arguments ===
 
=== Arguments ===
Line 502: Line 544:
 
! Description
 
! Description
 
|-
 
|-
| <tt>serverNameFilter</tt>
+
| <tt>userName</tt>
| string (optional)
+
| string  
| Server name filter string.
+
| The user name of the user for whom MFA shall be disabled.
 
|}
 
|}
  
=== Argument Values ===
+
[[Administration_API_-_Function_Reference#InitializeMFA|InitializeMFA]] enables multi-factor authentication of a user.
 +
 
 +
== GetActiveSessions ==
 +
Get list of current user sessions.
 +
 
 +
== GetChildFolders ==
 +
Get child folders.
 +
Depending on compliance settings this method may return only the first folder hierarchy level.
  
==== serverNameFilter ====
+
=== Arguments ===
 
{| class="wikitable"
 
{| class="wikitable"
! width=270px | Name
+
! width=150px | Name
 +
! width=120px | Type
 
! Description
 
! Description
 
|-
 
|-
| <tt>null</tt>
+
| <tt>folder</tt>
| All servers
+
| string (optional)
 +
| Parent folder whose child folders should be returned. If omitted, all archives and folder will be returned.
 
|-
 
|-
| <tt>serverName</tt>
+
| <tt>maxLevels</tt>
| Only the given serverName. Must match exactly.
+
| number (optional)
 +
| Depth of child folders.
 
|}
 
|}
  
== GetInstanceProcessLiveStatistics ==
+
== GetComplianceConfiguration ==
Get live statistics from instance process.
+
Get current compliance configuration settings.
 +
 
 +
== CreateCredential ==
 +
Create a new credential object that can be used by directory configuration settings or profiles.
  
 
=== Arguments ===
 
=== Arguments ===
Line 530: Line 585:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>type</tt>
| string  
+
| string
| Unique ID of MailStore instance in which this command is invoked.
+
| Credential type. Supported values are:<br/>
 +
* <tt>Office365_Modern</tt> – credential for authenticating against Entra ID (Office 365 modern authentication).<br/>
 +
* <tt>SignedEnvelope</tt> – credential used for an export to MailStore Cloud.
 +
|-
 +
| <tt>description</tt>
 +
| string
 +
| Human readable description of the credential.
 +
|-
 +
| <tt>tenantId</tt>
 +
| string (optional)
 +
| Tenant identifier used for Office365_Modern type credentials.
 +
|-
 +
| <tt>applicationId</tt>
 +
| string (optional)
 +
| Application/client identifier used for Office365_Modern type credentials.
 
|}
 
|}
  
== GetInstances ==
+
== DeleteCredential ==
Get list of instances.
+
Delete an existing credential object.
  
 
=== Arguments ===
 
=== Arguments ===
Line 544: Line 613:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceFilter</tt>
+
| <tt>id</tt>
| string
+
| int
| Instance filter string.
+
| Unique ID of the credential to delete.
 
|}
 
|}
  
=== Argument Values ===
+
== GetCredential ==
 +
Get details of a single credential object.
  
==== instanceFilter ====
+
=== Arguments ===
 
{| class="wikitable"
 
{| class="wikitable"
! width=270px | Name
+
! width=150px | Name
 +
! width=120px | Type
 
! Description
 
! Description
 
|-
 
|-
| <tt>*</tt>
+
| <tt>id</tt>
| All instances
+
| int
|-
+
| Unique ID of the credential whose details should be returned.
| <tt>instance01 instance02 instance03</tt>
 
| instance01, instance02 and instance03
 
|-
 
| <tt>*instancehost01 *instancehost02</tt>
 
| All instances on instancehost1 and instancehost2
 
|-
 
| <tt>* .running</tt>
 
| All running instances
 
|-
 
| <tt>* .stopped</tt>
 
| All stopped instances
 
 
|}
 
|}
  
== GetInstanceStatistics ==
+
== GetCredentials ==
Get archive statistics from instance.
+
Get the list of all credential objects and their details.
 +
 
 +
== SetCredentialDescription ==
 +
Set the description of an existing credential object.
  
 
=== Arguments ===
 
=== Arguments ===
Line 581: Line 644:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>id</tt>
| string
+
| int
| Unique ID of MailStore instance in which this command is invoked.
+
| Unique ID of the credential to modify.
 +
|-
 +
| <tt>description</tt>
 +
| string
 +
| New human readable description of the credential.
 
|}
 
|}
  
== GetServiceStatus ==
+
== SetCredentialSettings ==
Get current status of all SPE services.
+
Change configuration settings of an existing credential object.
 
 
== GetStoreAutoCreateConfiguration ==
 
Get automatic archive store creation settings.
 
  
 
=== Arguments ===
 
=== Arguments ===
Line 598: Line 662:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>id</tt>
| string
+
| int
| Unique ID of MailStore instance in which this command is invoked.
+
| Unique ID of the credential to modify.
 +
|-
 +
| <tt>createNewCertificate</tt>
 +
| bool (optional)
 +
| Indicates whether a new certificate should be created for this credential (<tt>true</tt>) or the existing certificate settings should be kept (<tt>false</tt>).
 +
|-
 +
| <tt>tenantId</tt>
 +
| string (optional)
 +
| Tenant identifier used for Office365_Modern type credentials.
 +
|-
 +
| <tt>applicationId</tt>
 +
| string (optional)
 +
| Application/client identifier used for Office365_Modern type credentials.
 
|}
 
|}
  
== GetStores ==
+
== GetDirectoryServicesConfiguration ==
Get list of archive stores.
+
Get current Directory Services configuration settings.
  
=== Arguments ===
+
== GetFolderStatistics ==
 +
Get folder statistics.
 +
 
 +
== GetJobResults ==
 +
Retrieves list of finished job executions.
 +
 
 +
=== Arguments ===
 
{| class="wikitable"
 
{| class="wikitable"
 
! width=150px | Name
 
! width=150px | Name
Line 612: Line 694:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>fromIncluding</tt>
 
| string  
 
| string  
| Unique ID of MailStore instance in which this command is invoked.
+
| Beginning of time range to fetch.
 +
|-
 +
| <tt>toExcluding</tt>
 +
| string
 +
| End of time range to fetch.
 +
|-
 +
| <tt>timeZoneId</tt>
 +
| string
 +
| The id of the time zone the date should be converted to, e.g. $Local, which represents the time zone of the operating system.
 +
|-
 +
| <tt>jobId</tt>
 +
| number (optional)
 +
| The job id for which to retrieve results.
 
|}
 
|}
  
== GetSystemAdministrators ==
+
Interactive Management Shell Example: ''GetJobResults --fromIncluding="2022-12-01T00:00:00" --toExcluding="2023-01-01T00:00:00" --timeZoneId="$Local" --jobId=1''
Get list of system administrators.
+
 
 +
Use the API command [[Administration_API_-_Function_Reference#GetTimeZones|GetTimeZones]] to retrieve a list of all available time zones and their ids.
 +
 
 +
== GetJobs ==
 +
Retrieve list of jobs.
 +
 
 +
== GetLicenseInformation ==
 +
Retrieve license information.
  
== MaintainFileSystemDatabases ==
+
Example license information object:
Execute maintenance task on archive store databases.
+
 
 +
{
 +
  "productKey": "YOUR-MAIL-STORE-PRODUCT-KEY",
 +
  "productVersion": "13.1.0.12345",
 +
  "maxNamedUsers": 100,
 +
  "namedUsers": 95,
 +
  "unusedNamedUsers": 5,
 +
  "supportExpiryDate": "2023-12-31",
 +
  "supportLevel": "Premium Service",
 +
  "validFrom": null,
 +
  "validTo": null,
 +
  "licensedTo": "MailStore Software GmbH",
 +
  "machineName": "MAILSTORE"
 +
}
 +
 
 +
The properties ''validFrom'' and ''validTo'' are only set when Trial or NFR product keys are used.
 +
 
 +
== GetMessages ==
 +
Get list of messages from a folder.
  
 
=== Arguments ===
 
=== Arguments ===
Line 629: Line 748:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>folder</tt>
| string  
+
| string (optional)
| Unique ID of MailStore instance in which this command is invoked.
+
| Folder whose content to list.
 
|}
 
|}
  
== MergeStore ==
+
== GetProfiles ==
Merge two archive stores.
+
Get list of archiving and exporting profiles.
  
 
=== Arguments ===
 
=== Arguments ===
Line 643: Line 762:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>raw</tt>
| string
+
| bool
| Unique ID of MailStore instance in which this command is invoked.
+
| Currently only 'true' is supported.
|-
 
| <tt>id</tt>
 
| number
 
| Unique ID of destination archive store.
 
|-
 
| <tt>sourceId</tt>
 
| number
 
| Unique ID of source archive store.
 
 
|}
 
|}
  
== PairWithManagementServer ==
+
== GetRetentionPolicies ==
Pair server role with Management Server.
+
Get the retention policies.
 +
 
 +
Example retention policies object:
 +
 
 +
[
 +
  {
 +
    "name": "Keep All Mails for 10 Years",
 +
    "order": 1,
 +
    "enabled": true,
 +
    "searchCriteria": {
 +
      "from": null,
 +
      "to": null,
 +
      "query": null,
 +
      "queryAttachmentContents": false,
 +
      "queryAttachments": false,
 +
      "queryMessageBody": false,
 +
      "querySubject": false,
 +
      "includedArchives": null,
 +
      "excludedArchives": [
 +
        "admin"
 +
        ]
 +
      },
 +
    "period": 10,
 +
    "periodInterval": "year",
 +
    "referenceDateType": "ArchiveDate",
 +
    "delete": false
 +
  }
 +
]
 +
 
 +
The ''referenceDateType'' can bei either ''ArchiveDate'' or ''MessageDate''.
 +
 
 +
== GetServerInfo ==
 +
Get MailStore Server version and machine name.
 +
 
 +
== GetServiceConfiguration ==
 +
Get MailStore Server service configuration. This includes the path to the Master Database, the location of the audit log, whether the different debug logs are enabled and the endpoint configuration.
 +
 
 +
== GetSmtpSettings ==
 +
Get current SMTP configuration.
 +
 
 +
== GetStoreAutoCreateConfiguration ==
 +
Get automatic archive store creation settings.
 +
 
 +
== GetStoreIndexes ==
 +
Get list of full text indexes.
  
 
=== Arguments ===
 
=== Arguments ===
Line 665: Line 820:
 
! Description
 
! Description
 
|-
 
|-
| <tt>serverType</tt>
+
| <tt>id</tt>
| string
+
| number (optional)
| Type of server role.
+
| Unique ID of archive store.
|-
 
| <tt>serverName</tt>
 
| string
 
| Name of server that hosts 'serverType' role.
 
|-
 
| <tt>port</tt>
 
| number
 
| TCP port on which 'serverType' role on 'serverName' accepts connections.
 
|-
 
| <tt>thumbprint</tt>
 
| string
 
| Thumbprint of SSL certificate used by serverType' role on 'serverName'
 
 
|}
 
|}
  
=== Argument Values ===
+
== GetStores ==
 +
Get list of archive stores.
  
==== serverType ====
+
=== Arguments ===
 
{| class="wikitable"
 
{| class="wikitable"
! width=270px | Name
+
! width=150px | Name
 +
! width=120px | Type
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceHost</tt>
+
| <tt>includeSize</tt>
| Pairing an Instance Host.
+
| bool (optional)
|-
+
| Includes size of archive store. Default: ''true''. May be slow when running on slow hardware.
| <tt>clientAccessServer</tt>
 
| Pairing a Client Access Server.
 
 
|}
 
|}
  
== Ping ==
+
== GetTimeZones ==
Send a keep alive packet.
+
Get the list of available time zones and their IDs.
 +
 
 +
The ''id'' of the output can be used as ''timeZoneId'' in [[Administration_API_-_Function_Reference#CreateJob|CreateJob]], [[Administration_API_-_Function_Reference#GetJobResults|GetJobResults]], [[Administration_API_-_Function_Reference#SetJobSchedule|SetJobSchedule]] and [[Administration_API_-_Function_Reference#SendStatusReport|SendStatusReport]] and as ''timeZoneID'' (with a capital ''ID'') in [[Administration_API_-_Function_Reference#GetWorkerResults|GetWorkerResults]].
  
== RebuildSelectedStoreIndexes ==
+
== GetUserInfo ==
Rebuild search indexes of selected archive stores.
+
Get detailed information about user.
  
 
=== Arguments ===
 
=== Arguments ===
Line 708: Line 853:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>userName</tt>
 
| string  
 
| string  
| Unique ID of MailStore instance in which this command is invoked.
+
| User name of MailStore user
 
|}
 
|}
  
== RefreshAllStoreStatistics ==
+
== GetUsers ==
Refresh archive store statistics.
+
Get list of users.
 +
 
 +
== GetWorkerResults ==
 +
Get results of profile executions.
  
 
=== Arguments ===
 
=== Arguments ===
Line 722: Line 870:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>fromIncluding</tt>
 
| string  
 
| string  
| Unique ID of MailStore instance in which this command is invoked.
+
| Beginning of time range to fetch.
|}
 
 
 
== RenameStore ==
 
Rename archvive store
 
 
 
=== Arguments ===
 
{| class="wikitable"
 
! width=150px | Name
 
! width=120px | Type
 
! Description
 
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>toExcluding</tt>
 
| string  
 
| string  
| Unique ID of MailStore instance in which this command is invoked.
+
| End of time range to fetch.
 
|-
 
|-
| <tt>id</tt>
+
| <tt>timeZoneID</tt>
| number
+
| string
| Unique ID of archive store.
+
| The id of the time zone the date should be converted to, e.g. $Local, which represents the time zone of the operating system.
 
|-
 
|-
| <tt>name</tt>
+
| <tt>profileID</tt>
| string  
+
| number (optional)
| New name of archive store.
+
| Filter results by given profile ID.
 +
|-
 +
| <tt>userName</tt>
 +
| string (optional)
 +
| If given, must be equal to the current username. Filters results by current user.
 
|}
 
|}
  
== RestartInstances ==
+
Interactive Management Shell Example: ''GetWorkerResults --fromIncluding="2022-01-01T00:00:00" --toExcluding="2023-01-01T00:00:00" --timeZoneID="$Local" --profileID=1 --userName="admin"''
Restart one or multiple instances.
+
 
 +
Use the API command [[Administration_API_-_Function_Reference#GetTimeZones|GetTimeZones]] to retrieve a list of all available time zones and their ids.
 +
 
 +
Be aware that ''timeZoneID'' has to be written with a capital ''ID'' where all other commands with a ''timeZoneId'' are expecting ''Id''.
 +
 
 +
== GetWorkerResultReport ==
 +
Get the details of a profile execution result.
  
 
=== Arguments ===
 
=== Arguments ===
Line 758: Line 906:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceFilter</tt>
+
| <tt>id</tt>
| string
+
| number
| Instance filter string.
+
| The ID of the result for which the details should be fetched.
 
|}
 
|}
  
=== Argument Values ===
+
Use the [[Administration_API_-_Function_Reference#GetWorkerResults|GetWorkerResults]] command to get the IDs of results.
  
==== instanceFilter ====
+
== InitializeMFA ==
{| class="wikitable"
+
Initializes multi-factor authentication of a user. During the next login with an MFA-capable client, the user has to scan a QR code with a TOTP compatible app and has to enter an MFA code to be able to login.
! width=270px | Name
+
When ''InitializeMFA'' is called when MFA is already active for a user, a new secret is generated and the user has to scan the QR code again. This also invalidates all trusted device tokens of a user.
! Description
 
|-
 
| <tt>*</tt>
 
| All instances
 
|-
 
| <tt>instance01 instance02 instance03</tt>
 
| instance01, instance02 and instance03
 
|-
 
| <tt>*instancehost01 *instancehost02</tt>
 
| All instances on instancehost1 and instancehost2
 
|-
 
| <tt>* .running</tt>
 
| All running instances
 
|-
 
| <tt>* .stopped</tt>
 
| All stopped instances
 
|}
 
 
 
== RetryOpenStores ==
 
Retry opening stores that failed previously
 
  
 
=== Arguments ===
 
=== Arguments ===
Line 795: Line 923:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>userName</tt>
 
| string  
 
| string  
| Unique ID of MailStore instance in which this command is invoked.
+
| The user name of the user for whom MFA shall be initialized.
 
|}
 
|}
  
== SelectAllStoreIndexesForRebuild ==
+
[[Administration_API_-_Function_Reference#DisableMFA|DisableMFA]] disables multi-factor authentication of a user.
Select all archive store for rebuild.
+
 
 +
== MaintainFileSystemDatabases ==
 +
Run database maintenance on all databases of file system based archive stores.
 +
 
 +
== MergeStore ==
 +
Merge two archive stores.
  
 
=== Arguments ===
 
=== Arguments ===
Line 809: Line 942:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>id</tt>
| string
+
| number
| Unique ID of MailStore instance in which this command is invoked.
+
| Unique ID of destination archive store.
 +
|-
 +
| <tt>sourceId</tt>
 +
| number
 +
| Unique ID of source archive store.
 
|}
 
|}
  
== SetArchiveAdminEnabled ==
+
== MoveFolder ==
Enable or disable archive admin access.
+
Move folder.
  
 
=== Arguments ===
 
=== Arguments ===
Line 823: Line 960:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>fromFolder</tt>
 
| string  
 
| string  
| Unique ID of MailStore instance in which this command is invoked.
+
| Old folder name.
 
|-
 
|-
| <tt>enabled</tt>
+
| <tt>toFolder</tt>
| bool
+
| string
| Enable or disable flag.
+
| New folder name.
 
|}
 
|}
  
== SetClientAccessServerConfiguration ==
+
== ProcessRetentionPolicies ==
Set the configuration of a Client Access Server.
+
Processes the configured retention policies.
  
=== Arguments ===
+
== RebuildSelectedStoreIndexes ==
 +
Rebuild all full-text indexes selected for rebuild.
 +
 
 +
== RebuildStoreIndex ==
 +
Rebuild search index for given archive folder.
 +
 
 +
=== Arguments ===
 
{| class="wikitable"
 
{| class="wikitable"
 
! width=150px | Name
 
! width=150px | Name
Line 841: Line 984:
 
! Description
 
! Description
 
|-
 
|-
| <tt>config</tt>
+
| <tt>id</tt>
| json
+
| number
| Client Access Server configuration.
+
| Unique ID of archive store.
 +
|-
 +
| <tt>folder</tt>
 +
| string
 +
| Name of folder name.
 
|}
 
|}
  
=== Argument Values ===
+
== RecoverStore ==
 
+
Recreates a broken Firebird database from recovery records. The archive store must have been upgraded to the latest version and the recovery records must not be corrupt. The archive store must be in the ''Disabled'' or ''Error'' state.
==== config ====
 
<source lang="js" smart-tabs="true" toolbar="false" gutter="false">
 
{
 
  "serverName" : string,
 
  "port" : number,
 
  "serverCertificate" : {
 
    "thumbprint" : string
 
  }
 
}
 
</source>
 
 
 
== SetIndexConfiguration ==
 
Set full text search index configuration.
 
  
 
=== Arguments ===
 
=== Arguments ===
Line 868: Line 1,002:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>id</tt>
| string
+
| number
| Unique ID of MailStore instance in which this command is invoked.
+
| Unique ID of archive store.
 +
|-
 +
| <tt>encryptionKey</tt>
 +
| string (optional)
 +
| Encryption key of the archive store. Must be given, when the encryption key cannot be read from the key file of the archive store.
 
|-
 
|-
| <tt>config</tt>
+
| <tt>recoverDeletedMessages</tt>
| json
+
| bool (optional)
| Full text search index configuration.
+
| Defines whether to recover deleted messages.
 
|}
 
|}
  
=== Argument Values ===
+
When the ''recoverDeletedMessages'' parameter is set to ''true'', only deleted messages that still have leftovers in the recovery records can be recovered. When an archive store has been compacted with [[#CompactStore|CompactStore]] or recovery record files have grown to their auto-compacting size of 32 MiB these leftovers could already be removed and deleted messages cannot be recovered.
  
==== config ====
+
== RecreateRecoveryRecords ==
Use GetIndexConfiguration to reveive supported value.
+
Recreates broken Recovery Records of an archive store. Use [[#VerifyStore|VerifyStore]] or [[#VerifyStores|VerifyStores]] to verify the state of the Recovery Records. Cannot be used for external archive stores that store their content in the database.
 
 
== SetInstanceConfiguration ==
 
Set configuration of MailStore Instance.
 
  
 
=== Arguments ===
 
=== Arguments ===
Line 891: Line 1,026:
 
! Description
 
! Description
 
|-
 
|-
| <tt>config</tt>
+
| <tt>id</tt>
| json
+
| number
| Instance configuration.
+
| Unique ID of archive store.
 
|}
 
|}
  
=== Argument Values ===
+
== RefreshAllStoreStatistics ==
 
+
Refresh statistics of all archive stores.
==== config ====
 
<source lang="js" smart-tabs="true" toolbar="false" gutter="false">
 
{
 
  "instanceID" : string,
 
  "alias" : string,
 
  "displayName" : string,
 
  "instanceHost" : string,
 
  "startMode" : string,
 
  "baseDirectory" : string,
 
  "debugLogEnabled" : bool,
 
  "vssWriterEnabled" : bool
 
}
 
</source>
 
  
== SetInstanceHostConfiguration ==
+
== RenameJob ==
Set configuration of Instance Host.
+
Rename job.
  
 
=== Arguments ===
 
=== Arguments ===
Line 921: Line 1,043:
 
! Description
 
! Description
 
|-
 
|-
| <tt>config</tt>
+
| <tt>id</tt>
| json
+
| number (optional)
| Instance Host configuration.
+
| The unique identifier of the job to be renamed.
 +
|-
 +
| <tt>name</tt>
 +
| string (optional)
 +
| The new job name.
 
|}
 
|}
  
=== Argument Values ===
+
== RenameStore ==
 
+
Rename archive store
==== config ====
 
<source lang="js" smart-tabs="true" toolbar="false" gutter="false">
 
{
 
  "serverName" : string,
 
  "port" : number,
 
  "serverCertificate" : {
 
    "thumbprint" : string
 
  },
 
  "baseDirectory" : string
 
}
 
</source>
 
 
 
== SetStoreAutoCreateConfiguration ==
 
Set configuration for automatic archive store creation.
 
  
 
=== Arguments ===
 
=== Arguments ===
Line 949: Line 1,061:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>id</tt>
 +
| number
 +
| Unique ID of archive store.
 +
|-
 +
| <tt>name</tt>
 
| string  
 
| string  
| Unique ID of MailStore instance in which this command is invoked.
+
| New name of archive store.
|-
 
| <tt>config</tt>
 
| json
 
| Archive store automatic creation configuration.
 
 
|}
 
|}
  
=== Argument Values ===
+
== RenameUser ==
 +
Rename a MailStore user.
  
==== config ====
+
=== Arguments ===
<source lang="js" smart-tabs="true" toolbar="false" gutter="false">
+
{| class="wikitable"
{
 
  "enabled" : bool,
 
  "interval" : string,
 
  "sizeThreshold" : string,
 
  "numberOfMessagesThreshold" : number,
 
  "baseDirectory" : string
 
}
 
</source>
 
 
 
== SetStorePath ==
 
Set the path to archive store data.
 
 
 
=== Arguments ===
 
{| class="wikitable"
 
 
! width=150px | Name
 
! width=150px | Name
 
! width=120px | Type
 
! width=120px | Type
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>oldUserName</tt>
 
| string  
 
| string  
| Unique ID of MailStore instance in which this command is invoked.
+
| Old user name.
 
|-
 
|-
| <tt>id</tt>
+
| <tt>newUserName</tt>
| number
 
| Unique ID of archive store.
 
|-
 
| <tt>path</tt>
 
 
| string  
 
| string  
| Path to archvie store data.
+
| New user name.
 
|}
 
|}
  
== SetStoreRequestedState ==
+
== RenewMasterKey ==
Set state of archive store.
+
Renews the master key which is used to encrypt the encryption keys.
 +
 
 +
== RepairStoreDatabase ==
 +
Tries to resolve certain issues with archive store databases (e.g. missing database indexes).
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,001: Line 1,099:
 
! width=120px | Type
 
! width=120px | Type
 
! Description
 
! Description
|-
 
| <tt>instanceID</tt>
 
| string
 
| Unique ID of MailStore instance in which this command is invoked.
 
 
|-
 
|-
 
| <tt>id</tt>
 
| <tt>id</tt>
 
| number  
 
| number  
 
| Unique ID of archive store.
 
| Unique ID of archive store.
|-
 
| <tt>requestedState</tt>
 
| string
 
| State of archive store.
 
 
|}
 
|}
  
=== Argument Values ===
+
== RetryOpenStores ==
 +
Retry opening stores that failed previously.
 +
 
 +
== RunJobAsync ==
 +
Run an existing job.
  
==== requestedState ====
+
=== Arguments ===
 
{| class="wikitable"
 
{| class="wikitable"
! width=270px | Name
+
! width=150px | Name
 +
! width=120px | Type
 
! Description
 
! Description
 
|-
 
|-
| <tt>current</tt>
+
| <tt>id</tt>
| Same as Normal but new messages will be archived in the archive store that is set to Current.
+
| number
|-
+
| The identifier of the job to be run.
| <tt>normal</tt>
 
| The content of archives store is available to users and can be modified if the user has the appropriate permission.
 
|-
 
| <tt>writeProtected</tt>
 
| The content of write protected archive stores is available to users, but cannot be modified (e.g. delete or move messages, rename or move folders)
 
|-
 
| <tt>disabled</tt>
 
| Disabled archive stores are not in use but the instance still knows about their existence. Therefore the content is not available to users.
 
 
|}
 
|}
  
== SetSystemAdministratorConfiguration ==
+
== RunProfile ==
Set SPE system adminstrator configuration.
+
Run an existing archiving or exporting profile. Only profiles that are executed on server side can be started by this command. That are all profiles which are listed under ''E-Mail Servers'' in the MailStore Client. Client side profiles can be started by using the [[MailStore_Server_Management_Shell|MailStoreCmd]] and the commands ''import-execute'' and ''export-execute''.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,044: Line 1,131:
 
! Description
 
! Description
 
|-
 
|-
| <tt>config</tt>
+
| <tt>id</tt>
| json
+
| number
| SPE system adminstrator configuration.
+
| Unique profile ID.
 
|}
 
|}
  
=== Argument Values ===
+
== RunTemporaryProfile ==
 
+
Run a temporary/non-existent profile.  Only profiles that are executed on server side can be started by this command. That are all profiles which are listed under ''E-Mail Servers'' in the MailStore Client.
==== config ====
 
<source lang="js" smart-tabs="true" toolbar="false" gutter="false">
 
{
 
  "fullName" : string
 
}
 
</source>
 
 
 
== SetSystemAdministratorPassword ==
 
Set password for SPE system administrator.
 
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,067: Line 1,145:
 
! Description
 
! Description
 
|-
 
|-
| <tt>userName</tt>
+
| <tt>properties</tt>
| string
+
| json
| User name of SPE system administrator.
+
| Profile properties.
 
|-
 
|-
| <tt>password</tt>
+
| <tt>raw</tt>
| string
+
| bool
| New password for SPE system administrator.
+
| Currently only 'true' is supported.
 
|}
 
|}
  
== StartInstances ==
+
=== Argument Values ===
Start one or multiple MailStore Instances.
+
 
 +
==== properties ====
 +
To receive available profile properties create a profile of the desired type via MailStore Client and use the GetProfiles method to receive supported value.
 +
 
 +
== SelectAllStoreIndexesForRebuild ==
 +
Select all full-text indexes for rebuild.
 +
 
 +
== SendStatusReport ==
 +
Send a status report to the given recipients.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,085: Line 1,171:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceFilter</tt>
+
| <tt>timespan</tt>
| string  
+
| string
| Instance filter string.
+
| Timespan that is covered by the status report.
 +
|-
 +
| <tt>timeZoneId</tt>
 +
| string
 +
| The id of the time zone the date should be converted to, e.g. $Local, which represents the time zone of the operating system.
 +
|-
 +
| <tt>recipients</tt>
 +
| string
 +
| Comma separated list of recipients that will receive the status report.
 
|}
 
|}
  
 +
Use the API command [[Administration_API_-_Function_Reference#GetTimeZones|GetTimeZones]] to retrieve a list of all available time zones and their ids.
 
=== Argument Values ===
 
=== Argument Values ===
  
==== instanceFilter ====
+
==== Timespan ====
 
{| class="wikitable"
 
{| class="wikitable"
 
! width=270px | Name
 
! width=270px | Name
 
! Description
 
! Description
 
|-
 
|-
| <tt>*</tt>
+
| <tt>today</tt>
| All instances
+
| The day when the status report is sent.
 +
|-
 +
| <tt>yesterday</tt>
 +
| The day before the status report is sent.
 
|-
 
|-
| <tt>instance01 instance02 instance03</tt>
+
| <tt>thisweek</tt>
| instance01, instance02 and instance03
+
| The week when the status report is sent.
 
|-
 
|-
| <tt>*instancehost01 *instancehost02</tt>
+
| <tt>lastweek</tt>
| All instances on instancehost1 and instancehost2
+
| The week before the status report is sent.
 
|-
 
|-
| <tt>* .running</tt>
+
| <tt>thismonth</tt>
| All running instances
+
| The month when the status report is sent.
 
|-
 
|-
| <tt>* .stopped</tt>
+
| <tt>lastmonth</tt>
| All stopped instances
+
| The month before the status report is sent.
 
|}
 
|}
  
== StopInstances ==
+
== SetComplianceConfiguration ==
Stop one or multiple MailStore Instances.
+
Set compliance configuration settings.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,122: Line 1,220:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceFilter</tt>
+
| <tt>config</tt>
| string
+
| json
| Instance filter string.
+
| Compliance configuration.
 
|}
 
|}
  
 
=== Argument Values ===
 
=== Argument Values ===
  
==== instanceFilter ====
+
==== config ====
{| class="wikitable"
+
Use [[Administration_API_-_Function_Reference#GetComplianceConfiguration|GetComplianceConfiguration]] to receive supported values.
! width=270px | Name
+
 
! Description
+
Example settings object:
|-
+
<source lang="js" smart-tabs="true" toolbar="false" gutter="false">
| <tt>*</tt>
+
{
| All instances
+
  "adminEmailPreviewEnabled": true,
|-
+
  "legalHoldEnabled": false,
| <tt>instance01 instance02 instance03</tt>
+
  "passwordPolicyEnabled": true,
| instance01, instance02 and instance03
+
  "logSuccessfulUserActivities": [
|-
+
    "AdminRestored",
| <tt>*instancehost01 *instancehost02</tt>
+
    "ComplianceChangeSettings",
| All instances on instancehost1 and instancehost2
+
    "FileGroupAttach",
|-
+
    "FileGroupCreate",
| <tt>* .running</tt>
+
    "FileGroupDetach",
| All running instances
+
    "FileGroupRename",
|-
+
    "FileGroupSetProperties",
| <tt>* .stopped</tt>
+
    "FileGroupSetRequestedState",
| All stopped instances
+
    "ProfileChangeUserName",
|}
+
    "UserAdd",
 +
    "UserDelete",
 +
    "UserRename",
 +
    "UserSetFolderAccess",
 +
    "UserSetMappings",
 +
    "UserUpdate"
 +
  ]
 +
}
 +
</source>
  
== ThawInstances ==
+
== SetDirectoryServicesConfiguration ==
Thaw one or multiple MailStore Instances.
+
Set directory services configuration settings.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,159: Line 1,265:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceFilter</tt>
+
| <tt>config</tt>
| string
+
| json
| Instance filter string.
+
| Directory services configuration.
 
|}
 
|}
  
 
=== Argument Values ===
 
=== Argument Values ===
  
==== instanceFilter ====
+
==== config ====
{| class="wikitable"
+
Use GetDirectoryServicesConfiguration to receive supported value.
! width=270px | Name
 
! Description
 
|-
 
| <tt>*</tt>
 
| All instances
 
|-
 
| <tt>instance01 instance02 instance03</tt>
 
| instance01, instance02 and instance03
 
|-
 
| <tt>*instancehost01 *instancehost02</tt>
 
| All instances on instancehost1 and instancehost2
 
|-
 
| <tt>* .running</tt>
 
| All running instances
 
|-
 
| <tt>* .stopped</tt>
 
| All stopped instances
 
|}
 
  
== UpgradeStore ==
+
== SetJobEnabled ==
Upgrade archive store from MailStore Server 5 or older to current format.
+
Set enabled status of a job.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,196: Line 1,284:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>id</tt>
| string
+
| number (optional)
| Unique ID of MailStore instance in which this command is invoked.
+
| The unique identifier of the job to be modified.
 
|-
 
|-
| <tt>id</tt>
+
| <tt>enabled</tt>
| number
+
| bool (optional)
| Unique ID of archive store.
+
| Boolean value of '''enabled''' attribute.
 
|}
 
|}
  
== VerifyStore ==
+
== SetJobSchedule ==
Verify archive stores consistency.
+
Modify the schedule of a job.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,214: Line 1,302:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>id</tt>
 +
| number
 +
| The unique identifier of the job to be modified.
 +
|-
 +
| <tt>timeZoneId</tt>
 
| string  
 
| string  
| Unique ID of MailStore instance in which this command is invoked.
+
| The id of the time zone the date should be converted to, e.g. $Local, which represents the time zone of the operating system.
 
|-
 
|-
| <tt>id</tt>
+
| <tt>date</tt>
| number  
+
| string (optional)
| Unique ID of archive store.
+
| Datetime string (YYYY-MM-DDThh:mm:ss) for running the job once.
 +
|-
 +
| <tt>interval</tt>
 +
| number (optional)
 +
| Interval for running job.
 +
|-
 +
| <tt>time</tt>
 +
| string (optional)
 +
| Time for running job. Without additional parameter, this means daily execution.
 +
|-
 +
| <tt>dayOfWeek</tt>
 +
| string (optional)
 +
| Day of week to run job. Parameter "time" also required.
 +
|-
 +
| <tt>dayOfMonth</tt>
 +
| string (optional)
 +
| Day of month to run job. Parameter "time" also required. dayOfWeek can optionally be used to define further.
 
|}
 
|}
  
== ClearUserPrivilegesOnFolders ==
+
Use the API command [[Administration_API_-_Function_Reference#GetTimeZones|GetTimeZones]] to retrieve a list of all available time zones and their ids.
Removes all privileges of a user on all archive folders.
+
=== Argument Values ===
  
=== Arguments ===
+
==== dayOfWeek ====
 
{| class="wikitable"
 
{| class="wikitable"
! width=150px | Name
+
! width=270px | Name
! width=120px | Type
 
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>Sunday</tt>
| string
+
| Sunday
| Unique ID of MailStore instance in which this command is invoked.
+
|-
 +
| <tt>Monday</tt>
 +
| Monday
 +
|-
 +
| <tt>Tuesday</tt>
 +
| Tuesday
 
|-
 
|-
| <tt>userName</tt>
+
| <tt>Wednesday</tt>
| string
+
| Wednesday
| User name of MailStore user.
+
|-
 +
| <tt>Thursday</tt>
 +
| Thursday
 +
|-
 +
| <tt>Friday</tt>
 +
| Friday
 +
|-
 +
| <tt>Saturday</tt>
 +
| Saturday
 
|}
 
|}
  
== CreateProfile ==
+
==== dayOfMonth ====
Create a new archiving or exporting profile.
+
{| class="wikitable"
 +
! width=270px | Name
 +
! Description
 +
|-
 +
| <tt>1 to 31</tt>
 +
| Numeric representation of day of month.
 +
|-
 +
| <tt>Last</tt>
 +
| Last day of month.
 +
|}
  
=== Arguments ===
+
==== interval ====
 
{| class="wikitable"
 
{| class="wikitable"
! width=150px | Name
+
! width=270px | Name
! width=120px | Type
 
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>5</tt>
| string
+
| Every 5 minutes.
| Unique ID of MailStore instance in which this command is invoked.
 
 
|-
 
|-
| <tt>properties</tt>
+
| <tt>10</tt>
| json
+
| Every 10 minutes.
| Profile properties.
 
 
|-
 
|-
| <tt>raw</tt>
+
| <tt>15</tt>
| bool
+
| Every 15 minutes.
| Currently only 'true' is supported.
+
|-
|}
+
| <tt>20</tt>
 
+
| Every 20 minutes.
=== Argument Values ===
+
|-
 
+
| <tt>30</tt>
==== properties ====
+
| Every 30 minutes.
To receive available profile properties create a profile of the desired type via MailStore Client and use the GetProfiles method to receive supported value. ''Id'' and ''Version'' attributes must not be set.
+
|-
 +
| <tt>60</tt>
 +
| Every hour.
 +
|-
 +
| <tt>120</tt>
 +
| Every 2 hours.
 +
|-
 +
| <tt>180</tt>
 +
| Every 3 hours.
 +
|-
 +
| <tt>260</tt>
 +
| Every 4 hours.
 +
|-
 +
| <tt>360</tt>
 +
| Every 6 hours.
 +
|-
 +
| <tt>720</tt>
 +
| Every 12 hours.
 +
|}
  
== CreateUser ==
+
== SetProfileServerSideExecution ==
Create new MailStore user.
+
Disables or enables the automatic server-sided execution with its parameters.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,277: Line 1,421:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>id</tt>
| string
+
| number
| Unique ID of MailStore instance in which this command is invoked.
+
| The unique profile ID of the profile to be modified.
 
|-
 
|-
| <tt>userName</tt>
+
| <tt>automatic</tt>
| string
+
| bool
| User name of new MailStore user.
+
| Enables (true) or disables (false) the profile's server-side automation.
 
|-
 
|-
| <tt>privileges</tt>
+
| <tt>automaticPauseBetweenExecutions</tt>
| string
+
| number (optional)
| Comma separated list of privileges.
+
| Integer value (0 - 2147483647) of seconds to pause between re-executing an automatic profile.
 
|-
 
|-
| <tt>fullName</tt>
+
| <tt>automaticMaintenanceWindows</tt>
 
| string (optional)
 
| string (optional)
| Full name of user.
+
| TimeSpan string (hh:mm-hh:mm, e.g. 22:00-04:00) for the time window where the execution should not be executed, e.g. to schedule maintenance tasks.
|-
+
|}
| <tt>distinguishedName</tt>
+
 
| string (optional)
+
Use the API command [[Administration_API_-_Function_Reference#GetProfiles|GetProfiles]] to retrieve a list of all profiles and their current "serverSideExecution" section details.
| LDAP DN string.
+
 
|-
+
The command can be executed with either the argument ''automatic=false'' and no additional parameters to disable the automation, or with ''automatic=true'' and at least the ''automaticPauseBetweenExecutions'' value given. The ''automaticMaintenanceWindows'' parameter is optional. Setting an already automated profile to automatic again, will restart the profile.
| <tt>authentication</tt>
 
| string (optional)
 
| Authentication setting for user: 'integrated' or 'directoryServices'.
 
|-
 
| <tt>password</tt>
 
| string (optional)
 
| Password of new user.
 
|}
 
  
== DeleteEmptyFolders ==
+
== SetRetentionPolicies ==
Remove folders from folder tree that do not contain emails.
+
Set retention policies.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,315: Line 1,451:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>config</tt>
| string
+
| json
| Unique ID of MailStore instance in which this command is invoked.
+
| Retention policy configuration.
|-
 
| <tt>folder</tt>
 
| string (optional)
 
| Entry point in folder tree.
 
 
|}
 
|}
  
== DeleteMessage ==
+
To get example policies use the client to create retention policies manually. Then use the API command [[Administration_API_-_Function_Reference#GetRetentionPolicies|GetRetentionPolicies]] to retrieve the json values. <br>
Delete a single message
+
Please be aware that the API is case-sensitive. Especially the archive inclusion/exclusion criteria must not contain upper case characters, as the user archives are always handled lower-case internally.
 +
Due to a more complex distributed permission concept, retention policies can not be edited via the API for the MailStore Service Provider Edition.
 +
 
 +
== SetServiceCertificate ==
 +
Set the X509 certificate that is used by MailStore Server for incoming connections.
 +
The certificate must already reside in the computer's local certificate store.
 +
The thumbprint of the currently used certificate can be retrieved with [[Administration_API_-_Function_Reference#GetServiceConfiguration|GetServiceConfiguration]].
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,333: Line 1,471:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>thumbprint</tt>
| string  
+
| string
| Unique ID of MailStore instance in which this command is invoked.
+
| Thumbprint of X509 certificate.
|-
 
| <tt>id</tt>
 
| string (optional)
 
| Unique ID of message. Format: <store_id>:<message_num>
 
 
|}
 
|}
  
== DeleteProfile ==
+
== SetSmtpSettings ==
Delete an archiving or exporting profile.
+
Set SMTP configuration.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,351: Line 1,485:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>settings</tt>
| string
+
| json
| Unique ID of MailStore instance in which this command is invoked.
+
| SMTP configuration.
|-
 
| <tt>id</tt>
 
| number
 
| Unique ID of profile.
 
 
|}
 
|}
  
== DeleteUser ==
+
=== Argument Values ===
Delete a MailStore user.
+
 
 +
==== settings====
 +
Example settings object:
 +
<source lang="js" smart-tabs="true" toolbar="false" gutter="false">
 +
{
 +
  "hostname": "mail.example.com",
 +
  "port": 587,
 +
  "protocol": "SMTP-TLS",
 +
  "ignoreSslPolicyErrors": false,
 +
  "authenticationRequired": true,
 +
  "username": "[email protected]",
 +
  "password": "userpassword",
 +
  "fromDisplayName": "Sending User",
 +
  "fromEmailAddress": "sending.user@example.com",
 +
  "recipientEmailAddresses": ["[email protected]", "[email protected]"]
 +
}
 +
</source>
 +
 
 +
== SetStoreAutoCreateConfiguration ==
 +
Set configuration for automatic archive store creation.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,369: Line 1,518:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>config</tt>
| string
+
| json
| Unique ID of MailStore instance in which this command is invoked.
+
| Archive store automatic creation configuration.
|-
 
| <tt>userName</tt>
 
| string
 
| User name of MailStore user.
 
 
|}
 
|}
  
== GetChildFolders ==
+
=== Argument Values ===
Get child folders.
+
 
 +
==== config ====
 +
<source lang="js" smart-tabs="true" toolbar="false" gutter="false">
 +
{
 +
  "sizeThreshold" : int or null,
 +
  "databaseBaseDirectory" : string,
 +
  "contentBaseDirectory" : string,
 +
  "indexBaseDirectory" : string
 +
}
 +
</source>
 +
 
 +
== SetStoreProperties ==
 +
Set properties of archive store.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,387: Line 1,544:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>id</tt>
| string  
+
| number
| Unique ID of MailStore instance in which this command is invoked.
+
| Set properties of archive store.
 +
|-
 +
| <tt>type</tt>
 +
| string (optional)
 +
|
 +
|-
 +
| <tt>databaseName</tt>
 +
| string (optional)
 +
| Name of database on Microsoft SQL Server or PostgreSQL server.
 
|-
 
|-
| <tt>folder</tt>
+
| <tt>databasePath</tt>
 
| string (optional)
 
| string (optional)
| Parent folder.
+
| Path to directory in which database folder information and email meta data are stored.
 
|-
 
|-
| <tt>maxLevels</tt>
+
| <tt>contentPath</tt>
| number (optional)
+
| string (optional)
| Depth of child folders.
+
| Path to directory in which email headers and contents are stored.
|}
+
|-
 +
| <tt>indexPath</tt>
 +
| string (optional)
 +
| Path to directory in which full text search indexes are stored.
 +
|-
 +
| <tt>serverName</tt>
 +
| string (optional)
 +
| Name of Microsoft SQL Server or PostgreSQL server.
 +
|-
 +
| <tt>userName</tt>
 +
| string (optional)
 +
| User name for accessing Microsoft SQL Server or PostgreSQL server.
 +
|-
 +
| <tt>password</tt>
 +
| string (optional)
 +
| Password for accessing Microsoft SQL Server or PostgreSQL server.
 +
|}
  
== GetComplianceConfiguration ==
+
=== Argument Values ===
Get current compliance configuration settings.
 
  
=== Arguments ===
+
==== type ====
 
{| class="wikitable"
 
{| class="wikitable"
! width=150px | Name
+
! width=270px | Name
! width=120px | Type
 
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>FileSystemInternal</tt>
| string
+
| Advanced file system-based archive store.
| Unique ID of MailStore instance in which this command is invoked.
+
|-
 +
| <tt>SQLServer</tt>
 +
| Microsoft SQL Server-based archive store.
 +
|-
 +
| <tt>PostgreSQL</tt>
 +
| PostgreSQL server-based archive store.
 
|}
 
|}
  
== GetDirectoryServicesConfiguration ==
+
== SetStoreRequestedState ==
Get current Directory Services configuration settings.
+
Set state of archive store.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,423: Line 1,607:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>id</tt>
| string
+
| number
| Unique ID of MailStore instance in which this command is invoked.
+
| Unique ID of archive store.
 +
|-
 +
| <tt>requestedState</tt>
 +
| string (optional)
 +
| State of archive store after attaching.
 
|}
 
|}
  
== GetFolderStatistics ==
+
=== Argument Values ===
Get folder statistics.
 
  
=== Arguments ===
+
==== requestedState ====
 
{| class="wikitable"
 
{| class="wikitable"
! width=150px | Name
+
! width=270px | Name
! width=120px | Type
 
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>current</tt>
| string
+
| Same as Normal but new messages will be archived in the archive store that is set to Current.
| Unique ID of MailStore instance in which this command is invoked.
+
|-
|}
+
| <tt>normal</tt>
 
+
| The content of archives store is available to users and can be modified if the user has the appropriate permission.
== GetMessages ==
+
|-
Get list of messages from a folder.
+
| <tt>writeProtected</tt>
 +
| The content of write protected archive stores is available to users, but cannot be modified (e.g. delete or move messages, rename or move folders)
 +
|-
 +
| <tt>disabled</tt>
 +
| Disabled archive stores are not in use but the instance still knows about their existence. Therefore the content is not available to users.
 +
|}
 +
 
 +
== SetUserAuthentication ==
 +
Set authentication settings of a MailStore user.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,451: Line 1,645:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>userName</tt>
 
| string  
 
| string  
| Unique ID of MailStore instance in which this command is invoked.
+
| User name of MailStore user.
 
|-
 
|-
| <tt>folder</tt>
+
| <tt>authentication</tt>
| string (optional)
+
| string  
| Folder whose content to list.
+
| Authentication method. Either 'integrated' or 'directoryServices'.
 
|}
 
|}
  
== GetProfiles ==
+
== SetUserDistinguishedName ==
Get list of archiving and exporting profiles.
+
Set the LDAP distinguished name of a MailStore user.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,469: Line 1,663:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>userName</tt>
 
| string  
 
| string  
| Unique ID of MailStore instance in which this command is invoked.
+
| User name of MailStore user.
 
|-
 
|-
| <tt>raw</tt>
+
| <tt>distinguishedName</tt>
| bool
+
| string (optional)
| Currently only 'true' is supported.
+
| LDAP DN string.
 
|}
 
|}
  
== GetTimeZones ==
+
== SetUserEmailAddresses ==
Get list of available time zones.
+
Set email addresses of MailStore user.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,487: Line 1,681:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>userName</tt>
 
| string  
 
| string  
| Unique ID of MailStore instance in which this command is invoked.
+
| User name of MailStore user.
 +
|-
 +
| <tt>emailAddresses</tt>
 +
| string (optional)
 +
| List of email addresses.
 
|}
 
|}
  
== GetUserInfo ==
+
== SetUserFullName ==
Get detailed information about user.
+
Set full name of MailStore user.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,501: Line 1,699:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>userName</tt>
 
| string  
 
| string  
| Unique ID of MailStore instance in which this command is invoked.
+
| User name of MailStore user.
 
|-
 
|-
| <tt>userName</tt>
+
| <tt>fullName</tt>
| string  
+
| string (optional)
| User name of MailStore user
+
| Full name of MailStore user.
 
|}
 
|}
  
== GetUsers ==
+
== SetUserLoginPrivileges ==
Get list of users.
+
Set login privileges of a MailStore user.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,519: Line 1,717:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>userName</tt>
 
| string  
 
| string  
| Unique ID of MailStore instance in which this command is invoked.
+
| User name of MailStore user.
 +
|-
 +
| <tt>loginPrivileges</tt>
 +
| string
 +
| Comma separated list of login privileges.
 
|}
 
|}
  
== GetWorkerResults ==
+
=== Argument Values ===
Get results of profile executions.
+
 
 +
==== loginPrivileges ====
 +
{{Administration_API_User_Login_Privileges}}
 +
 
 +
== SetUserPassword ==
 +
Set password of MailStore user.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,533: Line 1,740:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>userName</tt>
 
| string  
 
| string  
| Unique ID of MailStore instance in which this command is invoked.
+
| User name of MailStore user.
 
|-
 
|-
| <tt>fromIncluding</tt>
+
| <tt>password</tt>
 
| string  
 
| string  
| Beginning of time range to fetch.
+
| Password of MailStore user.
|-
+
|}
| <tt>toExcluding</tt>
+
 
| string
+
== SetUserPop3UserNames ==
| End of time range to fetch.
+
Set POP3 user name of MailStore user.
 +
 
 +
=== Arguments ===
 +
{| class="wikitable"
 +
! width=150px | Name
 +
! width=120px | Type
 +
! Description
 
|-
 
|-
| <tt>timeZoneID</tt>
+
| <tt>userName</tt>
 
| string  
 
| string  
| Time zone in which timestamp should be returned.
+
| User name of MailStore user.
 
|-
 
|-
| <tt>profileID</tt>
+
| <tt>pop3UserNames</tt>
| number (optional)
 
| Filter results by given profile ID.
 
|-
 
| <tt>userName</tt>
 
 
| string (optional)
 
| string (optional)
| Filter results by given user name.
+
| Comma separated list of POP3 user names.
 
|}
 
|}
  
== MoveFolder ==
+
== SetUserPrivileges ==
Move folder.
+
Set privileges of MailStore user.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,567: Line 1,776:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>userName</tt>
 
| string  
 
| string  
| Unique ID of MailStore instance in which this command is invoked.
+
| User name of MailStore user.
 
|-
 
|-
| <tt>fromFolder</tt>
+
| <tt>privileges</tt>
 
| string  
 
| string  
| Old folder name.
+
| Comma separated list of privileges.
|-
 
| <tt>toFolder</tt>
 
| string
 
| New folder name.
 
 
|}
 
|}
  
== RenameUser ==
+
=== Argument Values ===
Rename a MailStore user.
+
 
 +
==== privileges ====
 +
{{Administration_API_User_Privileges}}
 +
 
 +
== SetUserPrivilegesOnAllFolders ==
 +
Set privileges on all folders for MailStore user, except for the folders that are excluded
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,589: Line 1,799:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>userName</tt>
 
| string  
 
| string  
| Unique ID of MailStore instance in which this command is invoked.
+
| User name of MailStore user.
 
|-
 
|-
| <tt>oldUserName</tt>
+
| <tt>privileges</tt>
 
| string  
 
| string  
| Old user name.
+
| Comma separated list of folder privileges.
 
|-
 
|-
| <tt>newUserName</tt>
+
| <tt>excludeFolders</tt>
| string  
+
| string (optional)
| New user name.
+
| Comma separated list of folders to exclude.
 
|}
 
|}
  
== RunProfile ==
+
=== Argument Values ===
Run an existing archiving or exporting profile.
 
  
=== Arguments ===
+
==== privileges ====
 
{| class="wikitable"
 
{| class="wikitable"
! width=150px | Name
+
! width=270px | Name
! width=120px | Type
 
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>read</tt>
| string
+
| The user is granted read access to the specified folders.
| Unique ID of MailStore instance in which this command is invoked.
 
 
|-
 
|-
| <tt>id</tt>
+
| <tt>write</tt>
| number
+
| The user is granted write access to the specified folders. Messages can be moved within an archive.
| Unique profile ID.
+
|-
 +
| <tt>delete</tt>
 +
| The user is granted delete access to the specified folders.
 
|}
 
|}
  
== RunTemporaryProfile ==
+
== SetUserPrivilegesOnFolder ==
Run a temporary/non-existent profile.
+
Set privileges on folder for MailStore user.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,629: Line 1,838:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>userName</tt>
 
| string  
 
| string  
| Unique ID of MailStore instance in which this command is invoked.
+
| User name of MailStore user.
 
|-
 
|-
| <tt>properties</tt>
+
| <tt>folder</tt>
| json
+
| string
| Profile properties.
+
| Folder name.
 
|-
 
|-
| <tt>raw</tt>
+
| <tt>privileges</tt>
| bool
+
| string
| Currently only 'true' is supported.
+
| Comma separated list of folder privileges.
 
|}
 
|}
  
 
=== Argument Values ===
 
=== Argument Values ===
  
==== properties ====
+
==== privileges ====
To receive available profile properties create a profile of the desired type via MailStore Client and use the GetProfiles method to receive supported value. ''Id'' and ''Version'' attributes must not be set.
+
{| class="wikitable"
 
+
! width=270px | Name
== SetComplianceConfiguration ==
+
! Description
Set compliance configuration settings.
+
|-
 +
| <tt>none</tt>
 +
| The user is denied access to the specified folder. If specified, this value has to be the only value in the list. This effectively removes all privileges on the specified folder.
 +
|-
 +
| <tt>read</tt>
 +
| The user is granted read access to the specified folder.
 +
|-
 +
| <tt>write</tt>
 +
| The user is granted write access to the specified folder. Messages can be moved within an archive.
 +
|-
 +
| <tt>delete</tt>
 +
| The user is granted delete access to the specified folder.
 +
|}
 +
 
 +
== SyncUsersWithDirectoryServices ==
 +
Sync users of MailStore instance with directory services.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,656: Line 1,880:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>dryRun</tt>
| string
+
| bool (optional)
| Unique ID of MailStore instance in which this command is invoked.
+
| Simulate sync only.
|-
 
| <tt>config</tt>
 
| json
 
| Compliance configuration.
 
 
|}
 
|}
  
=== Argument Values ===
+
== TestSmtpSettings ==
 +
Test current SMTP configuration.
  
==== config ====
+
== TransferStores ==
Use GetComplianceConfiguration to receive supported value.
+
Copy the content of one or more archive store into another archive store.
 
 
== SetDirectoryServicesConfiguration ==
 
Set directory services configuration settings.
 
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,679: Line 1,897:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>sourceStores</tt>
| string  
+
| string
| Unique ID of MailStore instance in which this command is invoked.
+
| Comma-separated list of one or more source archive stores.
 
|-
 
|-
| <tt>config</tt>
+
| <tt>targetStore</tt>
| json
+
| number (optional)
| Directory services configuration.
+
| The target store of the messages to be copied. If not given, the archive store in the "current" state will be used.
 +
|-
 +
| <tt>startIndex</tt>
 +
| string (optional)
 +
| A string in the format "archiveStoreId:messageId". The transfer process starts with the this message.
 
|}
 
|}
  
=== Argument Values ===
+
== UnlockStore ==
 
+
Unlock a foreign archive store. In case an archive store from a foreign MailStore installation is attached, this method can be used to unlock that archive store.
==== config ====
 
Use GetDirectoryServicesConfiguration to receive supported value.
 
 
 
== SetUserAuthentication ==
 
Set authentication settings of a MailStore user.
 
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,702: Line 1,919:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>id</tt>
| string
+
| number
| Unique ID of MailStore instance in which this command is invoked.
+
| Unique ID of archive store to unlock.
 
|-
 
|-
| <tt>userName</tt>
+
| <tt>passphrase</tt>
| string  
+
| string
| User name of MailStore user.
+
| Product key or recovery key of the foreign MailStore installation.
|-
 
| <tt>authentication</tt>
 
| string
 
| Authentication method. Either 'integrated' or 'directoryServices'.
 
 
|}
 
|}
  
== SetUserDistinguishedName ==
+
== UpgradeStore ==
Set the LDAP distinguished name of a MailStore user.
+
Upgrade an archive store from an older version to the current format.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,724: Line 1,937:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>id</tt>
| string
+
| number
| Unique ID of MailStore instance in which this command is invoked.
+
| Unique ID of archive store.
|-
 
| <tt>userName</tt>
 
| string
 
| User name of MailStore user.
 
|-
 
| <tt>distinguishedName</tt>
 
| string (optional)
 
| LDAP DN string.
 
 
|}
 
|}
  
== SetUserEmailAddresses ==
+
== UpgradeStores ==
Set email addresses of MailStore user.
+
Upgrade all archive stores from an older version to the current format.
 +
 
 +
== VerifyStore ==
 +
Verify archive stores consistency.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,746: Line 1,954:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>id</tt>
| string
+
| number
| Unique ID of MailStore instance in which this command is invoked.
+
| The unique identifier of the archive store to be verified.
 
|-
 
|-
| <tt>userName</tt>
+
| <tt>includeIndexes</tt>
| string
+
| bool
| User name of MailStore user.
+
| Defines whether to verify the search indexes as well. Default: true. May be slow when running on slow hardware.
|-
 
| <tt>emailAddresses</tt>
 
| string (optional)
 
| List of email addresses.
 
 
|}
 
|}
  
== SetUserFullName ==
+
== VerifyStores ==
Set full name of MailStore user.
+
Verify consistency of all archive stores.
 
+
 
 
=== Arguments ===
 
=== Arguments ===
 
{| class="wikitable"
 
{| class="wikitable"
Line 1,768: Line 1,972:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>includeIndexes</tt>
| string
+
| bool
| Unique ID of MailStore instance in which this command is invoked.
+
| Defines whether to verify the search indexes as well. Default: true. May be slow when running on slow hardware.
|-
 
| <tt>userName</tt>
 
| string
 
| User name of MailStore user.
 
|-
 
| <tt>fullName</tt>
 
| string (optional)
 
| Full name of MailStore user.
 
 
|}
 
|}
  
== SetUserPassword ==
+
[[de:Administration API - Function Reference]]
Set password of MailStore user.
+
[[en:Administration API - Function Reference]]
 
 
=== Arguments ===
 
{| class="wikitable"
 
! width=150px | Name
 
! width=120px | Type
 
! Description
 
|-
 
| <tt>instanceID</tt>
 
| string
 
| Unique ID of MailStore instance in which this command is invoked.
 
|-
 
| <tt>userName</tt>
 
| string
 
| User name of MailStore user.
 
|-
 
| <tt>password</tt>
 
| string
 
| Password of MailStore user.
 
|}
 
 
 
== SetUserPop3UserNames ==
 
Set POP3 user name of MailStore user.
 
 
 
=== Arguments ===
 
{| class="wikitable"
 
! width=150px | Name
 
! width=120px | Type
 
! Description
 
|-
 
| <tt>instanceID</tt>
 
| string
 
| Unique ID of MailStore instance in which this command is invoked.
 
|-
 
| <tt>userName</tt>
 
| string
 
| User name of MailStore user.
 
|-
 
| <tt>pop3UserNames</tt>
 
| string (optional)
 
| Comma seperated list of POP3 user names.
 
|}
 
 
 
== SetUserPrivileges ==
 
Set privileges of MailStore user.
 
 
 
=== Arguments ===
 
{| class="wikitable"
 
! width=150px | Name
 
! width=120px | Type
 
! Description
 
|-
 
| <tt>instanceID</tt>
 
| string
 
| Unique ID of MailStore instance in which this command is invoked.
 
|-
 
| <tt>userName</tt>
 
| string
 
| User name of MailStore user.
 
|-
 
| <tt>privileges</tt>
 
| string
 
| Comma separated list of privileges.
 
|}
 
 
 
== SetUserPrivilegesOnFolder ==
 
Set privileges on folder for MailStore user.
 
 
 
=== Arguments ===
 
{| class="wikitable"
 
! width=150px | Name
 
! width=120px | Type
 
! Description
 
|-
 
| <tt>instanceID</tt>
 
| string
 
| Unique ID of MailStore instance in which this command is invoked.
 
|-
 
| <tt>userName</tt>
 
| string
 
| User name of MailStore user.
 
|-
 
| <tt>folder</tt>
 
| string
 
| Folder name.
 
|-
 
| <tt>privileges</tt>
 
| string
 
| Comma separated list of folder privileges.
 
|}
 
 
 
== SyncUsersWithDirectoryServices ==
 
Sync users of MailStore instance with directory services.
 
 
 
=== Arguments ===
 
{| class="wikitable"
 
! width=150px | Name
 
! width=120px | Type
 
! Description
 
|-
 
| <tt>instanceID</tt>
 
| string
 
| Unique ID of MailStore instance in which this command is invoked.
 
|-
 
| <tt>dryRun</tt>
 
| bool (optional)
 
| Simulate sync only.
 
|}
 

Latest revision as of 12:26, 25 November 2025


AttachStore

Attach existing archive store.

Arguments

Name Type Description
name string Meaningful name of archive store.
type string Type of archive store.
databaseName string (optional) Name of database on Microsoft SQL Server or PostgreSQL server.
databasePath string (optional) Path to directory in which database folder information and email meta data are stored.
contentPath string (optional) Path to directory in which email headers and contents are stored.
indexPath string (optional) Path to directory in which full text search indexes are stored.
serverName string (optional) Name of Microsoft SQL Server or PostgreSQL server.
userName string (optional) User name for accessing Microsoft SQL Server or PostgreSQL server.
password string (optional) Password for accessing Microsoft SQL Server or PostgreSQL server.
requestedState string (optional) State of archive store after attaching.

Argument Values

type

Name Description
FileSystemInternal Advanced file system-based archive store.
SQLServer Microsoft SQL Server-based archive store.
PostgreSQL PostgreSQL server-based archive store.

requestedState

Name Description
current Same as Normal but new messages will be archived in the archive store that is set to Current.
normal The content of archives store is available to users and can be modified if the user has the appropriate permission.
writeProtected The content of write protected archive stores is available to users, but cannot be modified (e.g. delete or move messages, rename or move folders)
disabled Disabled archive stores are not in use but the instance still knows about their existence. Therefore the content is not available to users.

CancelJobAsync

Cancel a running job asynchronously.

Arguments

Name Type Description
id number The unique identifier of the job to be canceled.

ClearUserPrivilegesOnFolders

Removes all privileges of a user on all archive folders.

Arguments

Name Type Description
userName string User name of MailStore user.

CompactMasterDatabase

Compact master database.

CompactStore

Compact archive store.

Arguments

Name Type Description
id number Unique ID of archive store

CreateBackup

Create a backup of the entire archive.

Arguments

Name Type Description
path string Path to directory into which the backup should be written.
excludeSearchIndexes bool (optional) Indicates whether the search index files should be excluded from the backup.

CreateJob

Create a new job to execute Management API commands.

Arguments

Name Type Description
name string (optional) A meaningful name for the job. Example: Daily Backup.
action string (optional) Management API command to execute.
owner string (optional) Username of the job owner; must be an administrator.
timeZoneId string (optional) The id of the time zone the date should be converted to, e.g. $Local, which represents the time zone of the operating system.
date string (optional) Datetime string (YYYY-MM-DDThh:mm:ss) for running the job once.
interval number (optional) Interval for running job.
time string (optional) Time for running job. Without additional parameter, this means daily execution.
dayOfWeek string (optional) Day of week to run job. Parameter "time" also required.
dayOfMonth string (optional) Day of month to run job. Parameter "time" also required. dayOfWeek can optionally be used to define further.

Use the API command GetTimeZones to retrieve a list of all available time zones and their ids.

Argument Values

dayOfWeek

Name Description
Sunday Sunday
Monday Monday
Tuesday Tuesday
Wednesday Wednesday
Thursday Thursday
Friday Friday
Saturday Saturday

dayOfMonth

Name Description
1 to 31 Numeric representation of day of month.
Last Last day of month.

interval

Name Description
5 Every 5 minutes.
10 Every 10 minutes.
15 Every 15 minutes.
20 Every 20 minutes.
30 Every 30 minutes.
60 Every hour.
120 Every 2 hours.
180 Every 3 hours.
240 Every 4 hours.
360 Every 6 hours.
720 Every 12 hours.

CreateProfile

Create a new archiving or exporting profile.

Arguments

Name Type Description
properties json Profile properties.
raw bool Currently only 'true' is supported.

Argument Values

properties

To receive available profile properties create a profile of the desired type via MailStore Client and then use the GetProfiles method to receive supported values. The properties id and version must be omitted, the password field must be filled properly.

CreateStore

Create and attach a new archive store.

Arguments

Name Type Description
name string Meaningful name of archive store.
type string (optional) Type of archive store.
databaseName string (optional) Name of database on Microsoft SQL Server or PostgreSQL server.
databasePath string (optional) Path to directory in which database folder information and email meta data are stored.
contentPath string (optional) Path to directory in which email headers and contents are stored.
indexPath string (optional) Path to directory in which full text search indexes are stored.
serverName string (optional) Name of Microsoft SQL Server or PostgreSQL server.
userName string (optional) User name for accessing Microsoft SQL Server or PostgreSQL server.
password string (optional) Password for accessing Microsoft SQL Server or PostgreSQL server.
requestedState string (optional) State of archive store after attaching.

Argument Values

type

Name Description
FileSystemInternal Standard archive store.
SQLServer Microsoft SQL Server-based archive store.
PostgreSQL PostgreSQL server-based archive store.

requestedState

Name Description
current Same as Normal but new messages will be archived in the archive store that is set to Current.
normal The content of archives store is available to users and can be modified if the user has the appropriate permission.
writeProtected The content of write protected archive stores is available to users, but cannot be modified (e.g. delete or move messages, rename or move folders)
disabled Disabled archive stores are not in use but the instance still knows about their existence. Therefore the content is not available to users.

CreateUser

Create new MailStore user. Use SetUserPrivilegesOnFolder to grant that user privileges on the user's own archive.

Arguments

Name Type Description
userName string User name of new MailStore user.
privileges string Comma separated list of privileges.
fullName string (optional) Full name of user.
distinguishedName string (optional) LDAP DN string.
authentication string (optional) Authentication setting for user: 'integrated or 'directoryServices'.
password string (optional) Password of new user.
loginPrivileges string (optional) Comma separated list of log in privileges. If not given, all login privileges are assigned.

Argument Values

privileges

Name Description
none The user is granted no global privileges. If specified, this value has to be the only value in the list.
admin The user is granted administrator privileges. If specified, this value has to be the only value in the list.
login The user can log on to MailStore Server.
changePassword The user can change his own MailStore Server password. This only makes sense if the authentication is set to integrated.
archive The user can run archiving profiles.
modifyArchiveProfiles The user can create, modify and delete archiving profiles.
export The user can run export profiles.
modifyExportProfiles The user can create, modify and delete export profiles.
delete The user can delete messages. Please note that a non-admin user can only delete messages in folders where he has been granted delete access. In addition, compliance settings may be in effect, keeping administrators and users from deleting messages even if they have been granted the privilege to do so.


loginPrivileges

Name Description
none The user is granted no login privileges. If specified, this value has to be the only value in the list.
windows The user is allowed to use the Windows Client.
web The user is allowed to use the Web Access.
outlook The user is allowed to use the Outlook Add-in.
windowsCmd The user is allowed to use scheduled tasks and the command line client of MailStore Client.
imap The user is allowed to access the archive using IMAP.
api The user is allowed to use the Management API. This option is only available for administrators. This option is unavailable in the SPE.

DeleteAppPasswords

Deletes all app passwords of a user, hence all non-interactive logins will fail and have to be reconfigured by the user.

Arguments

Name Type Description
userName string The user name of the user whose app passwords shall be deleted.

DeleteEmptyFolders

Remove folders from folder tree that do not contain emails.

Arguments

Name Type Description
folder string (optional) Entry point in folder tree.

DeleteJob

Deletes a job.

Arguments

Name Type Description
id string The unique identifier of the job to be deleted.

DeleteMessage

Delete a single message

Arguments

Name Type Description
id string Unique ID of message. Format: <store_id>:<message_num>
reason string The reason why that message has to be deleted which will be written into the audit log.

DeleteProfile

Delete an archiving or exporting profile.

Arguments

Name Type Description
id number Unique ID of profile.

DeleteUser

Delete a MailStore user. Neither the user's archive nor the user's archive emails are deleted when deleting a user.

Arguments

Name Type Description
userName string User name of MailStore user.

DetachStore

Detach an archive store.

Arguments

Name Type Description
id number Unique ID of archive store.

DisableMFA

Disables multi-factor authentication of a user.

Arguments

Name Type Description
userName string The user name of the user for whom MFA shall be disabled.

InitializeMFA enables multi-factor authentication of a user.

GetActiveSessions

Get list of current user sessions.

GetChildFolders

Get child folders. Depending on compliance settings this method may return only the first folder hierarchy level.

Arguments

Name Type Description
folder string (optional) Parent folder whose child folders should be returned. If omitted, all archives and folder will be returned.
maxLevels number (optional) Depth of child folders.

GetComplianceConfiguration

Get current compliance configuration settings.

CreateCredential

Create a new credential object that can be used by directory configuration settings or profiles.

Arguments

Name Type Description
type string Credential type. Supported values are:
  • Office365_Modern – credential for authenticating against Entra ID (Office 365 modern authentication).
  • SignedEnvelope – credential used for an export to MailStore Cloud.
description string Human readable description of the credential.
tenantId string (optional) Tenant identifier used for Office365_Modern type credentials.
applicationId string (optional) Application/client identifier used for Office365_Modern type credentials.

DeleteCredential

Delete an existing credential object.

Arguments

Name Type Description
id int Unique ID of the credential to delete.

GetCredential

Get details of a single credential object.

Arguments

Name Type Description
id int Unique ID of the credential whose details should be returned.

GetCredentials

Get the list of all credential objects and their details.

SetCredentialDescription

Set the description of an existing credential object.

Arguments

Name Type Description
id int Unique ID of the credential to modify.
description string New human readable description of the credential.

SetCredentialSettings

Change configuration settings of an existing credential object.

Arguments

Name Type Description
id int Unique ID of the credential to modify.
createNewCertificate bool (optional) Indicates whether a new certificate should be created for this credential (true) or the existing certificate settings should be kept (false).
tenantId string (optional) Tenant identifier used for Office365_Modern type credentials.
applicationId string (optional) Application/client identifier used for Office365_Modern type credentials.

GetDirectoryServicesConfiguration

Get current Directory Services configuration settings.

GetFolderStatistics

Get folder statistics.

GetJobResults

Retrieves list of finished job executions.

Arguments

Name Type Description
fromIncluding string Beginning of time range to fetch.
toExcluding string End of time range to fetch.
timeZoneId string The id of the time zone the date should be converted to, e.g. $Local, which represents the time zone of the operating system.
jobId number (optional) The job id for which to retrieve results.

Interactive Management Shell Example: GetJobResults --fromIncluding="2022-12-01T00:00:00" --toExcluding="2023-01-01T00:00:00" --timeZoneId="$Local" --jobId=1

Use the API command GetTimeZones to retrieve a list of all available time zones and their ids.

GetJobs

Retrieve list of jobs.

GetLicenseInformation

Retrieve license information.

Example license information object:

{
 "productKey": "YOUR-MAIL-STORE-PRODUCT-KEY",
 "productVersion": "13.1.0.12345",
 "maxNamedUsers": 100,
 "namedUsers": 95,
 "unusedNamedUsers": 5,
 "supportExpiryDate": "2023-12-31",
 "supportLevel": "Premium Service",
 "validFrom": null,
 "validTo": null,
 "licensedTo": "MailStore Software GmbH",
 "machineName": "MAILSTORE"
}

The properties validFrom and validTo are only set when Trial or NFR product keys are used.

GetMessages

Get list of messages from a folder.

Arguments

Name Type Description
folder string (optional) Folder whose content to list.

GetProfiles

Get list of archiving and exporting profiles.

Arguments

Name Type Description
raw bool Currently only 'true' is supported.

GetRetentionPolicies

Get the retention policies.

Example retention policies object:

[
  {
    "name": "Keep All Mails for 10 Years",
    "order": 1,
    "enabled": true,
    "searchCriteria": {
     "from": null,
     "to": null,
     "query": null,
     "queryAttachmentContents": false,
     "queryAttachments": false,
     "queryMessageBody": false,
     "querySubject": false,
     "includedArchives": null,
     "excludedArchives": [
       "admin"
       ]
     },
    "period": 10,
    "periodInterval": "year",
    "referenceDateType": "ArchiveDate",
    "delete": false
  }
]

The referenceDateType can bei either ArchiveDate or MessageDate.

GetServerInfo

Get MailStore Server version and machine name.

GetServiceConfiguration

Get MailStore Server service configuration. This includes the path to the Master Database, the location of the audit log, whether the different debug logs are enabled and the endpoint configuration.

GetSmtpSettings

Get current SMTP configuration.

GetStoreAutoCreateConfiguration

Get automatic archive store creation settings.

GetStoreIndexes

Get list of full text indexes.

Arguments

Name Type Description
id number (optional) Unique ID of archive store.

GetStores

Get list of archive stores.

Arguments

Name Type Description
includeSize bool (optional) Includes size of archive store. Default: true. May be slow when running on slow hardware.

GetTimeZones

Get the list of available time zones and their IDs.

The id of the output can be used as timeZoneId in CreateJob, GetJobResults, SetJobSchedule and SendStatusReport and as timeZoneID (with a capital ID) in GetWorkerResults.

GetUserInfo

Get detailed information about user.

Arguments

Name Type Description
userName string User name of MailStore user

GetUsers

Get list of users.

GetWorkerResults

Get results of profile executions.

Arguments

Name Type Description
fromIncluding string Beginning of time range to fetch.
toExcluding string End of time range to fetch.
timeZoneID string The id of the time zone the date should be converted to, e.g. $Local, which represents the time zone of the operating system.
profileID number (optional) Filter results by given profile ID.
userName string (optional) If given, must be equal to the current username. Filters results by current user.

Interactive Management Shell Example: GetWorkerResults --fromIncluding="2022-01-01T00:00:00" --toExcluding="2023-01-01T00:00:00" --timeZoneID="$Local" --profileID=1 --userName="admin"

Use the API command GetTimeZones to retrieve a list of all available time zones and their ids.

Be aware that timeZoneID has to be written with a capital ID where all other commands with a timeZoneId are expecting Id.

GetWorkerResultReport

Get the details of a profile execution result.

Arguments

Name Type Description
id number The ID of the result for which the details should be fetched.

Use the GetWorkerResults command to get the IDs of results.

InitializeMFA

Initializes multi-factor authentication of a user. During the next login with an MFA-capable client, the user has to scan a QR code with a TOTP compatible app and has to enter an MFA code to be able to login. When InitializeMFA is called when MFA is already active for a user, a new secret is generated and the user has to scan the QR code again. This also invalidates all trusted device tokens of a user.

Arguments

Name Type Description
userName string The user name of the user for whom MFA shall be initialized.

DisableMFA disables multi-factor authentication of a user.

MaintainFileSystemDatabases

Run database maintenance on all databases of file system based archive stores.

MergeStore

Merge two archive stores.

Arguments

Name Type Description
id number Unique ID of destination archive store.
sourceId number Unique ID of source archive store.

MoveFolder

Move folder.

Arguments

Name Type Description
fromFolder string Old folder name.
toFolder string New folder name.

ProcessRetentionPolicies

Processes the configured retention policies.

RebuildSelectedStoreIndexes

Rebuild all full-text indexes selected for rebuild.

RebuildStoreIndex

Rebuild search index for given archive folder.

Arguments

Name Type Description
id number Unique ID of archive store.
folder string Name of folder name.

RecoverStore

Recreates a broken Firebird database from recovery records. The archive store must have been upgraded to the latest version and the recovery records must not be corrupt. The archive store must be in the Disabled or Error state.

Arguments

Name Type Description
id number Unique ID of archive store.
encryptionKey string (optional) Encryption key of the archive store. Must be given, when the encryption key cannot be read from the key file of the archive store.
recoverDeletedMessages bool (optional) Defines whether to recover deleted messages.

When the recoverDeletedMessages parameter is set to true, only deleted messages that still have leftovers in the recovery records can be recovered. When an archive store has been compacted with CompactStore or recovery record files have grown to their auto-compacting size of 32 MiB these leftovers could already be removed and deleted messages cannot be recovered.

RecreateRecoveryRecords

Recreates broken Recovery Records of an archive store. Use VerifyStore or VerifyStores to verify the state of the Recovery Records. Cannot be used for external archive stores that store their content in the database.

Arguments

Name Type Description
id number Unique ID of archive store.

RefreshAllStoreStatistics

Refresh statistics of all archive stores.

RenameJob

Rename job.

Arguments

Name Type Description
id number (optional) The unique identifier of the job to be renamed.
name string (optional) The new job name.

RenameStore

Rename archive store

Arguments

Name Type Description
id number Unique ID of archive store.
name string New name of archive store.

RenameUser

Rename a MailStore user.

Arguments

Name Type Description
oldUserName string Old user name.
newUserName string New user name.

RenewMasterKey

Renews the master key which is used to encrypt the encryption keys.

RepairStoreDatabase

Tries to resolve certain issues with archive store databases (e.g. missing database indexes).

Arguments

Name Type Description
id number Unique ID of archive store.

RetryOpenStores

Retry opening stores that failed previously.

RunJobAsync

Run an existing job.

Arguments

Name Type Description
id number The identifier of the job to be run.

RunProfile

Run an existing archiving or exporting profile. Only profiles that are executed on server side can be started by this command. That are all profiles which are listed under E-Mail Servers in the MailStore Client. Client side profiles can be started by using the MailStoreCmd and the commands import-execute and export-execute.

Arguments

Name Type Description
id number Unique profile ID.

RunTemporaryProfile

Run a temporary/non-existent profile. Only profiles that are executed on server side can be started by this command. That are all profiles which are listed under E-Mail Servers in the MailStore Client.

Arguments

Name Type Description
properties json Profile properties.
raw bool Currently only 'true' is supported.

Argument Values

properties

To receive available profile properties create a profile of the desired type via MailStore Client and use the GetProfiles method to receive supported value.

SelectAllStoreIndexesForRebuild

Select all full-text indexes for rebuild.

SendStatusReport

Send a status report to the given recipients.

Arguments

Name Type Description
timespan string Timespan that is covered by the status report.
timeZoneId string The id of the time zone the date should be converted to, e.g. $Local, which represents the time zone of the operating system.
recipients string Comma separated list of recipients that will receive the status report.

Use the API command GetTimeZones to retrieve a list of all available time zones and their ids.

Argument Values

Timespan

Name Description
today The day when the status report is sent.
yesterday The day before the status report is sent.
thisweek The week when the status report is sent.
lastweek The week before the status report is sent.
thismonth The month when the status report is sent.
lastmonth The month before the status report is sent.

SetComplianceConfiguration

Set compliance configuration settings.

Arguments

Name Type Description
config json Compliance configuration.

Argument Values

config

Use GetComplianceConfiguration to receive supported values.

Example settings object:

{
  "adminEmailPreviewEnabled": true,
  "legalHoldEnabled": false,
  "passwordPolicyEnabled": true,
  "logSuccessfulUserActivities": [
    "AdminRestored",
    "ComplianceChangeSettings",
    "FileGroupAttach",
    "FileGroupCreate",
    "FileGroupDetach",
    "FileGroupRename",
    "FileGroupSetProperties",
    "FileGroupSetRequestedState",
    "ProfileChangeUserName",
    "UserAdd",
    "UserDelete",
    "UserRename",
    "UserSetFolderAccess",
    "UserSetMappings",
    "UserUpdate"
  ]
}

SetDirectoryServicesConfiguration

Set directory services configuration settings.

Arguments

Name Type Description
config json Directory services configuration.

Argument Values

config

Use GetDirectoryServicesConfiguration to receive supported value.

SetJobEnabled

Set enabled status of a job.

Arguments

Name Type Description
id number (optional) The unique identifier of the job to be modified.
enabled bool (optional) Boolean value of enabled attribute.

SetJobSchedule

Modify the schedule of a job.

Arguments

Name Type Description
id number The unique identifier of the job to be modified.
timeZoneId string The id of the time zone the date should be converted to, e.g. $Local, which represents the time zone of the operating system.
date string (optional) Datetime string (YYYY-MM-DDThh:mm:ss) for running the job once.
interval number (optional) Interval for running job.
time string (optional) Time for running job. Without additional parameter, this means daily execution.
dayOfWeek string (optional) Day of week to run job. Parameter "time" also required.
dayOfMonth string (optional) Day of month to run job. Parameter "time" also required. dayOfWeek can optionally be used to define further.

Use the API command GetTimeZones to retrieve a list of all available time zones and their ids.

Argument Values

dayOfWeek

Name Description
Sunday Sunday
Monday Monday
Tuesday Tuesday
Wednesday Wednesday
Thursday Thursday
Friday Friday
Saturday Saturday

dayOfMonth

Name Description
1 to 31 Numeric representation of day of month.
Last Last day of month.

interval

Name Description
5 Every 5 minutes.
10 Every 10 minutes.
15 Every 15 minutes.
20 Every 20 minutes.
30 Every 30 minutes.
60 Every hour.
120 Every 2 hours.
180 Every 3 hours.
260 Every 4 hours.
360 Every 6 hours.
720 Every 12 hours.

SetProfileServerSideExecution

Disables or enables the automatic server-sided execution with its parameters.

Arguments

Name Type Description
id number The unique profile ID of the profile to be modified.
automatic bool Enables (true) or disables (false) the profile's server-side automation.
automaticPauseBetweenExecutions number (optional) Integer value (0 - 2147483647) of seconds to pause between re-executing an automatic profile.
automaticMaintenanceWindows string (optional) TimeSpan string (hh:mm-hh:mm, e.g. 22:00-04:00) for the time window where the execution should not be executed, e.g. to schedule maintenance tasks.

Use the API command GetProfiles to retrieve a list of all profiles and their current "serverSideExecution" section details.

The command can be executed with either the argument automatic=false and no additional parameters to disable the automation, or with automatic=true and at least the automaticPauseBetweenExecutions value given. The automaticMaintenanceWindows parameter is optional. Setting an already automated profile to automatic again, will restart the profile.

SetRetentionPolicies

Set retention policies.

Arguments

Name Type Description
config json Retention policy configuration.

To get example policies use the client to create retention policies manually. Then use the API command GetRetentionPolicies to retrieve the json values.
Please be aware that the API is case-sensitive. Especially the archive inclusion/exclusion criteria must not contain upper case characters, as the user archives are always handled lower-case internally. Due to a more complex distributed permission concept, retention policies can not be edited via the API for the MailStore Service Provider Edition.

SetServiceCertificate

Set the X509 certificate that is used by MailStore Server for incoming connections. The certificate must already reside in the computer's local certificate store. The thumbprint of the currently used certificate can be retrieved with GetServiceConfiguration.

Arguments

Name Type Description
thumbprint string Thumbprint of X509 certificate.

SetSmtpSettings

Set SMTP configuration.

Arguments

Name Type Description
settings json SMTP configuration.

Argument Values

settings

Example settings object:

{
  "hostname": "mail.example.com",
  "port": 587,
  "protocol": "SMTP-TLS",
  "ignoreSslPolicyErrors": false,
  "authenticationRequired": true,
  "username": "[email protected]",
  "password": "userpassword",
  "fromDisplayName": "Sending User",
  "fromEmailAddress": "[email protected]",
  "recipientEmailAddresses": ["[email protected]", "[email protected]"]
}

SetStoreAutoCreateConfiguration

Set configuration for automatic archive store creation.

Arguments

Name Type Description
config json Archive store automatic creation configuration.

Argument Values

config

{
  "sizeThreshold" : int or null,
  "databaseBaseDirectory" : string,
  "contentBaseDirectory" : string,
  "indexBaseDirectory" : string
}

SetStoreProperties

Set properties of archive store.

Arguments

Name Type Description
id number Set properties of archive store.
type string (optional)
databaseName string (optional) Name of database on Microsoft SQL Server or PostgreSQL server.
databasePath string (optional) Path to directory in which database folder information and email meta data are stored.
contentPath string (optional) Path to directory in which email headers and contents are stored.
indexPath string (optional) Path to directory in which full text search indexes are stored.
serverName string (optional) Name of Microsoft SQL Server or PostgreSQL server.
userName string (optional) User name for accessing Microsoft SQL Server or PostgreSQL server.
password string (optional) Password for accessing Microsoft SQL Server or PostgreSQL server.

Argument Values

type

Name Description
FileSystemInternal Advanced file system-based archive store.
SQLServer Microsoft SQL Server-based archive store.
PostgreSQL PostgreSQL server-based archive store.

SetStoreRequestedState

Set state of archive store.

Arguments

Name Type Description
id number Unique ID of archive store.
requestedState string (optional) State of archive store after attaching.

Argument Values

requestedState

Name Description
current Same as Normal but new messages will be archived in the archive store that is set to Current.
normal The content of archives store is available to users and can be modified if the user has the appropriate permission.
writeProtected The content of write protected archive stores is available to users, but cannot be modified (e.g. delete or move messages, rename or move folders)
disabled Disabled archive stores are not in use but the instance still knows about their existence. Therefore the content is not available to users.

SetUserAuthentication

Set authentication settings of a MailStore user.

Arguments

Name Type Description
userName string User name of MailStore user.
authentication string Authentication method. Either 'integrated' or 'directoryServices'.

SetUserDistinguishedName

Set the LDAP distinguished name of a MailStore user.

Arguments

Name Type Description
userName string User name of MailStore user.
distinguishedName string (optional) LDAP DN string.

SetUserEmailAddresses

Set email addresses of MailStore user.

Arguments

Name Type Description
userName string User name of MailStore user.
emailAddresses string (optional) List of email addresses.

SetUserFullName

Set full name of MailStore user.

Arguments

Name Type Description
userName string User name of MailStore user.
fullName string (optional) Full name of MailStore user.

SetUserLoginPrivileges

Set login privileges of a MailStore user.

Arguments

Name Type Description
userName string User name of MailStore user.
loginPrivileges string Comma separated list of login privileges.

Argument Values

loginPrivileges

Name Description
none The user is granted no login privileges. If specified, this value has to be the only value in the list.
windows The user is allowed to use the Windows Client.
web The user is allowed to use the Web Access.
outlook The user is allowed to use the Outlook Add-in.
windowsCmd The user is allowed to use scheduled tasks and the command line client of MailStore Client.
imap The user is allowed to access the archive using IMAP.
api The user is allowed to use the Management API. This option is only available for administrators. This option is unavailable in the SPE.

SetUserPassword

Set password of MailStore user.

Arguments

Name Type Description
userName string User name of MailStore user.
password string Password of MailStore user.

SetUserPop3UserNames

Set POP3 user name of MailStore user.

Arguments

Name Type Description
userName string User name of MailStore user.
pop3UserNames string (optional) Comma separated list of POP3 user names.

SetUserPrivileges

Set privileges of MailStore user.

Arguments

Name Type Description
userName string User name of MailStore user.
privileges string Comma separated list of privileges.

Argument Values

privileges

Name Description
none The user is granted no global privileges. If specified, this value has to be the only value in the list.
admin The user is granted administrator privileges. If specified, this value has to be the only value in the list.
login The user can log on to MailStore Server.
changePassword The user can change his own MailStore Server password. This only makes sense if the authentication is set to integrated.
archive The user can run archiving profiles.
modifyArchiveProfiles The user can create, modify and delete archiving profiles.
export The user can run export profiles.
modifyExportProfiles The user can create, modify and delete export profiles.
delete The user can delete messages. Please note that a non-admin user can only delete messages in folders where he has been granted delete access. In addition, compliance settings may be in effect, keeping administrators and users from deleting messages even if they have been granted the privilege to do so.

SetUserPrivilegesOnAllFolders

Set privileges on all folders for MailStore user, except for the folders that are excluded

Arguments

Name Type Description
userName string User name of MailStore user.
privileges string Comma separated list of folder privileges.
excludeFolders string (optional) Comma separated list of folders to exclude.

Argument Values

privileges

Name Description
read The user is granted read access to the specified folders.
write The user is granted write access to the specified folders. Messages can be moved within an archive.
delete The user is granted delete access to the specified folders.

SetUserPrivilegesOnFolder

Set privileges on folder for MailStore user.

Arguments

Name Type Description
userName string User name of MailStore user.
folder string Folder name.
privileges string Comma separated list of folder privileges.

Argument Values

privileges

Name Description
none The user is denied access to the specified folder. If specified, this value has to be the only value in the list. This effectively removes all privileges on the specified folder.
read The user is granted read access to the specified folder.
write The user is granted write access to the specified folder. Messages can be moved within an archive.
delete The user is granted delete access to the specified folder.

SyncUsersWithDirectoryServices

Sync users of MailStore instance with directory services.

Arguments

Name Type Description
dryRun bool (optional) Simulate sync only.

TestSmtpSettings

Test current SMTP configuration.

TransferStores

Copy the content of one or more archive store into another archive store.

Arguments

Name Type Description
sourceStores string Comma-separated list of one or more source archive stores.
targetStore number (optional) The target store of the messages to be copied. If not given, the archive store in the "current" state will be used.
startIndex string (optional) A string in the format "archiveStoreId:messageId". The transfer process starts with the this message.

UnlockStore

Unlock a foreign archive store. In case an archive store from a foreign MailStore installation is attached, this method can be used to unlock that archive store.

Arguments

Name Type Description
id number Unique ID of archive store to unlock.
passphrase string Product key or recovery key of the foreign MailStore installation.

UpgradeStore

Upgrade an archive store from an older version to the current format.

Arguments

Name Type Description
id number Unique ID of archive store.

UpgradeStores

Upgrade all archive stores from an older version to the current format.

VerifyStore

Verify archive stores consistency.

Arguments

Name Type Description
id number The unique identifier of the archive store to be verified.
includeIndexes bool Defines whether to verify the search indexes as well. Default: true. May be slow when running on slow hardware.

VerifyStores

Verify consistency of all archive stores.

Arguments

Name Type Description
includeIndexes bool Defines whether to verify the search indexes as well. Default: true. May be slow when running on slow hardware.