Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

POST /staged_config/deployment/hosts/{id}/tunnels/{name}

Updates a tunnel by host ID and tunnel name. The update is in the staged configuration and a deployment is needed. The only editable field is reverse_source. The default is false and can be set to true.

Updates a tunnel by host ID and tunnel name. The update is in the staged configuration and a deployment is needed. The only editable field is reverse_source. The default is false and can be set to true.

Table 1: POST /staged_config/deployment/hosts/{id}/tunnels/{name} Resource Details

MIME Type

application/json

Table 2: POST /staged_config/deployment/hosts/{id}/tunnels/{name} Request Parameter Details

Parameter

Type

Optionality

Data Type

MIME Type

Description

id

path

Required

Number (Integer)

text/plain

Required - The ID of the staged host.

name

path

Required

String

text/plain

Required - The name of the tunnel to be retrieved.

fields

header

Optional

String

text/plain

Optional - Use this parameter to specify which fields you would like to get back in the response. Fields that are not named are excluded. Specify subfields in brackets and multiple fields in the same object are separated by commas.

Table 3: POST /staged_config/deployment/hosts/{id}/tunnels/{name} Request Body Details

Parameter

Data Type

MIME Type

Description

Sample

tunnel

Object

application/json

Required - The tunnel values to be updated. The reverse_source field is the only field that can be edited, and it is a required field. The default is false and can be set to true. When it's set to true the remote and originating hosts are swapped.

{ "local_port": 42, "name": "String", "remote_host_id": 42, "remote_port": 42, "reverse_source": true }

Table 4: POST /staged_config/deployment/hosts/{id}/tunnels/{name} Response Codes

HTTP Response Code

Unique Code

Description

200

 

An SSH tunnel. This will be the tunnel that was updated for the staged host.

404

1012

Could not find the tunnel.

404

1013

Host id provided is invalid.

422

1010

Invalid tunnel_name provided.

422

1011

Invalid host_id provided.

422

1014

Tunnel update not permitted when origin or remote host is a Console.

422

1016

One or more provided parameters are invalid.

Response Description

An SSH Tunnel. This will be the tunnel that was updated for the staged host. The Tunnel object has the following fields:

  • name - The name of the tunnel object.

  • remote_hostID - The host ID of the remote host of the tunnel.

  • remote_port - The port on the remote host that is used by the tunnel.

  • local_port - The port on the originating host that is used by the tunnel.

  • reverse_source - Set this value to true to initiate the tunnel on the remote host instead of the originating host. This has no effect if either the originating or the remote host is a console.

Response Sample