# TestEndpoint

## General

### URL

https://{host}/attunityenterprisemanager/api/v1/servers/{server} endpoints/{endpoint}?action=test&timeout={timeout}

### Description

Contact an endpoint to test connectivity and configuration (permissions, CDC configuration).

### HTTP method

GET

### Required user role

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

## Request parameters

Request parameters

| Location | Name | Required | Example |
| --- | --- | --- | --- |
| URL | Host [string] | Yes | computer.network.net |
| URL | ServerName [string] | Yes | myrepsrv1 |
| URL | EndpointName [string] | Yes | TargetSQL1 |
| URL | Timeout [int32] | Optional (default is 60 sec) | 60 (seconds) |
| Header | EnterpriseManager.APISessionID [string] | Yes | wCo0\_KvjEUFROvfHF5KGrw |

## Response body

`{
`

`"requeststate":"{enum requeststate_state}",`

`"message":""
`

`"detailed_message":""`

`}
`

## Response parameters

Response parameters

| Name | Description |
| --- | --- |
| [state](https://help.qlik.com/en-US/enterprise-manager/May2025/Content/EnterpriseManager/EnterpriseManager_APIGuide/Shared/aem_rest_api_response_params.htm#state) {enum endpoint\_state] | The current state of the endpoint |
| message | Short description of the error |
| detailed message | Elaborate description of the error |

## cURL example

### Request

`c:\Tools\curl>curl -i -k --header "EnterpriseManager.APISessionID: wCo0_KvjEUFROvfHF5KGrw" "https://computer.network.net /attunityenterprisemanager/api/v1/servers/ myrepsrv1/endpoints/TargetSQL1c?action=test&timeout=60"`

### Response

`HTTP/1.1 200 OK
`

`Cache-Control: no-cache, no-store
`

`Content-Length: 61
`

`Content-Type: application/json; charset=utf-8
`

`Server: Microsoft-HTTPAPI/2.0
`

`Date: Sun, 19 Feb 2017 16:42:11 GMT
`

### Payload

`{`

`"state":"CONNECTED",
`

`"error_message":""
`

`}
`

## Error response

Error responses

| HTTP Code | Enterprise Manager Code | Text | Description |
| --- | --- | --- | --- |
| 500 | 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. |
| 500 | AEM\_ENDPOINT\_NOT\_FOUND | Replicate endpoint {0} on server {1} could not be found. | The specified endpoint could not be found. |