# IRPCServerAdmin.GetServerActivityAsJSON

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/GetServerActivityAsJSON/

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

Gets recent server activity (connections, slowest calls, object changes, views, background
processes) as a JSON document, for the M-Files Admin server activity dashboard.

- **Service:** [Server administration](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/index.md) `MFiles.IRPCServerAdmin`
- **gRPC method:** `/MFiles.IRPCServerAdmin/GetServerActivityAsJSON`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/get-server-activity-as-json`
- **Request:** [`GetServerActivityAsJSONRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/GetServerActivityAsJSON/index.md#request)
- **Response:** [`GetServerActivityAsJSONResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/GetServerActivityAsJSON/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

- Any session can call it, but the result is limited to what the caller administers:
  - a login without server rights sees only the vaults in which it has full control of the
    vault; a caller who administers no vault gets empty lists;
  - a system administrator sees all vaults and the server-level activity.
- The input and output JSON formats are those of M-Files Admin and are not otherwise documented.
  The server reads `isShowingOnlyUserActivities` (default true) from the parameters; `{}` is a
  valid parameter document.
- Reads an in-memory buffer; clear it with
  [ResetServerActivityBuffer](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/ResetServerActivityBuffer/index.md).

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

## Request: GetServerActivityAsJSONRequest

> 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 |
|---|---|---|
| `parameters_as_json` | `string` | Query parameters as a JSON object, for example `{}`. |

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

## Response: GetServerActivityAsJSONResponse

> 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 |
|---|---|---|
| `output_as_json` | `string` | The activity as a JSON object (`connections`, `functionCalls`, `objectModifications`, `views`, `backgroundProcesses`, and totals). |

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

## Related methods

- [ResetServerActivityBuffer](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/ResetServerActivityBuffer/index.md): Clears the server's in-memory activity buffer that [GetServerActivityAsJSON](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/GetServerActivityAsJSON/index.md) reads.
