# PatchEndpoint

Updates an existing endpoint's settings.

Required User Role: See [Required Enterprise Manager permissions](https://help.qlik.com/en-US/enterprise-manager/November2024/Content/EnterpriseManager/EnterpriseManager_APIGuide/Introduction/AEMPermissions.htm).

## Limitations

* The /db\_settings/$type setting (or /db\_settings/connectioninfo/$type setting for Java-based endpoints) cannot be updated. Java-based endpoints are as follows: Salesforce (Incremental Load), Salesforce (Streaming CDC), MongoDB, and SAP Extractor.
* If a task which uses the endpoint is currently running, changing the endpoint setting will only take effect after the task is restarted

## Syntax

`public void PatchEndpoint(string payload, string server, string endpoint);`

## Parameters

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| payload | string | The operation to execute and the field on which to execute the operation (sent as a JSON file). Supported operations are ‘add’,’replace’,’remove’, or ’test’.<br><br>For an explanation of how to find the relevant endpoint setting, see [PatchEndpoint](https://help.qlik.com/en-US/enterprise-manager/November2024/Content/EnterpriseManager/EnterpriseManager_APIGuide/CurlAPI/api_patchEndpointSettings.htm#path-request).<br><br>Information note<br><br><ul> <li>'move’ and ‘copy’ operations are not supported.</li> <li>The ‘add’ operation replaces an existing field or adds a new one, if it does not exist.</li> </ul> |
| server | string | The Replicate server name as defined in Enterprise Manager.<br><br>Example:<br><br>myrepsrv1 |
| endpoint | string | The endpoint display (logical) name.<br><br>Example: my\_s3\_endpoint |

## Patch Payload Example

`[`

`  { "op":"replace", "path":"/db_settings/bucketName", `

`"value":"my_new_bucket" }`

`]`

## Errors

All of the [general errors](https://help.qlik.com/en-US/enterprise-manager/November2024/Content/EnterpriseManager/EnterpriseManager_APIGuide/NetAPI/error_handling.htm) as well as the errors listed in the table below.

Error responses

| HTTP Code | Enterprise Manager Code | Text | Description |
| --- | --- | --- | --- |
| 500 | AEM\_PATCH\_ENDPOINT\_INNER\_ERR | Failed to patch replication endpoint {endpoint} from server {server}. | Replicate experienced an error/exception when trying to patch the specified endpoint. |
| 500 | AEM\_ENDPOINT\_NOT\_FOUND | Replication endpoint {endpoint} on server {server} could not be found. | Returned if Qlik Enterprise Manager cannot find the endpoint to patch. |