Skip to content

Tunnel APIs

1. Get All Tunnels

curl https://api.socketxp.com/v1/tunnels \
  -X GET \
  -H "Authorization: Bearer <your-auth-token-goes-here>" 

Sample Response

200 OK

[
    {
        "Name": "dev-00000000000000da",
        "PublicUrl": "https://dev-00000000000000da.socketxp.com",
        "Protocol": "HTTP",
        "LocalDest": "http://127.0.0.1:80",
        "Created": "Jan  6 2020 8:38 AM",
        "Uptime": "N/A"
    },
    {
        "Name": "test-user-d25ovdye",
        "PublicUrl": "N/A",
        "Protocol": "TCP",
        "LocalDest": "tcp://127.0.0.1:22",
        "Created": "Jan 6 2020 8:38 AM",
        "Uptime": "N/A"
    }
]

2. Delete All Tunnels:

curl https://api.socketxp.com/v1/tunnels \
  -X DELETE \
  -H "Authorization: Bearer <your-auth-token-goes-here>" 

Sample Response

200 OK

3. Delete One Tunnel (tunnel_id)

curl https://api.socketxp.com/v1/tunnels/:tunnel_id \
  -X DELETE \
  -H "Authorization: Bearer <your-auth-token-goes-here>" 

Sample Usage:

curl https://api.socketxp.com/v1/tunnels/dev-0000000000da \
  -X DELETE \
  -H "Authorization: Bearer <your-auth-token-goes-here>" 

Sample Response

200 OK