Expand the sections listed below to view the usage of the RestAPI in different programming languages.
params = b'{"name":"network-admins", "organization_name":"TCPWave", "description":"Group of Network Admins for TCPWave"}';
req = urllib.request.Request(url='https://10.1.10.15:8443/tims/rest/admingroup/add', data=params, method='POST')
req.add_header("Content-Type", "application/json")
req.add_header("TIMS-Session-Token", "73f79a6c-5343-44bc-b290-1cd679037d59")
f = urrlib.request.urlopen(req)
print(f.read())
throws Exception
{
HttpClient client = new DefaultHttpClient();
HttpGet request = new HttpGet(url);
request.addHeader("TIMS-Session-Token", sessionToken);
HttpResponse response = client.execute(request);
BufferedReader rd = new BufferedReader (new InputStreamReader(response.getEntity().getContent()));
String line = "";
while ((line = rd.readLine()) != null)
{
System.out.println(line);
}
}
throws Exception
{
HttpClient client = new DefaultHttpClient();
HttpPost post = new HttpPost(url);
post.addHeader("TIMS-Session-Token", sessionToken);
StringEntity input = new StringEntity(data);
Input.setContentType("application/json");
post.setEntity(input);
HttpResponse response = client.execute(post);
System.out.println(response.getStatusLine().toString());
}
curl -H "Content-Type: application/json" -H "TIMS-Session-Token: 6818fbb8-8471-4665-9561-913943f6828e" -d '{"name":"NewYorkMetro-USA-Desktop", "organization_name":"tcpwave", "description":"Admin Group for Desktop subnets in NewYorkMetro USA"}' http://localhost:8080/tims/rest/admingroup/add
curl -H "Content-Type: application/json" -H "TIMS-Session-Token: 6818fbb8-8471-4665-9561-913943f6828e" -d '{"name":"NewYorkMetro-USA-DMZ", "organization_name":"tcpwave", "description":"Admin Group for DMZ subnets in NewYorkMetro USA"}' http://localhost:8080/tims/rest/admingroup/add
curl -H "Content-Type: application/json" -H "TIMS-Session-Token: 6818fbb8-8471-4665-9561-913943f6828e" -d '{"name":"NewYorkMetro-USA-External", "organization_name":"tcpwave", "description":"Admin Group for External subnets in NewYorkMetro USA"}' http://localhost:8080/tims/rest/admingroup/add
curl -H "Content-Type: application/json" -H "TIMS-Session-Token: 6818fbb8-8471-4665-9561-913943f6828e" -d '{"name":"NewYorkMetro-USA-Phones", "organization_name":"tcpwave", "description":"Admin Group for Phones subnets in NewYorkMetro USA"}' http://localhost:8080/tims/rest/admingroup/add
curl -H "Content-Type: application/json" -H "TIMS-Session-Token: 6818fbb8-8471-4665-9561-913943f6828e" -d '{"name":"NewYorkMetro-USA-Servers", "organization_name":"tcpwave", "description":"Admin Group for Servers subnets in NewYorkMetro USA"}' http://localhost:8080/tims/rest/admingroup/add
curl -H "Content-Type: application/json" -H "TIMS-Session-Token: 6818fbb8-8471-4665-9561-913943f6828e" -d '{"name":"SaoPaulo-Brazil-B2B", "organization_name":"tcpwave", "description":"Admin Group for B2B subnets in SaoPaulo Brazil"}' http://localhost:8080/tims/rest/admingroup/add
curl -H "Content-Type: application/json" -H "TIMS-Session-Token: 6818fbb8-8471-4665-9561-913943f6828e" -d '{"name":"SaoPaulo-Brazil-Desktop", "organization_name":"tcpwave", "description":"Admin Group for Desktop subnets in SaoPaulo Brazil"}' http://localhost:8080/tims/rest/admingroup/add
curl -H "Content-Type: application/json" -H "TIMS-Session-Token: 6818fbb8-8471-4665-9561-913943f6828e" -d '{"name":"SaoPaulo-Brazil-DMZ", "organization_name":"tcpwave", "description":"Admin Group for DMZ subnets in SaoPaulo Brazil"}' http://localhost:8080/tims/rest/admingroup/add
curl -H "Content-Type: application/json" -H "TIMS-Session-Token: 6818fbb8-8471-4665-9561-913943f6828e" -d '{"name":"SaoPaulo-Brazil-External", "organization_name":"tcpwave", "description":"Admin Group for External subnets in SaoPaulo Brazil"}' http://localhost:8080/tims/rest/admingroup/add
curl -H "Content-Type: application/json" -H "TIMS-Session-Token: 6818fbb8-8471-4665-9561-913943f6828e" -d '{"name":"SaoPaulo-Brazil-Phones", "organization_name":"tcpwave", "description":"Admin Group for Phones subnets in SaoPaulo Brazil"}' http://localhost:8080/tims/rest/admingroup/add
curl -H "Content-Type: application/json" -H "TIMS-Session-Token: 6818fbb8-8471-4665-9561-913943f6828e" -d '{"name":"SaoPaulo-Brazil-Servers", "organization_name":"tcpwave", "description":"Admin Group for Servers subnets in SaoPaulo Brazil"}' http://localhost:8080/tims/rest/admingroup/add
Click here for a comprehensive list and description of the TCPWave RestAPI reference documentation.
Develop smart applications for your private hybrid clouds using TCPWave’s Restful API in your workflows.
Secure your DDI management layer for network automation by providing token based access.
Accelerate the time taken to provision hundreds of DNS records using TCPWave Restful API.