Server administration (IRPCServerAdmin)
Server-wide administration: master database backup and restore, vault backups, server activity, gRPC endpoint certificates, notification (e-mail) settings, server users and the M-Files Manage subscription.
Use this interface to perform administrative server-level operations such as backing up and restoring the master database.
| gRPC service | MFiles.IRPCServerAdmin |
|---|---|
| Book and level | Administration API, specialized |
| Methods | 21 |
| Proto file | mfiles/IRPCServerAdmin.proto |
Overview
This is the service behind the server-level nodes of M-Files Admin. Almost every method needs a login with the system administrator server role; only a few are open to other users. An application rarely needs it; automation scripts that back up vaults or read the server activity can use it.
Sessions and rights. A server-level session is enough (log in with login_data.vault_guid =
{00000000-0000-0000-0000-000000000000}); a vault session works as well, except where a method
says it needs one. Server rights (ServerAccess) are granted only to
logins with the system administrator server role; a vault administrator does not have them. A
missing server right fails with "Access denied. You do not have the server-level access
rights required by this operation." (error codes 0x800400A8 and 0x800407E4).
- Back up and restore: BackUp (vault or master database, runs as a job), BackUpMasterDB, RestoreMasterDB.
- Server activity (the M-Files Admin dashboard): GetServerActivityAsJSON, ResetServerActivityBuffer.
- Vault database performance test (vault session): BeginPerformanceMeasurementsAsJSON, then GetPerformanceMeasurementsAsJSON until done, then EndPerformanceMeasurementsAsJSON.
- gRPC endpoint TLS and certificate: GetServerEndpointSettings, SetServerEndpointSettings.
- Notification e-mail settings: GetNotificationSettings, SetNotificationSettings.
- Server users (server roles assigned to account names): GetServerUsers, UpsertServerUser, RemoveServerUser.
- M-Files Manage subscription: GetSubscriptionInfo, JoinSubscriptionTest, JoinSubscription, ConnectToCloud.
- Process control: Shutdown.
Login accounts are managed with IRPCLoginsAdmin, scheduled jobs with IRPCScheduledJobsAdmin.
Methods
| Method | Summary | Facts |
|---|---|---|
| BackUp | Starts a backup of a vault or of the master database as a server job and returns the job ID. | admin session |
| BackUpMasterDB | Backs up the server's master database to a file on the server, and returns when the backup is complete. | admin session |
| BeginPerformanceMeasurementsAsJSON | Starts a database performance measurement in the session's vault and returns its ID. | admin session idempotent |
| ConnectToCloud | Tells the server to fetch its licenses and login accounts from M-Files Manage so that it can start attaching its vaults. | internal: not for applications admin session |
| EndPerformanceMeasurementsAsJSON | Stops and removes a performance measurement started with BeginPerformanceMeasurementsAsJSON. | admin session idempotent |
| GetNotificationSettings | Gets the server's notification settings and mail-sending configuration (without the SMTP password). | admin session idempotent |
| GetPerformanceMeasurementsAsJSON | Gets the current results of a vault database performance measurement as JSON. | admin session idempotent |
| GetServerActivityAsJSON | Gets recent server activity (connections, slowest calls, object changes, views, background processes) as a JSON document, for the M-Files Admin server activity dashboard. | admin session idempotent |
| GetServerEndpointSettings | Gets the TLS setting and the certificate of the server's gRPC endpoint. | admin session |
| GetServerUsers | Gets the server users: account names with server roles that are stored separately from login accounts. | admin session idempotent |
| GetSubscriptionInfo | Gets whether and how the server is connected to an M-Files Manage subscription. | admin session idempotent |
| IsRunningOnNT4 | Obsolete. Always returns false. | admin session |
| JoinSubscription | Joins the server to an M-Files Manage subscription. | admin session |
| JoinSubscriptionTest | Checks whether the server could join an M-Files Manage subscription, and lists the vaults that would prevent it. | admin session idempotent |
| RemoveServerUser | Removes a server user, that is, the server roles stored for an account name. | admin session idempotent |
| ResetServerActivityBuffer | Clears the server's in-memory activity buffer that GetServerActivityAsJSON reads. | admin session idempotent |
| RestoreMasterDB | Replaces the server's master database with a master database backup file on the server. | admin session |
| SetNotificationSettings | Sets the server's notification settings: whether notifications are on, the daily digest time, and the SMTP or OAuth 2.0 mail settings used to send them. | admin session idempotent |
| SetServerEndpointSettings | Changes the TLS setting and the certificate of the server's gRPC endpoint and restarts the endpoint. | admin session |
| Shutdown | Stops the M-Files Server process. | admin session |
| UpsertServerUser | Adds a server user or changes the server roles of an existing one. | admin session idempotent |