Difference between revisions of "Administration API - Function Reference"

[unchecked revision][pending revision]
 
(86 intermediate revisions by 3 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 30: Line 52:
  
 
=== Argument Values ===
 
=== Argument Values ===
 +
 +
==== type ====
 +
{| class="wikitable"
 +
! width=270px | Name
 +
! Description
 +
|-
 +
| <tt>FileSystemInternal</tt>
 +
| Advanced file system-based archive store.
 +
|-
 +
| <tt>SQLServer</tt>
 +
| Microsoft SQL Server-based archive store.
 +
|-
 +
| <tt>PostgreSQL</tt>
 +
| PostgreSQL server-based archive store.
 +
|}
  
 
==== requestedState ====
 
==== requestedState ====
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">
+
{| class="wikitable"
{
+
! width=270px | Name
  "instanceID" : string,
+
! Description
  "alias" : string,
+
|-
  "displayName" : string,
+
| <tt>Sunday</tt>
  "instanceHost" : string,
+
| Sunday
  "startMode" : string,
+
|-
  "baseDirectory" : string,
+
| <tt>Monday</tt>
  "debugLogEnabled" : bool,
+
| Monday
  "vssWriterEnabled" : bool
+
|-
}
+
| <tt>Tuesday</tt>
</source>
+
| Tuesday
 +
|-
 +
| <tt>Wednesday</tt>
 +
| Wednesday
 +
|-
 +
| <tt>Thursday</tt>
 +
| Thursday
 +
|-
 +
| <tt>Friday</tt>
 +
| Friday
 +
|-
 +
| <tt>Saturday</tt>
 +
| Saturday
 +
|}
 +
 
 +
==== dayOfMonth ====
 +
{| class="wikitable"
 +
! width=270px | Name
 +
! Description
 +
|-
 +
| <tt>1 to 31</tt>
 +
| Numeric representation of day of month.
 +
|-
 +
| <tt>Last</tt>
 +
| Last day of month.
 +
|}
 +
 
 +
==== interval ====
 +
{| class="wikitable"
 +
! width=270px | Name
 +
! Description
 +
|-
 +
| <tt>5</tt>
 +
| Every 5 minutes.
 +
|-
 +
| <tt>10</tt>
 +
| Every 10 minutes.
 +
|-
 +
| <tt>15</tt>
 +
| Every 15 minutes.
 +
|-
 +
| <tt>20</tt>
 +
| Every 20 minutes.
 +
|-
 +
| <tt>30</tt>
 +
| Every 30 minutes.
 +
|-
 +
| <tt>60</tt>
 +
| Every hour.
 +
|-
 +
| <tt>120</tt>
 +
| 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.
 +
|}
  
== CreateInstanceHost ==
+
== CreateProfile ==
Create a new Instance Host.
+
Create a new archiving or exporting profile.
  
 
=== Arguments ===
 
=== Arguments ===
Line 169: Line 286:
 
! Description
 
! Description
 
|-
 
|-
| <tt>config</tt>
+
| <tt>properties</tt>
 
| json  
 
| json  
| Configuration of new Instance Host.
+
| Profile properties.
 +
|-
 +
| <tt>raw</tt>
 +
| bool
 +
| 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.
{
 
  "serverName" : string,
 
  "port" : number,
 
  "serverCertificate" : {
 
    "thumbprint" : string
 
  }
 
}
 
</source>
 
 
 
== CreateLicenseRequest ==
 
Create and return data of a license request.
 
  
 
== CreateStore ==
 
== CreateStore ==
Line 198: Line 308:
 
! 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 207: Line 313:
 
| Meaningful name of archive store.
 
| Meaningful name of archive store.
 
|-
 
|-
| <tt>path</tt>
+
| <tt>type</tt>
| string  
+
| string (optional)
| 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 217: Line 351:
  
 
=== Argument Values ===
 
=== Argument Values ===
 +
 +
==== type ====
 +
{| class="wikitable"
 +
! width=270px | Name
 +
! Description
 +
|-
 +
| <tt>FileSystemInternal</tt>
 +
| Standard archive store.
 +
|-
 +
| <tt>SQLServer</tt>
 +
| Microsoft SQL Server-based archive store.
 +
|-
 +
| <tt>PostgreSQL</tt>
 +
| PostgreSQL server-based archive store.
 +
|}
  
 
==== requestedState ====
 
==== requestedState ====
Line 236: Line 385:
 
|}
 
|}
  
== CreateSystemAdministrator ==
+
== CreateUser ==
Create a new 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 245: Line 394:
 
! Description
 
! Description
 
|-
 
|-
| <tt>config</tt>
+
| <tt>userName</tt>
| json
+
| string
| Configuration of new SPE system administrator.
+
| User name of new MailStore user.
 +
|-
 +
| <tt>privileges</tt>
 +
| string
 +
| Comma separated list of privileges.
 +
|-
 +
| <tt>fullName</tt>
 +
| string (optional)
 +
| Full name of user.
 +
|-
 +
| <tt>distinguishedName</tt>
 +
| string (optional)
 +
| LDAP DN string.
 +
|-
 +
| <tt>authentication</tt>
 +
| string (optional)
 +
| Authentication setting for user: 'integrated or 'directoryServices'.
 
|-
 
|-
 
| <tt>password</tt>
 
| <tt>password</tt>
| string  
+
| string (optional)
| Password of new SPE system administrator.
+
| Password of new user.
 
|}
 
|}
  
 
=== Argument Values ===
 
=== Argument Values ===
  
==== config ====
+
==== privileges ====
<source lang="js" smart-tabs="true" toolbar="false" gutter="false">
+
{{Administration_API_User_Privileges}}
{
 
  "userName" : string,
 
  "fullName" : string
 
}
 
</source>
 
  
== DeleteClientAccessServer ==
+
== DeleteEmptyFolders ==
Delete Client Access Server from management database.
+
Remove folders from folder tree that do not contain emails.
  
 
=== Arguments ===
 
=== Arguments ===
Line 273: Line 433:
 
! Description
 
! Description
 
|-
 
|-
| <tt>serverName</tt>
+
| <tt>folder</tt>
| string  
+
| string (optional)
| Name of Client Access Server.
+
| Entry point in folder tree.
 
|}
 
|}
  
== DeleteInstanceHost ==
+
== DeleteJob ==
Delete Instance Host from management database.
+
Deletes a job.
  
 
=== Arguments ===
 
=== Arguments ===
Line 287: Line 447:
 
! Description
 
! Description
 
|-
 
|-
| <tt>serverName</tt>
+
| <tt>id</tt>
| string  
+
| string
| Name of Instance Host.
+
| The unique identifier of the job to be deleted.
 
|}
 
|}
  
== DeleteInstances ==
+
== DeleteMessage ==
Delete one or multiple MailStore Instances
+
Delete a single message
  
 
=== Arguments ===
 
=== Arguments ===
Line 301: Line 461:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceFilter</tt>
+
| <tt>id</tt>
| string  
+
| string
| Instance filter string.
+
| Unique ID of message. Format: <store_id>:<message_num>
 +
|-
 +
| <tt>reason</tt>
 +
| string
 +
| The reason why that message has to be deleted which will be written into the audit log.
 
|}
 
|}
  
=== Argument Values ===
+
== DeleteProfile ==
 +
Delete an archiving or exporting profile.
  
==== instanceFilter ====
+
=== Arguments ===
 
{| class="wikitable"
 
{| class="wikitable"
! width=270px | Name
+
! width=150px | Name
 +
! width=120px | Type
 
! Description
 
! Description
 
|-
 
|-
| <tt>*</tt>
+
| <tt>id</tt>
| All instances
+
| number
|-
+
| Unique ID of profile.
| <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
 
 
|}
 
|}
  
== DeleteSystemAdministrator ==
+
== DeleteUser ==
Delete SPE system administrator.
+
Delete a MailStore user.
 +
Neither the user's archive nor the user's archive emails are deleted when deleting a user.
  
 
=== Arguments ===
 
=== Arguments ===
Line 340: Line 496:
 
| <tt>userName</tt>
 
| <tt>userName</tt>
 
| string  
 
| string  
| User name of SPE system administrator.
+
| User name of MailStore user.
 
|}
 
|}
  
 
== DetachStore ==
 
== DetachStore ==
Detach archive store
+
Detach an archive store.
  
 
=== Arguments ===
 
=== Arguments ===
Line 351: Line 507:
 
! 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>
Line 361: Line 513:
 
|}
 
|}
  
== FreezeInstances ==
+
== GetActiveSessions ==
Freeze a MailStore Instance
+
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 ===
 
=== Arguments ===
Line 370: Line 526:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceFilter</tt>
+
| <tt>folder</tt>
| string  
+
| string (optional)
| Instance filter string.
+
| Parent folder whose child folders should be returned. If omitted, all archives and folder will be returned.
 +
|-
 +
| <tt>maxLevels</tt>
 +
| number (optional)
 +
| Depth of child folders.
 
|}
 
|}
  
=== Argument Values ===
+
== GetComplianceConfiguration ==
 +
Get current compliance configuration settings.
 +
 
 +
== GetDirectoryServicesConfiguration ==
 +
Get current Directory Services configuration settings.
  
==== instanceFilter ====
+
== GetFolderStatistics ==
{| class="wikitable"
+
Get folder statistics.
! 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
 
|}
 
  
== GetArchiveAdminEnabled ==
+
== GetJobResults ==
Get currrent state of archive admin access.
+
Retrieves list of finished job executions.
  
 
=== Arguments ===
 
=== Arguments ===
Line 407: Line 553:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>fromIncluding</tt>
 +
| string
 +
| Beginning of time range to fetch.
 +
|-
 +
| <tt>toExcluding</tt>
 
| string  
 
| string  
| Unique ID of MailStore instance in which this command is invoked.
+
| 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.
 
|}
 
|}
  
== GetClientAccessServers ==
+
Interactive Management Shell Example: ''GetJobResults --fromIncluding="2016-12-01T00:00:00" --toExcluding="2016-12-31T23:59:59" --timeZoneId="$Local" --jobId=1''
Get list of Client Access Servers.
 
  
=== Arguments ===
+
Use the API command [[Administration_API_-_Function_Reference#GetTimeZones|GetTimeZones]] to retrieve a list of all available time zones and their ids.
{| class="wikitable"
+
 
! width=150px | Name
+
== GetJobs ==
! width=120px | Type
+
Retrieve list of jobs.
! Description
+
 
|-
+
== GetLicenseInformation ==
| <tt>serverNameFilter</tt>
+
Retrieve license information.
| string (optional)
+
 
| Server name filter string.
+
Example license information object:
|-
 
| <tt>withServiceStatus</tt>
 
| bool
 
| Include service status or not.
 
|}
 
  
=== Argument Values ===
+
{
 +
  "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"
 +
}
  
==== serverNameFilter ====
+
The properties ''validFrom'' and ''validTo'' are only set when Trial or NFR product keys are used.
{| class="wikitable"
 
! width=270px | Name
 
! Description
 
|-
 
| <tt>null</tt>
 
| All servers
 
|-
 
| <tt>serverName</tt>
 
| Only the given serverName. Must match exactly.
 
|}
 
  
== GetDirectoriesOnInstanceHost ==
+
== GetMessages ==
Get file system directory structure from Instance Host.
+
Get list of messages from a folder.
  
 
=== Arguments ===
 
=== Arguments ===
Line 453: Line 607:
 
! Description
 
! Description
 
|-
 
|-
| <tt>serverName</tt>
+
| <tt>folder</tt>
| string
 
| Name of Instance Host.
 
|-
 
| <tt>path</tt>
 
 
| string (optional)
 
| string (optional)
| Path of directory to obtain subdirectories from.
+
| Folder whose content to list.
 
|}
 
|}
  
== GetEnvironmentInfo ==
+
== GetProfiles ==
Return general information about SPE environment.
+
Get list of archiving and exporting profiles.
 
 
== GetIndexConfiguration ==
 
Get list of attachment file types to index.
 
  
 
=== Arguments ===
 
=== Arguments ===
Line 474: Line 621:
 
! 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.
 
|}
 
|}
  
== GetInstanceConfiguration ==
+
== GetRetentionPolicies ==
Get configuration of MailStore Instance.
+
Get the retention policies.
  
=== Arguments ===
+
Example retention policies object:
{| class="wikitable"
 
! width=150px | Name
 
! width=120px | Type
 
! Description
 
|-
 
| <tt>instanceID</tt>
 
| string
 
| Unique ID of MailStore instance in which this command is invoked.
 
|}
 
  
== GetInstanceHosts ==
+
[
Get list of Instance Hosts.
+
  {
 +
    "name": "Keep All Mails for 10 Years",
 +
    "order": 1,
 +
    "enabled": true,
 +
    "searchCriteria": null,
 +
    "period": 10,
 +
    "periodInterval": "year",
 +
    "delete": false
 +
  }
 +
]
  
=== Arguments ===
+
== GetServerInfo ==
{| class="wikitable"
+
Get MailStore Server version and machine name.
! width=150px | Name
 
! width=120px | Type
 
! Description
 
|-
 
| <tt>serverNameFilter</tt>
 
| string (optional)
 
| Server name filter string.
 
|}
 
  
=== Argument Values ===
+
== 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.
  
==== serverNameFilter ====
+
== GetSmtpSettings ==
{| class="wikitable"
+
Get current SMTP configuration.
! width=270px | Name
 
! Description
 
|-
 
| <tt>null</tt>
 
| All servers
 
|-
 
| <tt>serverName</tt>
 
| Only the given serverName. Must match exactly.
 
|}
 
  
== GetInstanceProcessLiveStatistics ==
+
== GetStoreIndexes ==
Get live statistics from instance process.
+
Get list of full text indexes.
  
 
=== Arguments ===
 
=== Arguments ===
Line 530: Line 661:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>id</tt>
| string
+
| number (optional)
| Unique ID of MailStore instance in which this command is invoked.
+
| Unique ID of archive store.
 
|}
 
|}
  
== GetInstances ==
+
== GetStores ==
Get list of instances.
+
Get list of archive stores.
  
 
=== Arguments ===
 
=== Arguments ===
Line 544: Line 675:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceFilter</tt>
+
| <tt>includeSize</tt>
| string
+
| bool (optional)
| Instance filter string.
+
| Includes size of archive store. Default: ''true''. May be slow when running on slow hardware.
 
|}
 
|}
  
=== Argument Values ===
+
== GetTimeZones ==
 +
Get a list of available time zones.
  
==== instanceFilter ====
+
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]].
{| class="wikitable"
 
! 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
 
|}
 
  
== GetInstanceStatistics ==
+
== GetUserInfo ==
Get archive statistics from instance.
+
Get detailed information about user.
  
 
=== Arguments ===
 
=== Arguments ===
Line 581: Line 694:
 
! 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
 
|}
 
|}
  
== GetServiceStatus ==
+
== GetUsers ==
Get current status of all SPE services.
+
Get list of users.
  
== GetStoreAutoCreateConfiguration ==
+
== GetWorkerResults ==
Get automatic archive store creation settings.
+
Get results of profile executions.
  
 
=== Arguments ===
 
=== Arguments ===
Line 598: Line 711:
 
! 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>profileID</tt>
 +
| number (optional)
 +
| Filter results by given profile ID.
 +
|-
 +
| <tt>userName</tt>
 +
| string (optional)
 +
| Filter results by given user name.
 
|}
 
|}
  
== GetStores ==
+
Interactive Management Shell Example: ''GetWorkerResults --fromIncluding="2016-01-01T00:00:00" --toExcluding="2016-12-31T23:59:59" --timeZoneID="$Local" --profileID=1 --userName="admin"''
Get list of archive stores.
 
  
=== Arguments ===
+
Use the API command [[Administration_API_-_Function_Reference#GetTimeZones|GetTimeZones]] to retrieve a list of all available time zones and their ids.
{| class="wikitable"
 
! width=150px | Name
 
! width=120px | Type
 
! Description
 
|-
 
| <tt>instanceID</tt>
 
| string
 
| Unique ID of MailStore instance in which this command is invoked.
 
|}
 
  
== GetSystemAdministrators ==
+
Be aware that ''timeZoneID'' has to be written with a capital ''ID'' where all other commands with a ''timeZoneId'' are expecting ''Id''.
Get list of system administrators.
 
  
 
== MaintainFileSystemDatabases ==
 
== MaintainFileSystemDatabases ==
Execute maintenance task on archive store databases.
+
Run database maintenance on all databases of file system based archive stores.
 
 
=== 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.
 
|}
 
  
 
== MergeStore ==
 
== MergeStore ==
Line 642: Line 749:
 
! 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>
Line 656: Line 759:
 
|}
 
|}
  
== PairWithManagementServer ==
+
== MoveFolder ==
Pair server role with Management Server.
+
Move folder.
  
 
=== Arguments ===
 
=== Arguments ===
Line 665: Line 768:
 
! Description
 
! Description
 
|-
 
|-
| <tt>serverType</tt>
+
| <tt>fromFolder</tt>
 
| string  
 
| string  
| Type of server role.
+
| Old folder name.
 
|-
 
|-
| <tt>serverName</tt>
+
| <tt>toFolder</tt>
 
| string  
 
| string  
| Name of server that hosts 'serverType' role.
+
| New folder name.
|-
 
| <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 ===
+
== ProcessRetentionPolicies ==
 +
Processes the configured retention policies.
  
==== serverType ====
+
== RebuildSelectedStoreIndexes ==
{| class="wikitable"
+
Rebuild all full-text indexes selected for rebuild.
! width=270px | Name
 
! Description
 
|-
 
| <tt>instanceHost</tt>
 
| Pairing an Instance Host.
 
|-
 
| <tt>clientAccessServer</tt>
 
| Pairing a Client Access Server.
 
|}
 
 
 
== Ping ==
 
Send a keep alive packet.
 
  
== RebuildSelectedStoreIndexes ==
+
== RebuildStoreIndex ==
Rebuild search indexes of selected archive stores.
+
Rebuild search index for given archive folder.
  
 
=== Arguments ===
 
=== Arguments ===
Line 708: Line 792:
 
! 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.
|}
 
 
 
== RefreshAllStoreStatistics ==
 
Refresh archive store statistics.
 
 
 
=== Arguments ===
 
{| class="wikitable"
 
! width=150px | Name
 
! width=120px | Type
 
! Description
 
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>folder</tt>
 
| string  
 
| string  
| Unique ID of MailStore instance in which this command is invoked.
+
| Name of folder name.
 
|}
 
|}
  
== RenameStore ==
+
== RecoverStore ==
Rename archvive store
+
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 ===
 
=== Arguments ===
Line 735: Line 809:
 
! 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>
Line 744: Line 814:
 
| Unique ID of archive store.
 
| Unique ID of archive store.
 
|-
 
|-
| <tt>name</tt>
+
| <tt>recoverDeletedMessages</tt>
| string
+
| bool (optional)
| New name of archive store.
+
| Defines whether to recover deleted messages.
 
|}
 
|}
  
== RestartInstances ==
+
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.
Restart one or multiple instances.
+
 
 +
== RecreateRecoveryRecords ==
 +
Recreates broken Recovery Records of an archive store. Use ''VerifyStore'' to verify the state of the Recovery Records. Cannot be used for external archive stores that store their content in the database.
  
 
=== Arguments ===
 
=== Arguments ===
Line 758: Line 830:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceFilter</tt>
+
| <tt>id</tt>
| string
+
| number
| Instance filter string.
+
| Unique ID of archive store.
 
|}
 
|}
  
=== Argument Values ===
+
== RefreshAllStoreStatistics ==
 +
Refresh statistics of all archive stores.
  
==== instanceFilter ====
+
== RenameJob ==
{| class="wikitable"
+
Rename job.
! 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
 
|}
 
 
 
== RetryOpenStores ==
 
Retry opening stores that failed previously
 
  
 
=== Arguments ===
 
=== Arguments ===
Line 795: Line 847:
 
! 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 renamed.
 +
|-
 +
| <tt>name</tt>
 +
| string (optional)
 +
| The new job name.
 
|}
 
|}
  
== SelectAllStoreIndexesForRebuild ==
+
== RenameStore ==
Select all archive store for rebuild.
+
Rename archive store
  
 
=== Arguments ===
 
=== Arguments ===
Line 809: Line 865:
 
! 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.
 
|}
 
|}
  
== SetArchiveAdminEnabled ==
+
== RenameUser ==
Enable or disable archive admin access.
+
Rename a MailStore user.
  
 
=== Arguments ===
 
=== Arguments ===
Line 823: Line 883:
 
! 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>enabled</tt>
+
| <tt>newUserName</tt>
| bool
+
| string
| Enable or disable flag.
+
| New user name.
 
|}
 
|}
  
== SetClientAccessServerConfiguration ==
+
== RenewMasterKey ==
Set the configuration of a Client Access Server.
+
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 841: Line 904:
 
! Description
 
! Description
 
|-
 
|-
| <tt>config</tt>
+
| <tt>id</tt>
| json
+
| number
| Client Access Server configuration.
+
| Unique ID of archive store.
 
|}
 
|}
  
=== Argument Values ===
+
== RetryOpenStores ==
 +
Retry opening stores that failed previously.
  
==== config ====
+
== RunJobAsync ==
<source lang="js" smart-tabs="true" toolbar="false" gutter="false">
+
Run an existing job.
{
 
  "serverName" : string,
 
  "port" : number,
 
  "serverCertificate" : {
 
    "thumbprint" : string
 
  }
 
}
 
</source>
 
 
 
== SetIndexConfiguration ==
 
Set full text search index configuration.
 
  
 
=== Arguments ===
 
=== Arguments ===
Line 868: Line 921:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>id</tt>
| string
+
| number
| Unique ID of MailStore instance in which this command is invoked.
+
| The identifier of the job to be run.
|-
 
| <tt>config</tt>
 
| json
 
| Full text search index configuration.
 
 
|}
 
|}
  
=== Argument Values ===
+
== 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 [[MailStore_Server_Management_Shell|MailStoreCmd]] and the commands ''import-execute'' and ''export-execute''.
==== config ====
 
Use GetIndexConfiguration to reveive supported value.
 
 
 
== SetInstanceConfiguration ==
 
Set configuration of MailStore Instance.
 
  
 
=== Arguments ===
 
=== Arguments ===
Line 891: Line 935:
 
! Description
 
! Description
 
|-
 
|-
| <tt>config</tt>
+
| <tt>id</tt>
| json
+
| number
| Instance 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">
 
{
 
  "instanceID" : string,
 
  "alias" : string,
 
  "displayName" : string,
 
  "instanceHost" : string,
 
  "startMode" : string,
 
  "baseDirectory" : string,
 
  "debugLogEnabled" : bool,
 
  "vssWriterEnabled" : bool
 
}
 
</source>
 
 
 
== SetInstanceHostConfiguration ==
 
Set configuration of Instance Host.
 
  
 
=== Arguments ===
 
=== Arguments ===
Line 921: Line 949:
 
! Description
 
! Description
 
|-
 
|-
| <tt>config</tt>
+
| <tt>properties</tt>
 
| json  
 
| json  
| Instance Host configuration.
+
| Profile properties.
|}
 
 
 
=== Argument Values ===
 
 
 
==== 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 ===
 
{| class="wikitable"
 
! width=150px | Name
 
! width=120px | Type
 
! 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>config</tt>
 
| json
 
| Archive store automatic creation configuration.
 
 
|}
 
|}
  
 
=== 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 use the GetProfiles method to receive supported value.
{
 
  "enabled" : bool,
 
  "interval" : string,
 
  "sizeThreshold" : string,
 
  "numberOfMessagesThreshold" : number,
 
  "baseDirectory" : string
 
}
 
</source>
 
  
== SetStorePath ==
+
== SelectAllStoreIndexesForRebuild ==
Set the path to archive store data.
+
Select all full-text indexes for rebuild.
  
=== Arguments ===
+
== SendStatusReport ==
{| class="wikitable"
+
Send a status report to the given recipients.
! width=150px | Name
 
! width=120px | Type
 
! Description
 
|-
 
| <tt>instanceID</tt>
 
| string
 
| Unique ID of MailStore instance in which this command is invoked.
 
|-
 
| <tt>id</tt>
 
| number
 
| Unique ID of archive store.
 
|-
 
| <tt>path</tt>
 
| string
 
| Path to archvie store data.
 
|}
 
 
 
== SetStoreRequestedState ==
 
Set state of archive store.
 
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,002: Line 975:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>timespan</tt>
| string  
+
| string
| Unique ID of MailStore instance in which this command is invoked.
+
| Timespan that is covered by the status report.
 
|-
 
|-
| <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>requestedState</tt>
+
| <tt>recipients</tt>
| string  
+
| string
| State of archive store.
+
| 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 ===
  
==== requestedState ====
+
==== Timespan ====
 
{| class="wikitable"
 
{| class="wikitable"
 
! width=270px | Name
 
! width=270px | Name
 
! Description
 
! Description
 
|-
 
|-
| <tt>current</tt>
+
| <tt>today</tt>
| Same as Normal but new messages will be archived in the archive store that is set to Current.
+
| The day when the status report is sent.
 +
|-
 +
| <tt>yesterday</tt>
 +
| The day before the status report is sent.
 +
|-
 +
| <tt>thisweek</tt>
 +
| The week when the status report is sent.
 
|-
 
|-
| <tt>normal</tt>
+
| <tt>lastweek</tt>
| The content of archives store is available to users and can be modified if the user has the appropriate permission.
+
| The week before the status report is sent.
 
|-
 
|-
| <tt>writeProtected</tt>
+
| <tt>thismonth</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)
+
| The month when the status report is sent.
 
|-
 
|-
| <tt>disabled</tt>
+
| <tt>lastmonth</tt>
| Disabled archive stores are not in use but the instance still knows about their existence. Therefore the content is not available to users.
+
| The month before the status report is sent.
 
|}
 
|}
  
== SetSystemAdministratorConfiguration ==
+
== SetComplianceConfiguration ==
Set SPE system adminstrator configuration.
+
Set compliance configuration settings.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,046: Line 1,026:
 
| <tt>config</tt>
 
| <tt>config</tt>
 
| json  
 
| json  
| SPE system adminstrator configuration.
+
| Compliance configuration.
 
|}
 
|}
  
Line 1,052: Line 1,032:
  
 
==== config ====
 
==== config ====
 +
Use [[Administration_API_-_Function_Reference#GetComplianceConfiguration|GetComplianceConfiguration]] to receive supported values.
 +
 +
Example settings object:
 
<source lang="js" smart-tabs="true" toolbar="false" gutter="false">
 
<source lang="js" smart-tabs="true" toolbar="false" gutter="false">
 
{
 
{
   "fullName" : string
+
   "adminEmailPreviewEnabled": true,
 +
  "legalHoldEnabled": false,
 +
  "passwordPolicyEnabled": true,
 +
  "logSuccessfulUserActivities": [
 +
    "AdminRestored",
 +
    "ComplianceChangeSettings",
 +
    "FileGroupAttach",
 +
    "FileGroupCreate",
 +
    "FileGroupDetach",
 +
    "FileGroupRename",
 +
    "FileGroupSetProperties",
 +
    "FileGroupSetRequestedState",
 +
    "ProfileChangeUserName",
 +
    "UserAdd",
 +
    "UserDelete",
 +
    "UserRename",
 +
    "UserSetFolderAccess",
 +
    "UserSetMappings",
 +
    "UserUpdate"
 +
  ]
 
}
 
}
 
</source>
 
</source>
  
== SetSystemAdministratorPassword ==
+
== SetDirectoryServicesConfiguration ==
Set password for SPE system administrator.
+
Set directory services configuration settings.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,067: Line 1,069:
 
! Description
 
! Description
 
|-
 
|-
| <tt>userName</tt>
+
| <tt>config</tt>
| string
+
| json
| User name of SPE system administrator.
+
| Directory services configuration.
|-
 
| <tt>password</tt>
 
| string
 
| New password for SPE system administrator.
 
|}
 
 
 
== StartInstances ==
 
Start one or multiple MailStore Instances.
 
 
 
=== Arguments ===
 
{| class="wikitable"
 
! width=150px | Name
 
! width=120px | Type
 
! Description
 
|-
 
| <tt>instanceFilter</tt>
 
| string
 
| Instance filter string.
 
 
|}
 
|}
  
 
=== 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
 
|}
 
  
== StopInstances ==
+
== SetJobEnabled ==
Stop one or multiple MailStore Instances.
+
Set enabled status of a job.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,122: Line 1,088:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceFilter</tt>
+
| <tt>id</tt>
| string
+
| number (optional)
| Instance filter string.
+
| The unique identifier of the job to be modified.
|}
 
 
 
=== Argument Values ===
 
 
 
==== instanceFilter ====
 
{| class="wikitable"
 
! width=270px | Name
 
! Description
 
 
|-
 
|-
| <tt>*</tt>
+
| <tt>enabled</tt>
| All instances
+
| bool (optional)
|-
+
| Boolean value of '''enabled''' attribute.
| <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
 
 
|}
 
|}
  
== ThawInstances ==
+
== SetJobSchedule ==
Thaw one or multiple MailStore Instances.
+
Modify the schedule of a job.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,158: Line 1,105:
 
! width=120px | Type
 
! width=120px | Type
 
! Description
 
! Description
|-
 
| <tt>instanceFilter</tt>
 
| string
 
| Instance filter string.
 
|}
 
 
=== Argument Values ===
 
 
==== instanceFilter ====
 
{| class="wikitable"
 
! 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 ==
 
Upgrade archive store from MailStore Server 5 or older to current format.
 
 
=== 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>id</tt>
 
| <tt>id</tt>
 
| number  
 
| number  
| Unique ID of archive store.
+
| The unique identifier of the job to be modified.
|}
 
 
 
== VerifyStore ==
 
Verify archive stores consistency.
 
 
 
=== Arguments ===
 
{| class="wikitable"
 
! width=150px | Name
 
! width=120px | Type
 
! Description
 
 
|-
 
|-
| <tt>instanceID</tt>
+
| <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.
|}
 
 
 
== ClearUserPrivilegesOnFolders ==
 
Removes all privileges of a user on all archive folders.
 
 
 
=== Arguments ===
 
{| class="wikitable"
 
! width=150px | Name
 
! width=120px | Type
 
! Description
 
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>interval</tt>
| string
+
| number (optional)
| Unique ID of MailStore instance in which this command is invoked.
+
| Interval for running job.
 
|-
 
|-
| <tt>userName</tt>
+
| <tt>time</tt>
| string  
+
| string (optional)
| User name of MailStore user.
+
| Time for running job. Without additional parameter, this means daily execution.
|}
 
 
 
== CreateProfile ==
 
Create a new archiving or exporting profile.
 
 
 
=== Arguments ===
 
{| class="wikitable"
 
! width=150px | Name
 
! width=120px | Type
 
! Description
 
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>dayOfWeek</tt>
| string  
+
| string (optional)
| Unique ID of MailStore instance in which this command is invoked.
+
| Day of week to run job. Parameter "time" also required.
 
|-
 
|-
| <tt>properties</tt>
+
| <tt>dayOfMonth</tt>
| json
+
| string (optional)
| Profile properties.
+
| Day of month to run job. Parameter "time" also required. dayOfWeek can optionally be used to define further.
|-
 
| <tt>raw</tt>
 
| bool
 
| Currently only 'true' is supported.
 
 
|}
 
|}
  
 +
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 ===
  
==== properties ====
+
==== dayOfWeek ====
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.
 
 
 
== CreateUser ==
 
Create new MailStore user.
 
 
 
=== Arguments ===
 
 
{| 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>userName</tt>
+
| <tt>Monday</tt>
| string
+
| Monday
| User name of new MailStore user.
 
 
|-
 
|-
| <tt>privileges</tt>
+
| <tt>Tuesday</tt>
| string
+
| Tuesday
| Comma separated list of privileges.
 
 
|-
 
|-
| <tt>fullName</tt>
+
| <tt>Wednesday</tt>
| string (optional)
+
| Wednesday
| Full name of user.
 
 
|-
 
|-
| <tt>distinguishedName</tt>
+
| <tt>Thursday</tt>
| string (optional)
+
| Thursday
| LDAP DN string.
 
 
|-
 
|-
| <tt>authentication</tt>
+
| <tt>Friday</tt>
| string (optional)
+
| Friday
| Authentication setting for user: 'integrated' or 'directoryServices'.
 
 
|-
 
|-
| <tt>password</tt>
+
| <tt>Saturday</tt>
| string (optional)
+
| Saturday
| Password of new user.
 
 
|}
 
|}
  
== DeleteEmptyFolders ==
+
==== dayOfMonth ====
Remove folders from folder tree that do not contain emails.
 
 
 
=== 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>folder</tt>
+
| <tt>Last</tt>
| string (optional)
+
| Last day of month.
| Entry point in folder tree.
 
 
|}
 
|}
  
== DeleteMessage ==
+
==== interval ====
Delete a single message
 
 
 
=== Arguments ===
 
 
{| 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>id</tt>
+
| <tt>10</tt>
| string (optional)
+
| Every 10 minutes.
| Unique ID of message. Format: <store_id>:<message_num>
 
|}
 
 
 
== DeleteProfile ==
 
Delete an archiving or exporting profile.
 
 
 
=== Arguments ===
 
{| class="wikitable"
 
! width=150px | Name
 
! width=120px | Type
 
! Description
 
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>15</tt>
| string
+
| Every 15 minutes.
| Unique ID of MailStore instance in which this command is invoked.
 
 
|-
 
|-
| <tt>id</tt>
+
| <tt>20</tt>
| number
+
| Every 20 minutes.
| Unique ID of profile.
 
|}
 
 
 
== DeleteUser ==
 
Delete a MailStore user.
 
 
 
=== Arguments ===
 
{| class="wikitable"
 
! width=150px | Name
 
! width=120px | Type
 
! Description
 
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>30</tt>
| string
+
| Every 30 minutes.
| Unique ID of MailStore instance in which this command is invoked.
 
 
|-
 
|-
| <tt>userName</tt>
+
| <tt>60</tt>
| string
+
| Every hour.
| User name of MailStore user.
 
|}
 
 
 
== GetChildFolders ==
 
Get child folders.
 
 
 
=== Arguments ===
 
{| class="wikitable"
 
! width=150px | Name
 
! width=120px | Type
 
! Description
 
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>120</tt>
| string
+
| Every 2 hours.
| Unique ID of MailStore instance in which this command is invoked.
 
 
|-
 
|-
| <tt>folder</tt>
+
| <tt>180</tt>
| string (optional)
+
| Every 3 hours.
| Parent folder.
 
 
|-
 
|-
| <tt>maxLevels</tt>
+
| <tt>260</tt>
| number (optional)
+
| Every 4 hours.
| Depth of child folders.
 
|}
 
 
 
== GetComplianceConfiguration ==
 
Get current compliance configuration settings.
 
 
 
=== Arguments ===
 
{| class="wikitable"
 
! width=150px | Name
 
! width=120px | Type
 
! Description
 
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>360</tt>
| string
+
| Every 6 hours.
| Unique ID of MailStore instance in which this command is invoked.
 
|}
 
 
 
== GetDirectoryServicesConfiguration ==
 
Get current Directory Services configuration settings.
 
 
 
=== Arguments ===
 
{| class="wikitable"
 
! width=150px | Name
 
! width=120px | Type
 
! Description
 
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>720</tt>
| string
+
| Every 12 hours.
| Unique ID of MailStore instance in which this command is invoked.
 
 
|}
 
|}
  
== GetFolderStatistics ==
+
== SetRetentionPolicies ==
Get folder statistics.
+
Set retention policies.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,437: Line 1,225:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>config</tt>
| string
+
| json
| Unique ID of MailStore instance in which this command is invoked.
+
| Retention policy configuration.
 
|}
 
|}
  
== GetMessages ==
+
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.
Get list of messages from a folder.
 
 
 
=== 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>folder</tt>
 
| string (optional)
 
| Folder whose content to list.
 
|}
 
  
== GetProfiles ==
+
== SetSmtpSettings ==
Get list of archiving and exporting profiles.
+
Set SMTP configuration.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,469: Line 1,241:
 
! Description
 
! Description
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>settings</tt>
| string
+
| json
| Unique ID of MailStore instance in which this command is invoked.
+
| SMTP configuration.
|-
 
| <tt>raw</tt>
 
| bool
 
| Currently only 'true' is supported.
 
 
|}
 
|}
  
== GetTimeZones ==
+
=== Argument Values ===
Get list of available time zones.
 
  
=== Arguments ===
+
==== settings====
{| class="wikitable"
+
Example settings object:
! width=150px | Name
+
<source lang="js" smart-tabs="true" toolbar="false" gutter="false">
! width=120px | Type
+
{
! Description
+
  "hostname": "mail.example.com",
|-
+
  "port": 587,
| <tt>instanceID</tt>
+
  "protocol": "SMTP-TLS",
| string
+
  "ignoreSslPolicyErrors": false,
| Unique ID of MailStore instance in which this command is invoked.
+
  "authenticationRequired": true,
|}
+
  "username": "[email protected]",
 +
  "password": "userpassword",
 +
  "fromDisplayName": "Sending User",
 +
  "fromEmailAddress": "[email protected]",
 +
  "recipientEmailAddress": "administrator@example.com"
 +
}
 +
</source>
  
== GetUserInfo ==
+
== SetStoreProperties ==
Get detailed information about user.
+
Set properties of archive store.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,501: Line 1,274:
 
! 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>userName</tt>
+
| <tt>type</tt>
| string  
+
| string (optional)
| User name of MailStore user
+
|  
|}
 
 
 
== GetUsers ==
 
Get list of users.
 
 
 
=== Arguments ===
 
{| class="wikitable"
 
! width=150px | Name
 
! width=120px | Type
 
! Description
 
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>databaseName</tt>
| string  
+
| string (optional)
| Unique ID of MailStore instance in which this command is invoked.
+
| Name of database on Microsoft SQL Server or PostgreSQL server.
|}
 
 
 
== GetWorkerResults ==
 
Get results of profile executions.
 
 
 
=== Arguments ===
 
{| class="wikitable"
 
! width=150px | Name
 
! width=120px | Type
 
! Description
 
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>databasePath</tt>
| string  
+
| string (optional)
| Unique ID of MailStore instance in which this command is invoked.
+
| Path to directory in which database folder information and email meta data are stored.
 
|-
 
|-
| <tt>fromIncluding</tt>
+
| <tt>contentPath</tt>
| string  
+
| string (optional)
| Beginning of time range to fetch.
+
| Path to directory in which email headers and contents are stored.
 
|-
 
|-
| <tt>toExcluding</tt>
+
| <tt>indexPath</tt>
| string  
+
| string (optional)
| End of time range to fetch.
+
| Path to directory in which full text search indexes are stored.
 
|-
 
|-
| <tt>timeZoneID</tt>
+
| <tt>serverName</tt>
| string  
+
| string (optional)
| Time zone in which timestamp should be returned.
+
| Name of Microsoft SQL Server or PostgreSQL server.
|-
 
| <tt>profileID</tt>
 
| number (optional)
 
| Filter results by given profile ID.
 
 
|-
 
|-
 
| <tt>userName</tt>
 
| <tt>userName</tt>
 
| string (optional)
 
| string (optional)
| Filter results by given user name.
+
| User name for accessing Microsoft SQL Server or PostgreSQL server.
|}
 
 
 
== MoveFolder ==
 
Move folder.
 
 
 
=== Arguments ===
 
{| class="wikitable"
 
! width=150px | Name
 
! width=120px | Type
 
! Description
 
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>password</tt>
| string  
+
| string (optional)
| Unique ID of MailStore instance in which this command is invoked.
+
| Password for accessing Microsoft SQL Server or PostgreSQL server.
|-
 
| <tt>fromFolder</tt>
 
| string
 
| Old folder name.
 
|-
 
| <tt>toFolder</tt>
 
| string
 
| New folder name.
 
 
|}
 
|}
  
== RenameUser ==
+
=== Argument Values ===
Rename a MailStore user.
 
  
=== 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>oldUserName</tt>
+
| <tt>SQLServer</tt>
| string
+
| Microsoft SQL Server-based archive store.
| Old user name.
 
 
|-
 
|-
| <tt>newUserName</tt>
+
| <tt>PostgreSQL</tt>
| string
+
| PostgreSQL server-based archive store.
| New user name.
 
 
|}
 
|}
  
== RunProfile ==
+
== SetStoreRequestedState ==
Run an existing archiving or exporting profile.
+
Set state of archive store.
  
 
=== Arguments ===
 
=== Arguments ===
Line 1,610: Line 1,336:
 
! 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 profile ID.
+
| Unique ID of archive store.
|}
 
 
 
== RunTemporaryProfile ==
 
Run a temporary/non-existent profile.
 
 
 
=== Arguments ===
 
{| class="wikitable"
 
! width=150px | Name
 
! width=120px | Type
 
! Description
 
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>requestedState</tt>
| string  
+
| string (optional)
| Unique ID of MailStore instance in which this command is invoked.
+
| State of archive store after attaching.
|-
 
| <tt>properties</tt>
 
| json
 
| Profile properties.
 
|-
 
| <tt>raw</tt>
 
| bool
 
| Currently only 'true' is supported.
 
 
|}
 
|}
  
 
=== Argument Values ===
 
=== Argument Values ===
  
==== properties ====
+
==== requestedState ====
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.
 
 
 
== SetComplianceConfiguration ==
 
Set compliance configuration settings.
 
 
 
=== Arguments ===
 
 
{| 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>config</tt>
+
| <tt>normal</tt>
| json
+
| The content of archives store is available to users and can be modified if the user has the appropriate permission.
| Compliance configuration.
 
|}
 
 
 
=== Argument Values ===
 
 
 
==== config ====
 
Use GetComplianceConfiguration to receive supported value.
 
 
 
== SetDirectoryServicesConfiguration ==
 
Set directory services configuration settings.
 
 
 
=== Arguments ===
 
{| class="wikitable"
 
! width=150px | Name
 
! width=120px | Type
 
! Description
 
 
|-
 
|-
| <tt>instanceID</tt>
+
| <tt>writeProtected</tt>
| string
+
| 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)
| Unique ID of MailStore instance in which this command is invoked.
 
 
|-
 
|-
| <tt>config</tt>
+
| <tt>disabled</tt>
| json
+
| Disabled archive stores are not in use but the instance still knows about their existence. Therefore the content is not available to users.
| Directory services configuration.
 
 
|}
 
|}
 
=== Argument Values ===
 
 
==== config ====
 
Use GetDirectoryServicesConfiguration to receive supported value.
 
  
 
== SetUserAuthentication ==
 
== SetUserAuthentication ==
Line 1,701: Line 1,374:
 
! width=120px | Type
 
! width=120px | Type
 
! Description
 
! Description
|-
 
| <tt>instanceID</tt>
 
| string
 
| Unique ID of MailStore instance in which this command is invoked.
 
 
|-
 
|-
 
| <tt>userName</tt>
 
| <tt>userName</tt>
Line 1,723: Line 1,392:
 
! width=120px | Type
 
! width=120px | Type
 
! Description
 
! Description
|-
 
| <tt>instanceID</tt>
 
| string
 
| Unique ID of MailStore instance in which this command is invoked.
 
 
|-
 
|-
 
| <tt>userName</tt>
 
| <tt>userName</tt>
Line 1,745: Line 1,410:
 
! width=120px | Type
 
! width=120px | Type
 
! Description
 
! Description
|-
 
| <tt>instanceID</tt>
 
| string
 
| Unique ID of MailStore instance in which this command is invoked.
 
 
|-
 
|-
 
| <tt>userName</tt>
 
| <tt>userName</tt>
Line 1,767: Line 1,428:
 
! width=120px | Type
 
! width=120px | Type
 
! Description
 
! Description
|-
 
| <tt>instanceID</tt>
 
| string
 
| Unique ID of MailStore instance in which this command is invoked.
 
 
|-
 
|-
 
| <tt>userName</tt>
 
| <tt>userName</tt>
Line 1,789: Line 1,446:
 
! width=120px | Type
 
! width=120px | Type
 
! Description
 
! Description
|-
 
| <tt>instanceID</tt>
 
| string
 
| Unique ID of MailStore instance in which this command is invoked.
 
 
|-
 
|-
 
| <tt>userName</tt>
 
| <tt>userName</tt>
Line 1,811: Line 1,464:
 
! width=120px | Type
 
! width=120px | Type
 
! Description
 
! Description
|-
 
| <tt>instanceID</tt>
 
| string
 
| Unique ID of MailStore instance in which this command is invoked.
 
 
|-
 
|-
 
| <tt>userName</tt>
 
| <tt>userName</tt>
Line 1,822: Line 1,471:
 
| <tt>pop3UserNames</tt>
 
| <tt>pop3UserNames</tt>
 
| string (optional)
 
| string (optional)
| Comma seperated list of POP3 user names.
+
| Comma separated list of POP3 user names.
 
|}
 
|}
  
Line 1,833: Line 1,482:
 
! width=120px | Type
 
! width=120px | Type
 
! Description
 
! Description
|-
 
| <tt>instanceID</tt>
 
| string
 
| Unique ID of MailStore instance in which this command is invoked.
 
 
|-
 
|-
 
| <tt>userName</tt>
 
| <tt>userName</tt>
Line 1,846: Line 1,491:
 
| Comma separated list of privileges.
 
| Comma separated list of privileges.
 
|}
 
|}
 +
 +
=== Argument Values ===
 +
 +
==== privileges ====
 +
{{Administration_API_User_Privileges}}
  
 
== SetUserPrivilegesOnFolder ==
 
== SetUserPrivilegesOnFolder ==
Line 1,855: Line 1,505:
 
! width=120px | Type
 
! width=120px | Type
 
! Description
 
! Description
|-
 
| <tt>instanceID</tt>
 
| string
 
| Unique ID of MailStore instance in which this command is invoked.
 
 
|-
 
|-
 
| <tt>userName</tt>
 
| <tt>userName</tt>
Line 1,871: Line 1,517:
 
| string  
 
| string  
 
| Comma separated list of folder privileges.
 
| Comma separated list of folder privileges.
 +
|}
 +
 +
=== Argument Values ===
 +
 +
==== privileges ====
 +
{| class="wikitable"
 +
! width=270px | Name
 +
! Description
 +
|-
 +
| <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.
 
|}
 
|}
  
Line 1,881: Line 1,547:
 
! width=120px | Type
 
! width=120px | Type
 
! Description
 
! Description
|-
 
| <tt>instanceID</tt>
 
| string
 
| Unique ID of MailStore instance in which this command is invoked.
 
 
|-
 
|-
 
| <tt>dryRun</tt>
 
| <tt>dryRun</tt>
Line 1,890: Line 1,552:
 
| Simulate sync only.
 
| Simulate sync only.
 
|}
 
|}
 +
 +
== TestSmtpSettings ==
 +
Test current SMTP configuration.
 +
 +
== 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 ===
 +
{| class="wikitable"
 +
! width=150px | Name
 +
! width=120px | Type
 +
! Description
 +
|-
 +
| <tt>id</tt>
 +
| number
 +
| Unique ID of archive store to unlock.
 +
|-
 +
| <tt>passphrase</tt>
 +
| string
 +
| Product key or recovery key of the foreign MailStore installation.
 +
|}
 +
 +
== UpgradeStore ==
 +
Upgrade archive store from MailStore Server 5 or older to current format.
 +
 +
=== Arguments ===
 +
{| class="wikitable"
 +
! width=150px | Name
 +
! width=120px | Type
 +
! Description
 +
|-
 +
| <tt>id</tt>
 +
| number
 +
| Unique ID of archive store.
 +
|}
 +
 +
== VerifyStore ==
 +
Verify archive stores consistency.
 +
 +
=== Arguments ===
 +
{| class="wikitable"
 +
! width=150px | Name
 +
! width=120px | Type
 +
! Description
 +
|-
 +
| <tt>id</tt>
 +
| number
 +
| The unique identifier of the archive store to be verified.
 +
|-
 +
| <tt>includeIndexes</tt>
 +
| bool
 +
| Defines whether to verify the search indexes as well.
 +
|}
 +
 +
== VerifyStores ==
 +
Verify consistency of all archive stores.
 +
 +
=== Arguments ===
 +
{| class="wikitable"
 +
! width=150px | Name
 +
! width=120px | Type
 +
! Description
 +
|-
 +
| <tt>includeIndexes</tt>
 +
| bool
 +
| Defines whether to verify the search indexes as well.
 +
|}
 +
 +
[[de:Administration API - Function Reference]]
 +
[[en:Administration API - Function Reference]]

Latest revision as of 09:37, 8 February 2021


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.

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.

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.

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.

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="2016-12-01T00:00:00" --toExcluding="2016-12-31T23:59:59" --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": null,
    "period": 10,
    "periodInterval": "year",
    "delete": false
  }
]

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.

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 a list of available time zones.

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) Filter results by given user name.

Interactive Management Shell Example: GetWorkerResults --fromIncluding="2016-01-01T00:00:00" --toExcluding="2016-12-31T23:59:59" --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.

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.
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 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.

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.

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]",
  "recipientEmailAddress": "[email protected]"
}

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.

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.

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.

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 archive store from MailStore Server 5 or older to current format.

Arguments

Name Type Description
id number Unique ID of archive store.

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.

VerifyStores

Verify consistency of all archive stores.

Arguments

Name Type Description
includeIndexes bool Defines whether to verify the search indexes as well.