# IRPCQueryVersion.QueryVersion

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Vault API](https://developer.m-files.com/APIs/gRPC-API/vault/index.md) > [Server version](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCQueryVersion/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCQueryVersion/QueryVersion/

Badges: `Vault API / core` `read` `no session` `idempotent`

Gets the server version and the oldest client version the server accepts.

- **Service:** [Server version](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCQueryVersion/index.md) `MFiles.IRPCQueryVersion`
- **gRPC method:** `/MFiles.IRPCQueryVersion/QueryVersion`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/query-version`
- **Request:** [`QueryVersionRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCQueryVersion/QueryVersion/index.md#request)
- **Response:** [`QueryVersionResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCQueryVersion/QueryVersion/index.md#response)
- **Book and level:** Vault API, core
- **Kind:** read
- **Session:** Not needed: the call can be made before logging in.
- **Idempotent:** yes
- **Returns metadata structure version:** no
- **Streaming:** none (unary)

<a id="remarks"></a>

## Remarks

Needs no session and no `mfiles-session-id-bin` header. The response is the same for every caller,
so the result can be cached for the lifetime of the connection.

All four fields are 64-bit packed versions: `major << 48 | minor << 32 | build << 16 | patch`.
For example `7318397729964032` is 26.11.16645.0. Unpack them with shifts, not by formatting the
decimal number.

Over gRPC all three "oldest compatible" fields carry the same value: the oldest client version the
gRPC interface supports.

<a id="request"></a>

## Request: QueryVersionRequest

No fields.

<a id="response"></a>

## Response: QueryVersionResponse

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `server_version` | `uint64` | The server version, packed as `major << 48 \| minor << 32 \| build << 16 \| patch`. |
| `oldest_compatible_client_version` | `uint64` | The oldest client version that the server accepts over gRPC, packed like `server_version`. |
| `oldest_compatible_admin_client_version` | `uint64` | The oldest admin client version that the server accepts, packed like `server_version`. Over gRPC this equals `oldest_compatible_client_version`. |
| `oldest_compatible_replica_server_version` | `uint64` | The oldest replica server version that the server accepts, packed like `server_version`. Over gRPC this equals `oldest_compatible_client_version`. |
