API Reference

The API is accessible via the ECM() factory and is split into the following namespaces:

Namespace Description Reference

ecm.dms

Folder, register, and document operations

→ ecm.dms

ecm.security

User and group management

→ ecm.security

ecm.system

Server metadata and object definitions

→ ecm.system

ecm.db

Direct SQL access via ADO

→ ecm.db

1. ECM factory

from ecmind_blue_client.ecm import ECM
from ecmind_blue_client.pool import SyncPoolClient

client = SyncPoolClient(servers="<host>:4000:1", username="<username>", password="<password>")
ecm = ECM(client)

The ECM() function is overloaded: passing a SyncPoolClient returns ECMSync; passing an AsyncPoolClient returns ECMAsync.

2. impersonate()

ecm.impersonate(username: str) -> ECMSync | ECMAsync

Returns a new ECM instance that injects the given user context into every request ($SwitchContextUserName$). The executing user requires the Context Switch system role.

Supports both direct usage and use as a context manager (with / async with).

  • Sync

  • Async

with ecm.impersonate("john") as ecm_john:
    ecm_john.dms.insert(MyFolder(Title="Test"))
async with ecm.impersonate("john") as ecm_john:
    await ecm_john.dms.insert(MyFolder(Title="Test"))