The M-Files COM/.NET API

The M-Files COM/.NET API can be used from any software that can interact with COM. This is our most comprehensive API and provides interfaces for most “user” and “administrative” functions. The API is available on both 32-bit and 64-bit versions and is typically referenced from your code by adding a reference to the nuget package within your project:

Adding a reference to the COM API

Note that the COM API nuget package is the recommended mechanism to add a reference a project, but deploying the nuget package itself is not sufficient to run applications that use it. You must still ensure that the machine running the application has an element of M-Files(M-Files Desktop, M-Files Server, or M-Files Server Tools) installed for the application to work.

The API can be used to create almost any solution that retrieve or process information within an M-Files vault, such as:

The COM API requires the same version of the API on the client machine as the server (e.g. if communicating with an M-Files 2015.3 server, the API must also be of the same version).

API modes (client vs. server)

The primary focus of creating a connection to the server is to retrieve a Vault object. The Vault object can then be used to query content from the vault, or to process it in some manner.

The API can be used in either “server” or “client” mode. Some API methods are only available in one of the modes.

Common API objects

User operations

For finding the vault structure:

For finding objects:

More information on searching for objects can be found in the dedicated pages.

For working with objects (finding properties, checking in and out, manipulating files, etc.)

Administrative operations

For working with the vault structure: