# TestEndpoint

Connect to an endpoint to test connectivity and configuration (permissions, CDC configuration, and so on).

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

## Syntax

`public AemTestEndpointResp TestEndpoint(` ` string server,  ` `string endpoint,` `int timeout = 60` `);`

## Parameters

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| server | string | The name of the server on which the endpoint is defined. |
| endpoint | string | The name of the endpoint. |
| timeout | int | Time in seconds to wait until getting a response. |

## Return values

AemTestEndpointResp

Return values

| Parameter | Type | Description |
| --- | --- | --- |
| Status | AemEndpointState<br><br>{<br><br>UNKNOWN = 0,<br><br>CONNECTED = 1,<br><br>ERROR = 2<br><br>} | - |
| Message | string | Short description of the error. |
| DetailedMessage | string | Detailed description of the error. |

## Errors

Error responses

| Error | Message | Description |
| --- | --- | --- |
| AEM\_TEST\_ENDPOINT\_CONNECTION\_TIMEOUT | A timeout occurred while testing the connection for endpoint {endpoint} on Replicate server {server}. | Connection was not established within 60 seconds. |
| AEM\_ENDPOINT\_NOT\_FOUND | Replicate endpoint {0} on server {1} could not be found. | The specified endpoint could not be found. |