Cloud: install Web API¶
The MFSQL Connector Web API lets a vault that cannot reach SQL Server directly, such as an M-Files Cloud vault, still run the Connector’s context menu actions. The vault sends each call over HTTPS to the Web API on an IIS server on your network, and the Web API passes it to the vault’s Connector database.
Web API versions¶
Web API 1.0 is retired. A new implementation uses Web API 5.13.24.1 or later, installed with the Web API install scripts and their runbook from Laminin Solutions. The manual installation steps written for Web API 1.0 do not apply to it.
If you run an existing Web API installation, contact Laminin Solutions to upgrade it.
What the Web API does¶
The calls from the vault carry no metadata. Each one tells SQL Server to run a stored procedure, which then exchanges metadata with M-Files through the Connector’s standard M-Files connection. Only the pre-designed context menu actions travel this way:
a menu action that calls a stored procedure or a web link
an action on a selected object, which passes the object’s context to a stored procedure
a workflow action or an event handler action, which passes the object’s context to a stored procedure
How a call travels from the vault to its Connector database. Each vault has its own Web API instance.¶
When to use it¶
The vault and SQL Server are in different domains or networks, as with M-Files Cloud, so the vault application cannot connect to SQL Server directly.
Optional where the vault and SQL Server share a domain: the vault application can then call SQL Server directly, without the Web API.
Not needed when the vault runs no context menu actions. A connector that only pulls data from M-Files into SQL Server uses the Connector’s standard M-Files connection and needs no Web API.
The Web API is a separate installation from the MFSQL Connector installer. The Web API package must match the version of the MFSQL Connector VaultApp in the vault.
One instance per vault¶
Each vault has its own Connector database, so each vault gets its own instance of the Web API: its own IIS application, folder, application pool and SQL login. The instances sit under one dedicated HTTPS site on the web server, with one DNS name and one certificate, so several vaults can share a web server without sharing credentials.
Installation path¶
Prepare. Agree the DNS name, certificate, firewall, SQL Server access, instance keys and the M-Files Cloud Support ticket before the install date, and fill in the values workbook, which your engineer uses on the web server to generate the install settings: Preparing for a Web API installation. For production and test vaults on one web server, or SQL Server on a different host, see Web API deployment topologies.
Install. Your engineer follows the install runbook at the web server: generate the settings from the workbook, set up the web server once with
.\Install.ps1 -Server, then add one instance per vault with.\Install.ps1 -Instance <Key>: Runbook: install the MFSQL Connector Web API. The reference guide lists every value, command and check.Test. Test each instance’s endpoint before anything changes in M-Files, then run a context menu action from the vault after the M-Files configuration.
Configure M-Files. In the vault’s MFSQL Connector VaultApp configuration, the M-Files System Administrator sets the Api UserName and Api Password. On an M-Files Cloud vault, only M-Files Cloud Support sets the Api URL, through a support ticket. Refresh Configurations and check the Dashboard.
Roll back when needed. One instance is rolled back on its own, starting with the vault’s configuration in M-Files, and leaves the other instances running. The whole web server goes back to the restore point taken before the install.
Next¶
Cloud VAF configuration: Cloud: VAF configuration
Configure context menu and connection string: Post-install