curl -X GET -H "X-Auth-Token: [[apiKey]]" "http://{IP}:{PORT}/api/v1/host?limit=&offset=&sortBy=&order=&hostName=&hostMac=&hostType=&connectedInterfaceName=&hostIp=&connectedNetworkDeviceIpAddress=&subType=&filterOperation="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.HostOperationApi;
import java.io.File;
import java.util.*;
public class HostOperationApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: auth_ticket
ApiKeyAuth auth_ticket = (ApiKeyAuth) defaultClient.getAuthentication("auth_ticket");
auth_ticket.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//auth_ticket.setApiKeyPrefix("Token");
HostOperationApi apiInstance = new HostOperationApi();
String limit = limit_example; // String | Limit
String offset = offset_example; // String | Offset
String sortBy = sortBy_example; // String | Sort by
String order = order_example; // String | order
array[String] hostName = ; // array[String] | Host name
array[String] hostMac = ; // array[String] | Mac address of the host
array[String] hostType = ; // array[String] | Type of the host. Available options are Wired, Wireless
array[String] connectedInterfaceName = ; // array[String] | Name of the interface to which host gets connected
array[String] hostIp = ; // array[String] | Ip address of the host
array[String] connectedNetworkDeviceIpAddress = ; // array[String] | Id of the network device to which host gets connected
array[String] subType = ; // array[String] | UNKNOWN or IP_PHONE or TELEPRESENCE or VIDEO_SURVEILLANCE_IP_CAMERA or VIDEO_ENDPOINT
String filterOperation = filterOperation_example; // String | startswith/contains/endswith
try {
HostOperation_HostListResult result = apiInstance.getHosts(limit, offset, sortBy, order, hostName, hostMac, hostType, connectedInterfaceName, hostIp, connectedNetworkDeviceIpAddress, subType, filterOperation);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling HostOperationApi#getHosts");
e.printStackTrace();
}
}
}
import io.swagger.client.api.HostOperationApi;
public class HostOperationApiExample {
public static void main(String[] args) {
HostOperationApi apiInstance = new HostOperationApi();
String limit = limit_example; // String | Limit
String offset = offset_example; // String | Offset
String sortBy = sortBy_example; // String | Sort by
String order = order_example; // String | order
array[String] hostName = ; // array[String] | Host name
array[String] hostMac = ; // array[String] | Mac address of the host
array[String] hostType = ; // array[String] | Type of the host. Available options are Wired, Wireless
array[String] connectedInterfaceName = ; // array[String] | Name of the interface to which host gets connected
array[String] hostIp = ; // array[String] | Ip address of the host
array[String] connectedNetworkDeviceIpAddress = ; // array[String] | Id of the network device to which host gets connected
array[String] subType = ; // array[String] | UNKNOWN or IP_PHONE or TELEPRESENCE or VIDEO_SURVEILLANCE_IP_CAMERA or VIDEO_ENDPOINT
String filterOperation = filterOperation_example; // String | startswith/contains/endswith
try {
HostOperation_HostListResult result = apiInstance.getHosts(limit, offset, sortBy, order, hostName, hostMac, hostType, connectedInterfaceName, hostIp, connectedNetworkDeviceIpAddress, subType, filterOperation);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling HostOperationApi#getHosts");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: auth_ticket)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Auth-Token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Auth-Token"];
String *limit = limit_example; // Limit (optional)
String *offset = offset_example; // Offset (optional)
String *sortBy = sortBy_example; // Sort by (optional)
String *order = order_example; // order (optional)
array[String] *hostName = ; // Host name (optional)
array[String] *hostMac = ; // Mac address of the host (optional)
array[String] *hostType = ; // Type of the host. Available options are Wired, Wireless (optional)
array[String] *connectedInterfaceName = ; // Name of the interface to which host gets connected (optional)
array[String] *hostIp = ; // Ip address of the host (optional)
array[String] *connectedNetworkDeviceIpAddress = ; // Id of the network device to which host gets connected (optional)
array[String] *subType = ; // UNKNOWN or IP_PHONE or TELEPRESENCE or VIDEO_SURVEILLANCE_IP_CAMERA or VIDEO_ENDPOINT (optional)
String *filterOperation = filterOperation_example; // startswith/contains/endswith (optional)
HostOperationApi *apiInstance = [[HostOperationApi alloc] init];
// Get Hosts
[apiInstance getHostsWith:limit
offset:offset
sortBy:sortBy
order:order
hostName:hostName
hostMac:hostMac
hostType:hostType
connectedInterfaceName:connectedInterfaceName
hostIp:hostIp
connectedNetworkDeviceIpAddress:connectedNetworkDeviceIpAddress
subType:subType
filterOperation:filterOperation
completionHandler: ^(HostOperation_HostListResult output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var CiscoPacketTracerNorthboundApiForNetworkControllerDevice = require('cisco_packet_tracer_northbound_api_for_network_controller_device');
var defaultClient = CiscoPacketTracerNorthboundApiForNetworkControllerDevice.ApiClient.instance;
// Configure API key authorization: auth_ticket
var auth_ticket = defaultClient.authentications['auth_ticket'];
auth_ticket.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//auth_ticket.apiKeyPrefix['X-Auth-Token'] = "Token"
var api = new CiscoPacketTracerNorthboundApiForNetworkControllerDevice.HostOperationApi()
var opts = {
'limit': limit_example, // {String} Limit
'offset': offset_example, // {String} Offset
'sortBy': sortBy_example, // {String} Sort by
'order': order_example, // {String} order
'hostName': , // {array[String]} Host name
'hostMac': , // {array[String]} Mac address of the host
'hostType': , // {array[String]} Type of the host. Available options are Wired, Wireless
'connectedInterfaceName': , // {array[String]} Name of the interface to which host gets connected
'hostIp': , // {array[String]} Ip address of the host
'connectedNetworkDeviceIpAddress': , // {array[String]} Id of the network device to which host gets connected
'subType': , // {array[String]} UNKNOWN or IP_PHONE or TELEPRESENCE or VIDEO_SURVEILLANCE_IP_CAMERA or VIDEO_ENDPOINT
'filterOperation': filterOperation_example // {String} startswith/contains/endswith
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getHosts(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class getHostsExample
{
public void main()
{
// Configure API key authorization: auth_ticket
Configuration.Default.ApiKey.Add("X-Auth-Token", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("X-Auth-Token", "Bearer");
var apiInstance = new HostOperationApi();
var limit = limit_example; // String | Limit (optional)
var offset = offset_example; // String | Offset (optional)
var sortBy = sortBy_example; // String | Sort by (optional)
var order = order_example; // String | order (optional)
var hostName = new array[String](); // array[String] | Host name (optional)
var hostMac = new array[String](); // array[String] | Mac address of the host (optional)
var hostType = new array[String](); // array[String] | Type of the host. Available options are Wired, Wireless (optional)
var connectedInterfaceName = new array[String](); // array[String] | Name of the interface to which host gets connected (optional)
var hostIp = new array[String](); // array[String] | Ip address of the host (optional)
var connectedNetworkDeviceIpAddress = new array[String](); // array[String] | Id of the network device to which host gets connected (optional)
var subType = new array[String](); // array[String] | UNKNOWN or IP_PHONE or TELEPRESENCE or VIDEO_SURVEILLANCE_IP_CAMERA or VIDEO_ENDPOINT (optional)
var filterOperation = filterOperation_example; // String | startswith/contains/endswith (optional)
try
{
// Get Hosts
HostOperation_HostListResult result = apiInstance.getHosts(limit, offset, sortBy, order, hostName, hostMac, hostType, connectedInterfaceName, hostIp, connectedNetworkDeviceIpAddress, subType, filterOperation);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling HostOperationApi.getHosts: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: auth_ticket
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
$api_instance = new Swagger\Client\Api\HostOperationApi();
$limit = limit_example; // String | Limit
$offset = offset_example; // String | Offset
$sortBy = sortBy_example; // String | Sort by
$order = order_example; // String | order
$hostName = ; // array[String] | Host name
$hostMac = ; // array[String] | Mac address of the host
$hostType = ; // array[String] | Type of the host. Available options are Wired, Wireless
$connectedInterfaceName = ; // array[String] | Name of the interface to which host gets connected
$hostIp = ; // array[String] | Ip address of the host
$connectedNetworkDeviceIpAddress = ; // array[String] | Id of the network device to which host gets connected
$subType = ; // array[String] | UNKNOWN or IP_PHONE or TELEPRESENCE or VIDEO_SURVEILLANCE_IP_CAMERA or VIDEO_ENDPOINT
$filterOperation = filterOperation_example; // String | startswith/contains/endswith
try {
$result = $api_instance->getHosts($limit, $offset, $sortBy, $order, $hostName, $hostMac, $hostType, $connectedInterfaceName, $hostIp, $connectedNetworkDeviceIpAddress, $subType, $filterOperation);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling HostOperationApi->getHosts: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::HostOperationApi;
# Configure API key authorization: auth_ticket
$WWW::SwaggerClient::Configuration::api_key->{'X-Auth-Token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Auth-Token'} = "Bearer";
my $api_instance = WWW::SwaggerClient::HostOperationApi->new();
my $limit = limit_example; # String | Limit
my $offset = offset_example; # String | Offset
my $sortBy = sortBy_example; # String | Sort by
my $order = order_example; # String | order
my $hostName = []; # array[String] | Host name
my $hostMac = []; # array[String] | Mac address of the host
my $hostType = []; # array[String] | Type of the host. Available options are Wired, Wireless
my $connectedInterfaceName = []; # array[String] | Name of the interface to which host gets connected
my $hostIp = []; # array[String] | Ip address of the host
my $connectedNetworkDeviceIpAddress = []; # array[String] | Id of the network device to which host gets connected
my $subType = []; # array[String] | UNKNOWN or IP_PHONE or TELEPRESENCE or VIDEO_SURVEILLANCE_IP_CAMERA or VIDEO_ENDPOINT
my $filterOperation = filterOperation_example; # String | startswith/contains/endswith
eval {
my $result = $api_instance->getHosts(limit => $limit, offset => $offset, sortBy => $sortBy, order => $order, hostName => $hostName, hostMac => $hostMac, hostType => $hostType, connectedInterfaceName => $connectedInterfaceName, hostIp => $hostIp, connectedNetworkDeviceIpAddress => $connectedNetworkDeviceIpAddress, subType => $subType, filterOperation => $filterOperation);
print Dumper($result);
};
if ($@) {
warn "Exception when calling HostOperationApi->getHosts: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: auth_ticket
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.HostOperationApi()
limit = limit_example # String | Limit (optional)
offset = offset_example # String | Offset (optional)
sortBy = sortBy_example # String | Sort by (optional)
order = order_example # String | order (optional)
hostName = # array[String] | Host name (optional)
hostMac = # array[String] | Mac address of the host (optional)
hostType = # array[String] | Type of the host. Available options are Wired, Wireless (optional)
connectedInterfaceName = # array[String] | Name of the interface to which host gets connected (optional)
hostIp = # array[String] | Ip address of the host (optional)
connectedNetworkDeviceIpAddress = # array[String] | Id of the network device to which host gets connected (optional)
subType = # array[String] | UNKNOWN or IP_PHONE or TELEPRESENCE or VIDEO_SURVEILLANCE_IP_CAMERA or VIDEO_ENDPOINT (optional)
filterOperation = filterOperation_example # String | startswith/contains/endswith (optional)
try:
# Get Hosts
api_response = api_instance.get_hosts(limit=limit, offset=offset, sortBy=sortBy, order=order, hostName=hostName, hostMac=hostMac, hostType=hostType, connectedInterfaceName=connectedInterfaceName, hostIp=hostIp, connectedNetworkDeviceIpAddress=connectedNetworkDeviceIpAddress, subType=subType, filterOperation=filterOperation)
pprint(api_response)
except ApiException as e:
print("Exception when calling HostOperationApi->getHosts: %s\n" % e)