# IRPCServerAdmin.SetServerEndpointSettings

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

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

Changes the TLS setting and the certificate of the server's gRPC endpoint and restarts the
endpoint.

- **Service:** [Server administration](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/index.md) `MFiles.IRPCServerAdmin`
- **gRPC method:** `/MFiles.IRPCServerAdmin/SetServerEndpointSettings`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/set-server-endpoint-settings`
- **Request:** [`SetServerEndpointSettingsRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/SetServerEndpointSettings/index.md#request)
- **Response:** [`SetServerEndpointSettingsResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/SetServerEndpointSettings/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:** no
- **Returns metadata structure version:** no
- **Streaming:** none (unary)

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

## Remarks

- Requires the system administrator server role (server right `shutdown`), and certificate
  management must not be disabled on the server (see
  [GetServerEndpointSettings](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/GetServerEndpointSettings/index.md)).
- Returns before the change is applied: the server applies it in the background right after the
  call and restarts the gRPC endpoint, which drops open connections. Errors in that step do not
  reach the caller; they are written to the server's event log. Read the result back with
  [GetServerEndpointSettings](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/GetServerEndpointSettings/index.md).
- A new certificate must come with its private key.

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

## Request: SetServerEndpointSettingsRequest

> 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 |
|---|---|---|
| `value` | [`SetServerEndpointSettingsParams`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SetServerEndpointSettingsParams/index.md) | The new settings: `use_tls`, certificates to add or change, and IDs of certificates to remove. See [SetServerEndpointSettingsParams](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SetServerEndpointSettingsParams/index.md). |
| `value.use_tls` | `bool` | True to enable TLS. |
| `value.modify_or_add_certificates[]` | repeated [`ServerCertificateChangeRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ServerCertificateChangeRequest/index.md) | Server certificates to modify or add. |
| `value.modify_or_add_certificates[].id` | `int32` | Endpoint ID to modify. -1 to create new endpoint. |
| `value.modify_or_add_certificates[].certificate_action` | [`ChangeAction`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.ChangeAction/index.md) | Action to perform for the certificate. Values: `CHANGE_ACTION_UNINITIALIZED` (0), `CHANGE_ACTION_KEEP` (1), `CHANGE_ACTION_CHANGE` (2), `CHANGE_ACTION_REMOVE` (3). |
| `value.modify_or_add_certificates[].certificate` | `string` | Certificate to set, if the action is replace. |
| `value.modify_or_add_certificates[].private_key_action` | [`ChangeAction`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.ChangeAction/index.md) | Action to perform for the private key. Values: `CHANGE_ACTION_UNINITIALIZED` (0), `CHANGE_ACTION_KEEP` (1), `CHANGE_ACTION_CHANGE` (2), `CHANGE_ACTION_REMOVE` (3). |
| `value.modify_or_add_certificates[].private_key` | `string` | Private key to set, if the action is replace. |
| `value.remove_certificates[]` | repeated `uint32` | Certificates to remove. |

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

## Response: SetServerEndpointSettingsResponse

No fields.

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

## Related methods

- [GetServerEndpointSettings](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/GetServerEndpointSettings/index.md): Gets the TLS setting and the certificate of the server's gRPC endpoint.
