# IRPCServerAdmin.BeginPerformanceMeasurementsAsJSON

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Administration API](https://developer.m-files.com/APIs/gRPC-API/admin/index.md) > [Server administration](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/index.md)

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

Badges: `Administration API / specialized` `admin` `session` `idempotent`

Starts a database performance measurement in the session's vault and returns its ID.

- **Service:** [Server administration](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/index.md) `MFiles.IRPCServerAdmin`
- **gRPC method:** `/MFiles.IRPCServerAdmin/BeginPerformanceMeasurementsAsJSON`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/begin-performance-measurements-as-json`
- **Request:** [`BeginPerformanceMeasurementsAsJSONRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/BeginPerformanceMeasurementsAsJSON/index.md#request)
- **Response:** [`BeginPerformanceMeasurementsAsJSONResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/BeginPerformanceMeasurementsAsJSON/index.md#response)
- **Book and level:** Administration API, specialized
- **Kind:** admin
- **Session:** Required: the session ID from LogIn in the mfiles-session-id-bin metadata.
- **Idempotent:** yes
- **Returns metadata structure version:** no
- **Streaming:** none (unary)

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

## Remarks

- Starts a background operation and returns when it has started; poll the results with
  [GetPerformanceMeasurementsAsJSON](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/GetPerformanceMeasurementsAsJSON/index.md)
  and stop it with
  [EndPerformanceMeasurementsAsJSON](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/EndPerformanceMeasurementsAsJSON/index.md).
- Requires a vault session with the vault right `change_full_control_role` (vault administrators
  have it). A server-level session fails with "Login required.".
- The measurement belongs to the session: starting a new one removes any earlier measurement of
  the same session.

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

## Request: BeginPerformanceMeasurementsAsJSONRequest

No fields.

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

## Response: BeginPerformanceMeasurementsAsJSONResponse

> 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 |
|---|---|---|
| `background_op_id` | `int32` | The ID of the measurement, for the Get and End calls. |

<a id="related"></a>

## Related methods

- [GetPerformanceMeasurementsAsJSON](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/GetPerformanceMeasurementsAsJSON/index.md): Gets the current results of a vault database performance measurement as JSON.
- [EndPerformanceMeasurementsAsJSON](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/EndPerformanceMeasurementsAsJSON/index.md): Stops and removes a performance measurement started with [BeginPerformanceMeasurementsAsJSON](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/BeginPerformanceMeasurementsAsJSON/index.md).
