Edit Connector Node
1 min
POST
{{url}}/aioc-rest-web/rest/tenantConnector/connectorNode/editNode
Path Parameters
- urlstringDefaulturl
Header Parameters
- X-XSRF-TOKENstringDefault{{csrftoken}}
Body Parameters
- bodyobjectDefault{ "dbId": 2216211, "nodeName": "Test Node", "subnet": "192.168.0.0/28", "tunnelPort": null, "connectionPort": null, "externalIp": null, "internalIp": "192.168.0.3", "sshKey": null, "connectorSite": { "dbId": 2215976, "siteName": "test", "siteDescription": "change_test", "isAnyNodeActive": false, "connectorNodeList": null, "pageForSearch": 0 }, "instanceName": null, "tunnelStatus": "other", "heartbeat": null, "clientId": "e609864c-bb9f-4d90-966c-5ed4cac32a77", "vpnUsername": "[email protected]", "vpnPassword": null, "vpnConfig": "[email protected]", "connectorType": "openvpn", "pageForSearch": 0, "instanceNameTunnelStatusPair": [ { "instanceName": "arift", "tunnelStatus": "waiting_client_setup" } ] }
Responses
200
curl
curl --request POST \
--url {{url}}/aioc-rest-web/rest/tenantConnector/connectorNode/editNode \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-xsrf-token: {{csrftoken}}' \
--data-raw '"{\r\n \"dbId\": 2216211,\r\n \"nodeName\": \"Test Node\",\r\n \"subnet\": \"192.168.0.0/28\",\r\n \"tunnelPort\": null,\r\n \"connectionPort\": null,\r\n \"externalIp\": null,\r\n \"internalIp\": \"192.168.0.3\",\r\n \"sshKey\": null,\r\n \"connectorSite\": {\r\n \"dbId\": 2215976,\r\n \"siteName\": \"test\",\r\n \"siteDescription\": \"change_test\",\r\n \"isAnyNodeActive\": false,\r\n \"connectorNodeList\": null,\r\n \"pageForSearch\": 0\r\n },\r\n \"instanceName\": null,\r\n \"tunnelStatus\": \"other\",\r\n \"heartbeat\": null,\r\n \"clientId\": \"e609864c-bb9f-4d90-966c-5ed4cac32a77\",\r\n \"vpnUsername\": \"[email protected]\",\r\n \"vpnPassword\": null,\r\n \"vpnConfig\": \"[email protected]\",\r\n \"connectorType\": \"openvpn\",\r\n \"pageForSearch\": 0,\r\n \"instanceNameTunnelStatusPair\": [\r\n {\r\n \"instanceName\": \"arift\",\r\n \"tunnelStatus\": \"waiting_client_setup\"\r\n }\r\n ]\r\n}"'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
myHeaders.append("x-xsrf-token", "{{csrftoken}}");
var raw = JSON.stringify("{\r\n \"dbId\": 2216211,\r\n \"nodeName\": \"Test Node\",\r\n \"subnet\": \"192.168.0.0/28\",\r\n \"tunnelPort\": null,\r\n \"connectionPort\": null,\r\n \"externalIp\": null,\r\n \"internalIp\": \"192.168.0.3\",\r\n \"sshKey\": null,\r\n \"connectorSite\": {\r\n \"dbId\": 2215976,\r\n \"siteName\": \"test\",\r\n \"siteDescription\": \"change_test\",\r\n \"isAnyNodeActive\": false,\r\n \"connectorNodeList\": null,\r\n \"pageForSearch\": 0\r\n },\r\n \"instanceName\": null,\r\n \"tunnelStatus\": \"other\",\r\n \"heartbeat\": null,\r\n \"clientId\": \"e609864c-bb9f-4d90-966c-5ed4cac32a77\",\r\n \"vpnUsername\": \"[email protected]\",\r\n \"vpnPassword\": null,\r\n \"vpnConfig\": \"[email protected]\",\r\n \"connectorType\": \"openvpn\",\r\n \"pageForSearch\": 0,\r\n \"instanceNameTunnelStatusPair\": [\r\n {\r\n \"instanceName\": \"arift\",\r\n \"tunnelStatus\": \"waiting_client_setup\"\r\n }\r\n ]\r\n}");
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("{{url}}/aioc-rest-web/rest/tenantConnector/connectorNode/editNode", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("{{url}}/aioc-rest-web/rest/tenantConnector/connectorNode/editNode")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request["x-xsrf-token"] = "{{csrftoken}}"
request.body = JSON.dump("{\r\n \"dbId\": 2216211,\r\n \"nodeName\": \"Test Node\",\r\n \"subnet\": \"192.168.0.0/28\",\r\n \"tunnelPort\": null,\r\n \"connectionPort\": null,\r\n \"externalIp\": null,\r\n \"internalIp\": \"192.168.0.3\",\r\n \"sshKey\": null,\r\n \"connectorSite\": {\r\n \"dbId\": 2215976,\r\n \"siteName\": \"test\",\r\n \"siteDescription\": \"change_test\",\r\n \"isAnyNodeActive\": false,\r\n \"connectorNodeList\": null,\r\n \"pageForSearch\": 0\r\n },\r\n \"instanceName\": null,\r\n \"tunnelStatus\": \"other\",\r\n \"heartbeat\": null,\r\n \"clientId\": \"e609864c-bb9f-4d90-966c-5ed4cac32a77\",\r\n \"vpnUsername\": \"[email protected]\",\r\n \"vpnPassword\": null,\r\n \"vpnConfig\": \"[email protected]\",\r\n \"connectorType\": \"openvpn\",\r\n \"pageForSearch\": 0,\r\n \"instanceNameTunnelStatusPair\": [\r\n {\r\n \"instanceName\": \"arift\",\r\n \"tunnelStatus\": \"waiting_client_setup\"\r\n }\r\n ]\r\n}")
response = http.request(request)
puts response.read_body
python
import requests
import json
url = "{{url}}/aioc-rest-web/rest/tenantConnector/connectorNode/editNode"
payload = json.dumps("{\r\n \"dbId\": 2216211,\r\n \"nodeName\": \"Test Node\",\r\n \"subnet\": \"192.168.0.0/28\",\r\n \"tunnelPort\": null,\r\n \"connectionPort\": null,\r\n \"externalIp\": null,\r\n \"internalIp\": \"192.168.0.3\",\r\n \"sshKey\": null,\r\n \"connectorSite\": {\r\n \"dbId\": 2215976,\r\n \"siteName\": \"test\",\r\n \"siteDescription\": \"change_test\",\r\n \"isAnyNodeActive\": false,\r\n \"connectorNodeList\": null,\r\n \"pageForSearch\": 0\r\n },\r\n \"instanceName\": null,\r\n \"tunnelStatus\": \"other\",\r\n \"heartbeat\": null,\r\n \"clientId\": \"e609864c-bb9f-4d90-966c-5ed4cac32a77\",\r\n \"vpnUsername\": \"[email protected]\",\r\n \"vpnPassword\": null,\r\n \"vpnConfig\": \"[email protected]\",\r\n \"connectorType\": \"openvpn\",\r\n \"pageForSearch\": 0,\r\n \"instanceNameTunnelStatusPair\": [\r\n {\r\n \"instanceName\": \"arift\",\r\n \"tunnelStatus\": \"waiting_client_setup\"\r\n }\r\n ]\r\n}")
headers = {
'accept': 'application/json',
'content-type': 'application/json',
'x-xsrf-token': '{{csrftoken}}'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// Edit Connector Node