CoAP GET /tcp-tunnels/connect/:serviceId

DESCRIPTION

This endpoint provides the same detailed information about a TCP tunnel service as the get service endpoint, but uses the same authorization parameters as the stream created when a TCP connection is established. This way it can be used to test the authorization permissions when the tunnel is created instead of waiting for a TCP connection to be attempted.

DECLARATION

GET /tcp-tunnels/connect/:serviceId

REQUEST

Request body is empty.

RESPONSE

CoAP status codes:

  • 205: On success.
  • 403: Blocked by IAM configuration.
  • 404: Service does not exist.

Response body is a CBOR object describing the service:

{
  "Id": "local-ssh",
  "Type": "ssh"
  "Port": 22,
  "Host": "127.0.0.1",
  "StreamPort": <uint32_t>
}
Id:
The ID matching the provided serviceId parameter.
Type:
The service type used to group services to ease access decisions.
Port:
The port number the TCP socket in the device will connect to when a TCP connection is established through the tunnel.
Host:
The host the TCP socket in the device will connect to when a TCP connection is established through the tunnel.
StreamPort:
The stream port the client should use when opening the tunnel. This is handled internally when using the [Tunnelling API](/developer/api-reference/plain-c-client-sdk/tcp_tunnelling/Introduction.html) in the client..

AUTHORIZATION PARAMETERS

This endpoint generates an Authorization request with the following Action which must be allowed for this endpoint to be available:

  • TcpTunnel:Connect

The following attributes is available in the Authorization request:

  • TcpTunnel:ServiceId
  • TcpTunnel:ServiceType