POST v1/core/accounts/{accId}/tunnels/direct/iot
creates an iot tunnel on the account
Request Information
Parameters
| Name | Description | Additional information |
|---|---|---|
| accId | the account id |
Define this parameter in the request URI. |
| item | the new IOT tunnel details |
Define this parameter in the request body. |
Request body formats
application/json, text/json
Sample:
{
"AllocateCANAddress": true,
"Tunnel": {
"ID": 1,
"TunnelName": "sample string 2",
"NextHopAddress": "sample string 3",
"NextHopMask": "sample string 4",
"BrokerAddress": "sample string 5",
"LinkCost": 6,
"MTU": 7,
"Status": "Enabled|Disabled|Deleted",
"DHCP": 8,
"CName": "sample string 9",
"Connected": true
}
}
text/javascript
Sample:
{"AllocateCANAddress":true,"Tunnel":{"ID":1,"TunnelName":"sample string 2","NextHopAddress":"sample string 3","NextHopMask":"sample string 4","BrokerAddress":"sample string 5","LinkCost":6,"MTU":7,"Status":0,"DHCP":8,"CName":"sample string 9","Connected":true}}
application/xml, text/xml
Sample:
<DirectIOTTunnelSetup xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/pbnb_models.tunnels">
<AllocateCANAddress>true</AllocateCANAddress>
<Tunnel>
<BrokerAddress>sample string 5</BrokerAddress>
<CName>sample string 9</CName>
<Connected>true</Connected>
<DHCP>8</DHCP>
<ID>1</ID>
<LinkCost>6</LinkCost>
<MTU>7</MTU>
<NextHopAddress>sample string 3</NextHopAddress>
<NextHopMask>sample string 4</NextHopMask>
<Status>Enabled|Disabled|Deleted</Status>
<TunnelName>sample string 2</TunnelName>
</Tunnel>
</DirectIOTTunnelSetup>
application/x-www-form-urlencoded
Sample:
application/bson
Sample:
AllocateCANAddress Tunnel � ID TunnelName sample string 2 NextHopAddress sample string 3 NextHopMask sample string 4 BrokerAddress sample string 5 LinkCost MTU Status DHCP CName sample string 9 Connected
Response Information
Response body formats
application/json, text/json
Sample:
{
"Success": true,
"Data": {
"ID": 1,
"TunnelName": "sample string 2",
"NextHopAddress": "sample string 3",
"NextHopMask": "sample string 4",
"BrokerAddress": "sample string 5",
"LinkCost": 6,
"MTU": 7,
"Status": "Enabled|Disabled|Deleted",
"DHCP": 8,
"CName": "sample string 9",
"Connected": true
},
"ErrorCode": 2,
"ErrorDescription": "sample string 3",
"Meta": "sample string 4"
}
text/javascript
Sample:
{"Success":true,"Data":{"ID":1,"TunnelName":"sample string 2","NextHopAddress":"sample string 3","NextHopMask":"sample string 4","BrokerAddress":"sample string 5","LinkCost":6,"MTU":7,"Status":0,"DHCP":8,"CName":"sample string 9","Connected":true},"ErrorCode":2,"ErrorDescription":"sample string 3","Meta":"sample string 4"}
application/xml, text/xml
Sample:
<PBNBReturnOfDirectIOTTunnelOiFtTLuJ xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/pbnb_models">
<Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/pbnb_models.tunnels">
<d2p1:BrokerAddress>sample string 5</d2p1:BrokerAddress>
<d2p1:CName>sample string 9</d2p1:CName>
<d2p1:Connected>true</d2p1:Connected>
<d2p1:DHCP>8</d2p1:DHCP>
<d2p1:ID>1</d2p1:ID>
<d2p1:LinkCost>6</d2p1:LinkCost>
<d2p1:MTU>7</d2p1:MTU>
<d2p1:NextHopAddress>sample string 3</d2p1:NextHopAddress>
<d2p1:NextHopMask>sample string 4</d2p1:NextHopMask>
<d2p1:Status>Enabled|Disabled|Deleted</d2p1:Status>
<d2p1:TunnelName>sample string 2</d2p1:TunnelName>
</Data>
<ErrorCode>2</ErrorCode>
<ErrorDescription>sample string 3</ErrorDescription>
<Meta>sample string 4</Meta>
<Success>true</Success>
</PBNBReturnOfDirectIOTTunnelOiFtTLuJ>
application/bson
Sample:
M Success Data � ID TunnelName sample string 2 NextHopAddress sample string 3 NextHopMask sample string 4 BrokerAddress sample string 5 LinkCost MTU Status DHCP CName sample string 9 Connected ErrorCode ErrorDescription sample string 3 Meta sample string 4