Runtime conventions
What every call needs: endpoints and TLS, call metadata, authentication and sessions, errors, files, and how the API changes between versions.
- Connecting to the server -- Endpoints, TLS, HTTP/2, message size and keepalive limits, method paths, and a first anonymous call to check that the server answers.
- Cloud and on-premises -- What differs between M-Files Cloud and an on-premises M-Files Server for a gRPC caller - address, TLS, authentication and the front end.
- Authentication and sessions -- How to log in with each AuthDataType, bind the session to a vault, send the 48-byte session ID, keep the session alive with KeepAlive and close it with LogOut.
- Call metadata -- Every metadata key the server reads or writes - session ID, activity ID, remote-call marker, metadata structure version trailer, cookies - plus deadlines and call importance.
- Errors -- How MFServer reports errors over gRPC - status codes, the error trailers, decoding the M-Files error stack, the common error codes with what to do about each, and when to retry.
- Files -- How to download and upload file content - download sessions, block sizes, upload sessions and inline content, which method to choose, and the limits that apply.
- Versions and compatibility -- How the API changes between versions, how to find out what a server supports (QueryVersion, GetServerCapabilities), what to send in ClientData, and the compatibility rules that let one client work with older and newer servers.
- HTTP access (mf-http-grpc) -- The JSON-over-HTTP gateway that M-Files Server runs next to its gRPC endpoint for browsers - what it is, how its routes and JSON map to the gRPC API, and why native gRPC is the better choice elsewhere.