@@ -49,14 +49,15 @@ nodepass "master://0.0.0.0:9090/admin?log=info&tls=1"
4949| ` /instances/{id} ` | DELETE | Delete instance |
5050| ` /events ` | GET | SSE event stream |
5151| ` /info ` | GET | Master info |
52+ | ` /tcping ` | GET | TCP connectivity test |
5253| ` /openapi.json ` | GET | OpenAPI spec |
5354| ` /docs ` | GET | Swagger UI |
5455
5556### API Authentication
5657
5758API Key authentication is enabled by default. The key is auto-generated and stored in ` nodepass.gob ` .
5859
59- - Protected: ` /instances ` , ` /instances/{id} ` , ` /events ` , ` /info `
60+ - Protected: ` /instances ` , ` /instances/{id} ` , ` /events ` , ` /info ` , ` /tcping `
6061- Public: ` /openapi.json ` , ` /docs `
6162- Use header: ` X-API-Key: <key> `
6263- Regenerate: PATCH ` /instances/******** ` with ` { "action": "restart" } `
@@ -633,6 +634,22 @@ await fetch(`${API_URL}/instances/abc123`, {
633634- ** Authentication** : API Key required
634635- ** Response** : Contains system info, version, uptime, etc.
635636
637+ #### GET /tcping
638+ - ** Description** : TCP connectivity test to check target reachability and latency
639+ - ** Authentication** : API Key required
640+ - ** Parameters** :
641+ - ` target ` (required): Target address in format ` host:port `
642+ - ** Response** :
643+ ``` json
644+ {
645+ "target" : " example.com:80" ,
646+ "connected" : true ,
647+ "latency" : 45 ,
648+ "error" : null
649+ }
650+ ```
651+ - ** Example** : ` GET /api/tcping?target=fast.com:443 `
652+
636653#### GET /openapi.json
637654- ** Description** : Get OpenAPI 3.1.1 specification
638655- ** Authentication** : No authentication required
0 commit comments