# Runtime conventions

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/runtime/

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](https://developer.m-files.com/APIs/gRPC-API/runtime/connecting/index.md): 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](https://developer.m-files.com/APIs/gRPC-API/runtime/deployments/index.md): 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](https://developer.m-files.com/APIs/gRPC-API/runtime/authentication/index.md): 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](https://developer.m-files.com/APIs/gRPC-API/runtime/call-metadata/index.md): 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](https://developer.m-files.com/APIs/gRPC-API/runtime/errors/index.md): 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](https://developer.m-files.com/APIs/gRPC-API/runtime/files/index.md): 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](https://developer.m-files.com/APIs/gRPC-API/runtime/versioning/index.md): 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)](https://developer.m-files.com/APIs/gRPC-API/runtime/http-access/index.md): 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.
