Terminate a device tunnel
DELETE/api/v1/devices/{deviceId}/tunnels/sessions/{tunnelSessionId}
Initiates a graceful or immediate shutdown of the specified tunnel session. In this version, a termination requested through this endpoint currently reports terminationSource as TunnelMgmt instead of User.
Preconditions: The session must be in REQUESTED, ESTABLISHING, ESTABLISHED, or RECONNECTING state.
If the session is already FAILED, TERMINATING, or TERMINATED, the request returns 409 (WEDA.Tunnel.SessionInTerminalStatus).
Request body (required; omitting it returns 400):
reason: Human-readable explanation for the termination.graceful: Whentrue, the agent honours theforceTimeoutbefore hard-closing existing connections. Defaults tofalse(close immediately).forceTimeout: Maximum seconds to wait for the device to close the tunnel before forcing closure, whether or notgracefulistrue. If omitted, 0, or negative, the default is used (60 seconds unless the deployment configures a different value).
Request
Responses
- 202
- 400
- 403
- 404
- 409
- 500
The tunnel session being terminated.
Bad Request
Forbidden
Not Found
Conflict. The session is already FAILED, TERMINATING, or TERMINATED and accepts no further changes.
Internal Server Error