User API Doc¶
DNACenterAPI¶
The DNACenterAPI
class creates “connection objects” for working with the DNA Center APIs and hierarchically organizes the DNA Center APIs and their endpoints underneath these connection objects.
DNACenterAPI summary structure¶
v1.2.10 summary¶
v1.3.0 summary¶
v1.3.1 summary¶
v1.3.3 summary¶
v2.1.1 summary¶
v2.1.2 summary¶
v2.2.1 summary¶
DNACenterAPI Class¶
- class DNACenterAPI[source]¶
Cisco DNA Center API wrapper.
Creates a ‘session’ for all API calls through a created DNACenterAPI object. The ‘session’ handles authentication, provides the needed headers, and checks all responses for error conditions.
DNACenterAPI wraps all of the individual DNA Center APIs and represents them in a simple hierarchical structure.
- __init__(username=None, password=None, encoded_auth=None, base_url='https://sandboxdnac.cisco.com:443', single_request_timeout=60, wait_on_rate_limit=True, verify=True, version='2.2.1', debug='False', object_factory=<function mydict_data_factory>, validator=<class 'dnacentersdk.models.schema_validator.SchemaValidator'>)[source]¶
Create a new DNACenterAPI object. An access token is required to interact with the DNA Center APIs. This package supports two methods for you to generate the authorization token:
1. Provide a encoded_auth value (username:password encoded in base 64). This has priority over the following method
Provide username and password values.
This package supports two methods for you to set those values:
1. Provide the parameter. That is the encoded_auth or username and password parameters.
2. If an argument is not supplied, the package checks for its environment variable counterpart. That is the DNA_CENTER_ENCODED_AUTH, DNA_CENTER_USERNAME, DNA_CENTER_PASSWORD.
When not given enough parameters an AccessTokenError is raised.
- Parameters
base_url (basestring) – The base URL to be prefixed to the individual API endpoint suffixes. Defaults to the DNA_CENTER_BASE_URL environment variable or dnacentersdk.config.DEFAULT_BASE_URL if the environment variable is not set.
username (basestring) – HTTP Basic Auth username.
password (basestring) – HTTP Basic Auth password.
encoded_auth (basestring) – HTTP Basic Auth base64 encoded string.
single_request_timeout (int) – Timeout (in seconds) for RESTful HTTP requests. Defaults to the DNA_CENTER_SINGLE_REQUEST_TIMEOUT environment variable or dnacentersdk.config.DEFAULT_SINGLE_REQUEST_TIMEOUT if the environment variable is not set.
wait_on_rate_limit (bool) – Enables or disables automatic rate-limit handling. Defaults to the DNA_CENTER_WAIT_ON_RATE_LIMIT environment variable or dnacentersdk.config.DEFAULT_WAIT_ON_RATE_LIMIT if the environment variable is not set.
verify (bool,basestring) – Controls whether we verify the server’s TLS certificate, or a string, in which case it must be a path to a CA bundle to use. Defaults to the DNA_CENTER_VERIFY (or DNA_CENTER_VERIFY_STRING) environment variable or dnacentersdk.config.DEFAULT_VERIFY if the environment variables are not set.
version (basestring) – Controls which version of DNA_CENTER to use. Defaults to the DNA_CENTER_VERSION environment variable or dnacentersdk.config.DEFAULT_VERSION if the environment variable is not set.
debug (bool,basestring) – Controls whether to log information about DNA Center APIs’ request and response process. Defaults to the DNA_CENTER_DEBUG environment variable or False if the environment variable is not set.
object_factory (callable) – The factory function to use to create Python objects from the returned DNA Center JSON data objects.
validator (callable) – The factory function to use to validate Python objects sent in the body of the request.
- Returns
A new DNACenterAPI object.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
AccessTokenError – If an access token is not provided via the access_token argument or an environment variable.
VersionError – If the version is not provided via the version argument or an environment variable, or it is not a DNA Center API supported version [‘1.2.10’, ‘1.3.0’, ‘1.3.1’, ‘1.3.3’, ‘2.1.1’, ‘2.1.2’, ‘2.2.1’].
- property session¶
The DNA Center API session.
- property access_token¶
The access token used for API calls to the DNA Center service.
- property version¶
The API version of DNA Center.
- property verify¶
The verify (TLS Certificate) for the API endpoints.
- property base_url¶
The base URL prefixed to the individual API endpoint suffixes.
- property single_request_timeout¶
Timeout (in seconds) for an single HTTP request.
- property wait_on_rate_limit¶
Automatic rate-limit handling enabled / disabled.
authentication¶
- class Authentication[source]¶
Cisco DNA Center Authentication API.
Wraps the DNA Center Authentication API and exposes the API as native Python methods that return native Python objects.
- property verify¶
The verify (TLS Certificate) for the API endpoints.
- property base_url¶
The base URL for the API endpoints.
- property single_request_timeout¶
Timeout in seconds for the API requests.
- authentication_api(username, password, encoded_auth=None)[source]¶
Exchange basic auth data for an Access Token(x-auth-token) that can be used to invoke the APIs.
- Parameters
username (basestring) – HTTP Basic Auth username.
password (basestring) – HTTP Basic Auth password.
encoded_auth (basestring) – HTTP Basic Auth base64 encoded string.
- Returns
An AccessToken object with the access token provided by the DNA Center cloud.
- Return type
AccessToken
- Raises
custom_caller¶
- class CustomCaller[source]¶
Cisco DNA Center CustomCaller.
DNA Center CustomCaller allows API creation.
- call_api(method, resource_path, raise_exception=True, original_response=False, **kwargs)[source]¶
Handles the requests and response.
- Parameters
method (basestring) – type of request.
resource_path (basestring) – URL in the request object.
raise_exception (bool) – If True, http exceptions will be raised.
original_response (bool) – If True, MyDict (JSON response) is returned, else response object.
path_params (dict) (optional) – Find each path_params’ key in the resource_path and replace it with path_params’ value.
params (optional) – Dictionary or bytes to be sent in the query string for the Request.
data (optional) – Dictionary, bytes, or file-like object to send in the body of the Request.
json (optional) – json data to send in the body of the Request.
headers (optional) – Dictionary of HTTP Headers to send with the Request.
cookies (optional) – Dict or CookieJar object to send with the Request.
files (optional) – Dictionary of ‘name’: file-like-objects (or {‘name’: (‘filename’, fileobj)}) for multipart encoding upload.
auth (optional) – Auth tuple to enable Basic/Digest/Custom HTTP Auth.
timeout (float, tuple) (optional) – How long to wait for the server to send data before giving up, as a float, or a (connect timeout, read timeout) tuple.
allow_redirects (bool) (optional) – bool. Set to True if POST/PUT/DELETE redirect following is allowed.
proxies (optional) – Dictionary mapping protocol to the URL of the proxy.
verify (bool,string) (optional) – if True, the SSL cert will be verified. A CA_BUNDLE path can also be provided as a string.
stream (optional) – if False, the response content will be immediately downloaded.
cert (basestring, tuple) (optional) – if String, path to ssl client cert file (.pem). If Tuple, (‘cert’, ‘key’) pair
- Returns
If original_response is True returns the original object response, else returns a JSON response with access to the object’s properties by using the dot notation or the bracket notation. Defaults to False.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
HTTPError – If the DNA Center cloud returns an error.
DNACenterAPI v1.2.10¶
clients¶
- class Clients[source]¶
Cisco DNA Center Clients API (version: 1.2.10).
Wraps the DNA Center Clients API and exposes the API as native Python methods that return native Python objects.
- get_overall_client_health(timestamp=None, headers=None, **request_parameters)[source]¶
Returns Overall Client Health information by Client type (Wired and Wireless) for any given point of time.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_client_detail(mac_address, timestamp=None, headers=None, **request_parameters)[source]¶
Returns detailed Client information retrieved by Mac Address for any given point of time. .
- Parameters
timestamp (basestring, int) – Epoch time(in milliseconds) when the Client health data is required.
mac_address (basestring) – MAC Address of the client.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
command_runner¶
- class CommandRunner[source]¶
Cisco DNA Center Command Runner API (version: 1.2.10).
Wraps the DNA Center Command Runner API and exposes the API as native Python methods that return native Python objects.
- get_all_keywords_of_clis_accepted(headers=None, **request_parameters)[source]¶
Get valid keywords.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- run_read_only_commands_on_devices(commands=None, description=None, deviceUuids=None, name=None, timeout=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Submit request for read-only CLIs.
- Parameters
commands (list) – CommandRunnerDTO’s commands (list of strings).
description (string) – CommandRunnerDTO’s description.
deviceUuids (list) – CommandRunnerDTO’s deviceUuids (list of strings).
name (string) – CommandRunnerDTO’s name.
timeout (number) – CommandRunnerDTO’s timeout.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
devices¶
- class Devices[source]¶
Cisco DNA Center Devices API (version: 1.2.10).
Wraps the DNA Center Devices API and exposes the API as native Python methods that return native Python objects.
- get_module_info_by_id(id, headers=None, **request_parameters)[source]¶
Returns Module info by id.
- Parameters
id (basestring) – Module UUID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_interface_count(headers=None, **request_parameters)[source]¶
Returns the count of interfaces for all devices.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- sync_devices_using_forcesync(force_sync=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Synchronizes the devices. If forceSync param is false (default) then the sync would run in normal priority thread. If forceSync param is true then the sync would run in high priority thread if available, else the sync will fail. Result can be seen in the child task of each device.
- Parameters
force_sync (bool) – forceSync query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_list(associated_wlc_ip=None, collection_interval=None, collection_status=None, error_code=None, error_description=None, family=None, hostname=None, id=None, license_name=None, license_status=None, license_type=None, location=None, location_name=None, mac_address=None, management_ip_address=None, module_equpimenttype=None, module_name=None, module_operationstatecode=None, module_partnumber=None, module_servicestate=None, module_vendorequipmenttype=None, not_synced_for_minutes=None, platform_id=None, reachability_status=None, role=None, serial_number=None, series=None, software_type=None, software_version=None, type=None, up_time=None, headers=None, **request_parameters)[source]¶
Returns list of network devices based on filter criteria such as management IP address, mac address, hostname, location name and a wide variety of additional criteria. You can also use the asterisk in any value to conduct a wildcard search. For example, to find all hostnames beginning with myhost in the IP address range 192.25.18.n, issue the following request: GET fqdnoripofdnacenterplatform/dna/intent/api/v1/network- device? hostname=myhost* & managementIpAddress=192.25.18.* For a complete list of parameter names that you can use for filtering this request, see the DNA Center API Reference documentation. Note: If id parameter is provided, it will return the list of network-devices for the given ids and ignores the other request parameters. .
- Parameters
hostname (basestring, list, set, tuple) – hostname query parameter.
management_ip_address (basestring, list, set, tuple) – managementIpAddress query parameter.
mac_address (basestring, list, set, tuple) – macAddress query parameter.
location_name (basestring, list, set, tuple) – locationName query parameter.
serial_number (basestring, list, set, tuple) – serialNumber query parameter.
location (basestring, list, set, tuple) – location query parameter.
family (basestring, list, set, tuple) – family query parameter.
series (basestring, list, set, tuple) – series query parameter.
collection_status (basestring, list, set, tuple) – collectionStatus query parameter.
collection_interval (basestring, list, set, tuple) – collectionInterval query parameter.
not_synced_for_minutes (basestring, list, set, tuple) – notSyncedForMinutes query parameter.
error_code (basestring, list, set, tuple) – errorCode query parameter.
error_description (basestring, list, set, tuple) – errorDescription query parameter.
software_version (basestring, list, set, tuple) – softwareVersion query parameter.
software_type (basestring, list, set, tuple) – softwareType query parameter.
platform_id (basestring, list, set, tuple) – platformId query parameter.
reachability_status (basestring, list, set, tuple) – reachabilityStatus query parameter.
up_time (basestring, list, set, tuple) – upTime query parameter.
associated_wlc_ip (basestring, list, set, tuple) – associatedWlcIp query parameter.
license_name (basestring, list, set, tuple) – license.name query parameter.
license_type (basestring, list, set, tuple) – license.type query parameter.
license_status (basestring, list, set, tuple) – license.status query parameter.
module_name (basestring, list, set, tuple) – module+name query parameter.
module_equpimenttype (basestring, list, set, tuple) – module+equpimenttype query parameter.
module_servicestate (basestring, list, set, tuple) – module+servicestate query parameter.
module_vendorequipmenttype(basestring – tuple): module+vendorequipmenttype query parameter.
list – tuple): module+vendorequipmenttype query parameter.
set – tuple): module+vendorequipmenttype query parameter.
- :paramtuple): module+vendorequipmenttype query
parameter.
- Parameters
module_partnumber (basestring, list, set, tuple) – module+partnumber query parameter.
module_operationstatecode (basestring, list, set, tuple) – module+operationstatecode query parameter.
id (basestring) – Accepts comma separated id’s and return list of network-devices for the given id’s. If invalid or not-found id’s are provided, null entry will be returned in the list.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_polling_interval_for_all_devices(headers=None, **request_parameters)[source]¶
Returns polling interval of all devices.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_count(headers=None, **request_parameters)[source]¶
Returns the count of network devices based on the filter criteria by management IP address, mac address, hostname and location name.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_interface_vlans(id, interface_type=None, headers=None, **request_parameters)[source]¶
Returns Device Interface VLANs.
- Parameters
id (basestring) – id path parameter.
interface_type (basestring) – Vlan assocaited with sub- interface.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_interfaces_by_specified_range(device_id, records_to_return, start_index, headers=None, **request_parameters)[source]¶
Returns the list of interfaces for the device for the specified range.
- Parameters
device_id (basestring) – Device ID.
start_index (int) – Start index.
records_to_return (int) – Number of records to return.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_device_by_id(id, is_force_delete=None, headers=None, **request_parameters)[source]¶
Deletes the network device for the given Id.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_config_by_id(network_device_id, headers=None, **request_parameters)[source]¶
Returns the device config by specified device ID.
- Parameters
network_device_id (basestring) – networkDeviceId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_device(cliTransport=None, computeDevice=None, enablePassword=None, extendedDiscoveryInfo=None, httpPassword=None, httpPort=None, httpSecure=None, httpUserName=None, ipAddress=None, merakiOrgId=None, netconfPort=None, password=None, serialNumber=None, snmpAuthPassphrase=None, snmpAuthProtocol=None, snmpMode=None, snmpPrivPassphrase=None, snmpPrivProtocol=None, snmpROCommunity=None, snmpRWCommunity=None, snmpRetry=None, snmpTimeout=None, snmpUserName=None, snmpVersion=None, type=None, updateMgmtIPaddressList=None, userName=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds the device with given credential.
- Parameters
cliTransport (string) – InventoryDeviceInfo’s cliTransport.
computeDevice (boolean) – InventoryDeviceInfo’s computeDevice.
enablePassword (string) – InventoryDeviceInfo’s enablePassword.
extendedDiscoveryInfo (string) – InventoryDeviceInfo’s extendedDiscoveryInfo.
httpPassword (string) – InventoryDeviceInfo’s httpPassword.
httpPort (string) – InventoryDeviceInfo’s httpPort.
httpSecure (boolean) – InventoryDeviceInfo’s httpSecure.
httpUserName (string) – InventoryDeviceInfo’s httpUserName.
ipAddress (list) – InventoryDeviceInfo’s ipAddress (list of strings).
merakiOrgId (list) – InventoryDeviceInfo’s merakiOrgId (list of strings).
netconfPort (string) – InventoryDeviceInfo’s netconfPort.
password (string) – InventoryDeviceInfo’s password.
serialNumber (string) – InventoryDeviceInfo’s serialNumber.
snmpAuthPassphrase (string) – InventoryDeviceInfo’s snmpAuthPassphrase.
snmpAuthProtocol (string) – InventoryDeviceInfo’s snmpAuthProtocol.
snmpMode (string) – InventoryDeviceInfo’s snmpMode.
snmpPrivPassphrase (string) – InventoryDeviceInfo’s snmpPrivPassphrase.
snmpPrivProtocol (string) – InventoryDeviceInfo’s snmpPrivProtocol.
snmpROCommunity (string) – InventoryDeviceInfo’s snmpROCommunity.
snmpRWCommunity (string) – InventoryDeviceInfo’s snmpRWCommunity.
snmpRetry (number) – InventoryDeviceInfo’s snmpRetry.
snmpTimeout (number) – InventoryDeviceInfo’s snmpTimeout.
snmpUserName (string) – InventoryDeviceInfo’s snmpUserName.
snmpVersion (string) – InventoryDeviceInfo’s snmpVersion.
type (string) – InventoryDeviceInfo’s type. Available values are ‘COMPUTE_DEVICE’, ‘MERAKI_DASHBOARD’, ‘NETWORK_DEVICE’ and ‘NODATACHANGE’.
updateMgmtIPaddressList (list) – InventoryDeviceInfo’s updateMgmtIPaddressList (list of objects).
userName (string) – InventoryDeviceInfo’s userName.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_config_count(headers=None, **request_parameters)[source]¶
Returns the count of device configs.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_interface_details(device_id, name, headers=None, **request_parameters)[source]¶
Returns interface by specified device Id and interface name.
- Parameters
device_id (basestring) – Device ID.
name (basestring) – Interface name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_polling_interval_by_id(id, headers=None, **request_parameters)[source]¶
Returns polling interval by device id.
- Parameters
id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_module_count(device_id, name_list=None, operational_state_code_list=None, part_number_list=None, vendor_equipment_type_list=None, headers=None, **request_parameters)[source]¶
Returns Module Count.
- Parameters
device_id (basestring) – deviceId query parameter.
name_list (basestring, list, set, tuple) – nameList query parameter.
vendor_equipment_type_list(basestring – tuple): vendorEquipmentTypeList query parameter.
list – tuple): vendorEquipmentTypeList query parameter.
set – tuple): vendorEquipmentTypeList query parameter.
- :paramtuple): vendorEquipmentTypeList query
parameter.
- Parameters
- :paramtuple): operationalStateCodeList query
parameter.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_interface_count_by_id(device_id, headers=None, **request_parameters)[source]¶
Returns the interface count for the given device.
- Parameters
device_id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_organization_list_for_meraki(id, headers=None, **request_parameters)[source]¶
Returns list of organizations for meraki dashboard.
- Parameters
id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_ospf_interfaces(headers=None, **request_parameters)[source]¶
Returns the interfaces that has OSPF enabled.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_functional_capability_by_id(id, headers=None, **request_parameters)[source]¶
Returns functional capability with given Id.
- Parameters
id (basestring) – Functional Capability UUID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_isis_interfaces(headers=None, **request_parameters)[source]¶
Returns the interfaces that has ISIS enabled.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_config_for_all_devices(headers=None, **request_parameters)[source]¶
Returns the config for all devices.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_device_role(id=None, role=None, roleSource=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates the role of the device as access, core, distribution, border router.
- Parameters
id (string) – NetworkDeviceBriefNIO’s id.
role (string) – NetworkDeviceBriefNIO’s role.
roleSource (string) – NetworkDeviceBriefNIO’s roleSource.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_interface_info_by_id(device_id, headers=None, **request_parameters)[source]¶
Returns list of interfaces by specified device.
- Parameters
device_id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_interface_by_ip(ip_address, headers=None, **request_parameters)[source]¶
Returns list of interfaces by specified IP address.
- Parameters
ip_address (basestring) – IP address of the interface.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_network_device_by_ip(ip_address, headers=None, **request_parameters)[source]¶
Returns the network device by specified IP address.
- Parameters
ip_address (basestring) – Device IP address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_summary(id, headers=None, **request_parameters)[source]¶
Returns brief summary of device info such as hostname, management IP address for the given device Id.
- Parameters
id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_by_id(id, headers=None, **request_parameters)[source]¶
Returns the network device details for the given device ID.
- Parameters
id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_all_interfaces(limit=500, offset=1, headers=None, **request_parameters)[source]¶
Returns all available interfaces. This endpoint can return a maximum of 500 interfaces.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- sync_devices(cliTransport=None, computeDevice=None, enablePassword=None, extendedDiscoveryInfo=None, httpPassword=None, httpPort=None, httpSecure=None, httpUserName=None, ipAddress=None, merakiOrgId=None, netconfPort=None, password=None, serialNumber=None, snmpAuthPassphrase=None, snmpAuthProtocol=None, snmpMode=None, snmpPrivPassphrase=None, snmpPrivProtocol=None, snmpROCommunity=None, snmpRWCommunity=None, snmpRetry=None, snmpTimeout=None, snmpUserName=None, snmpVersion=None, type=None, updateMgmtIPaddressList=None, userName=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Sync the devices provided as input.
- Parameters
cliTransport (string) – InventoryDeviceInfo’s cliTransport.
computeDevice (boolean) – InventoryDeviceInfo’s computeDevice.
enablePassword (string) – InventoryDeviceInfo’s enablePassword.
extendedDiscoveryInfo (string) – InventoryDeviceInfo’s extendedDiscoveryInfo.
httpPassword (string) – InventoryDeviceInfo’s httpPassword.
httpPort (string) – InventoryDeviceInfo’s httpPort.
httpSecure (boolean) – InventoryDeviceInfo’s httpSecure.
httpUserName (string) – InventoryDeviceInfo’s httpUserName.
ipAddress (list) – InventoryDeviceInfo’s ipAddress (list of strings).
merakiOrgId (list) – InventoryDeviceInfo’s merakiOrgId (list of strings).
netconfPort (string) – InventoryDeviceInfo’s netconfPort.
password (string) – InventoryDeviceInfo’s password.
serialNumber (string) – InventoryDeviceInfo’s serialNumber.
snmpAuthPassphrase (string) – InventoryDeviceInfo’s snmpAuthPassphrase.
snmpAuthProtocol (string) – InventoryDeviceInfo’s snmpAuthProtocol.
snmpMode (string) – InventoryDeviceInfo’s snmpMode.
snmpPrivPassphrase (string) – InventoryDeviceInfo’s snmpPrivPassphrase.
snmpPrivProtocol (string) – InventoryDeviceInfo’s snmpPrivProtocol.
snmpROCommunity (string) – InventoryDeviceInfo’s snmpROCommunity.
snmpRWCommunity (string) – InventoryDeviceInfo’s snmpRWCommunity.
snmpRetry (number) – InventoryDeviceInfo’s snmpRetry.
snmpTimeout (number) – InventoryDeviceInfo’s snmpTimeout.
snmpUserName (string) – InventoryDeviceInfo’s snmpUserName.
snmpVersion (string) – InventoryDeviceInfo’s snmpVersion.
type (string) – InventoryDeviceInfo’s type. Available values are ‘COMPUTE_DEVICE’, ‘MERAKI_DASHBOARD’, ‘NETWORK_DEVICE’ and ‘NODATACHANGE’.
updateMgmtIPaddressList (list) – InventoryDeviceInfo’s updateMgmtIPaddressList (list of objects).
userName (string) – InventoryDeviceInfo’s userName.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_interface_by_id(id, headers=None, **request_parameters)[source]¶
Returns the interface for the given interface ID.
- Parameters
id (basestring) – Interface ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_functional_capability_for_devices(device_id, function_name=None, headers=None, **request_parameters)[source]¶
Returns the functional-capability for given devices.
- Parameters
device_id (basestring) – Accepts comma separated deviceid’s and return list of functional-capabilities for the given id’s. If invalid or not-found id’s are provided, null entry will be returned in the list.
function_name (basestring, list, set, tuple) – functionName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- register_device_for_wsa(macaddress=None, serial_number=None, headers=None, **request_parameters)[source]¶
Registers a device for WSA notification.
- Parameters
serial_number (basestring) – Serial number of the device.
macaddress (basestring) – Mac addres of the device.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_by_serial_number(serial_number, headers=None, **request_parameters)[source]¶
Returns the network device with given serial number.
- Parameters
serial_number (basestring) – Device serial number.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- export_device_list(deviceUuids=None, id=None, operationEnum=None, parameters=None, password=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Exports the selected network device to a file.
- Parameters
deviceUuids (list) – ExportDeviceDTO’s deviceUuids (list of strings).
id (string) – ExportDeviceDTO’s id.
operationEnum (string) – ExportDeviceDTO’s operationEnum. Available values are ‘CREDENTIALDETAILS’ and ‘DEVICEDETAILS’.
parameters (list) – ExportDeviceDTO’s parameters (list of strings).
password (string) – ExportDeviceDTO’s password.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_network_device_by_pagination_range(records_to_return, start_index, headers=None, **request_parameters)[source]¶
Returns the list of network devices for the given pagination range.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- retrieves_all_network_devices(associated_wlc_ip=None, collection_interval=None, collection_status=None, error_code=None, family=None, hostname=None, limit=None, mac_address=None, management_ip_address=None, offset=None, platform_id=None, reachability_failure_reason=None, reachability_status=None, role=None, role_source=None, serial_number=None, series=None, software_type=None, software_version=None, type=None, up_time=None, vrf_name=None, headers=None, **request_parameters)[source]¶
Gets the list of first 500 network devices sorted lexicographically based on host name. It can be filtered using management IP address, mac address, hostname and location name. If id param is provided, it will be returning the list of network-devices for the given id’s and other request params will be ignored. In case of autocomplete request, returns the list of specified attributes.
- Parameters
vrf_name (basestring) – vrfName query parameter.
management_ip_address (basestring) – managementIpAddress query parameter.
hostname (basestring) – hostname query parameter.
mac_address (basestring) – macAddress query parameter.
family (basestring) – family query parameter.
collection_status (basestring) – collectionStatus query parameter.
collection_interval (basestring) – collectionInterval query parameter.
software_version (basestring) – softwareVersion query parameter.
software_type (basestring) – softwareType query parameter.
reachability_status (basestring) – reachabilityStatus query parameter.
reachability_failure_reason (basestring) – reachabilityFailureReason query parameter.
error_code (basestring) – errorCode query parameter.
platform_id (basestring) – platformId query parameter.
series (basestring) – series query parameter.
type (basestring) – type query parameter.
serial_number (basestring) – serialNumber query parameter.
up_time (basestring) – upTime query parameter.
role (basestring) – role query parameter.
role_source (basestring) – roleSource query parameter.
associated_wlc_ip (basestring) – associatedWlcIp query parameter.
offset (basestring) – offset query parameter.
limit (basestring) – limit query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_modules(device_id, limit=None, name_list=None, offset=None, operational_state_code_list=None, part_number_list=None, vendor_equipment_type_list=None, headers=None, **request_parameters)[source]¶
Returns modules by specified device id.
- Parameters
device_id (basestring) – deviceId query parameter.
limit (basestring) – limit query parameter.
offset (basestring) – offset query parameter.
name_list (basestring, list, set, tuple) – nameList query parameter.
vendor_equipment_type_list(basestring – tuple): vendorEquipmentTypeList query parameter.
list – tuple): vendorEquipmentTypeList query parameter.
set – tuple): vendorEquipmentTypeList query parameter.
- :paramtuple): vendorEquipmentTypeList query
parameter.
- Parameters
- :paramtuple): operationalStateCodeList query
parameter.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_wireless_lan_controller_details_by_id(id, headers=None, **request_parameters)[source]¶
Returns the wireless lan controller info with given device ID.
- Parameters
id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_detail(identifier, search_by, timestamp=None, headers=None, **request_parameters)[source]¶
Returns detailed Network Device information retrieved by Mac Address, Device Name or UUID for any given point of time. .
- Parameters
timestamp (basestring, int) – Epoch time(in milliseconds) when the device data is required.
search_by (basestring) – MAC Address or Device Name value or UUID of the network device.
identifier (basestring) – One of keywords : macAddress or uuid or nwDeviceName.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
fabric_wired¶
- class FabricWired[source]¶
Cisco DNA Center Fabric Wired API (version: 1.2.10).
Wraps the DNA Center Fabric Wired API and exposes the API as native Python methods that return native Python objects.
- gets_border_device_detail(device_ip_address, sda_border_device, headers=None, **request_parameters)[source]¶
Beta - Gets border device detail from SDA Fabric.
- Parameters
sda_border_device (basestring) – sda/border-device path parameter.
device_ip_address (basestring) – device-ip-address path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- adds_border_device(sda_border_device, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds border device in SDA Fabric.
- Parameters
sda_border_device (basestring) – sda/border-device path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- deletes_border_device(device_ip_address, sda_border_device, headers=None, **request_parameters)[source]¶
Deletes border device from SDA Fabric.
- Parameters
sda_border_device (basestring) – sda/border-device path parameter.
device_ip_address (basestring) – device-ip-address path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
file¶
- class File[source]¶
Cisco DNA Center File API (version: 1.2.10).
Wraps the DNA Center File API and exposes the API as native Python methods that return native Python objects.
- get_list_of_available_namespaces(headers=None, **request_parameters)[source]¶
Returns list of available namespaces.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_list_of_files(name_space, headers=None, **request_parameters)[source]¶
Returns list of files under a specific namespace.
- Parameters
name_space (basestring) – A listing of fileId’s.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- download_a_file_by_fileid(file_id, dirpath=None, save_file=None, headers=None, **request_parameters)[source]¶
Downloads a file specified by fileId.
- Parameters
file_id (basestring) – File Identification number.
dirpath (basestring) – Directory absolute path. Defaults to os.getcwd().
save_file (bool) – Enable or disable automatic file creation of raw response.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
HTTP Response container. For more information check the urlib3 documentation
- Return type
urllib3.response.HTTPResponse
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
DownloadFailure – If was not able to download the raw
response to a file. –
network_discovery¶
- class NetworkDiscovery[source]¶
Cisco DNA Center Network Discovery API (version: 1.2.10).
Wraps the DNA Center Network Discovery API and exposes the API as native Python methods that return native Python objects.
- get_count_of_all_discovery_jobs(headers=None, **request_parameters)[source]¶
Returns the count of all available discovery jobs.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_netconf_credentials(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global netconf credentials.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_snmp_write_community(comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, writeCommunity=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global SNMP write community.
- Parameters
comments (string) – SNMPv2WriteCommunityDTO’s comments.
credentialType (string) – SNMPv2WriteCommunityDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – SNMPv2WriteCommunityDTO’s description.
id (string) – SNMPv2WriteCommunityDTO’s id.
instanceTenantId (string) – SNMPv2WriteCommunityDTO’s instanceTenantId.
instanceUuid (string) – SNMPv2WriteCommunityDTO’s instanceUuid.
writeCommunity (string) – SNMPv2WriteCommunityDTO’s writeCommunity.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_snmpv3_credentials(authPassword=None, authType=None, comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, privacyPassword=None, privacyType=None, snmpMode=None, username=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global SNMPv3 credential.
- Parameters
authPassword (string) – SNMPv3CredentialDTO’s authPassword.
authType (string) – SNMPv3CredentialDTO’s authType. Available values are ‘SHA’ and ‘MD5’.
comments (string) – SNMPv3CredentialDTO’s comments.
credentialType (string) – SNMPv3CredentialDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – SNMPv3CredentialDTO’s description.
id (string) – SNMPv3CredentialDTO’s id.
instanceTenantId (string) – SNMPv3CredentialDTO’s instanceTenantId.
instanceUuid (string) – SNMPv3CredentialDTO’s instanceUuid.
privacyPassword (string) – SNMPv3CredentialDTO’s privacyPassword.
privacyType (string) – SNMPv3CredentialDTO’s privacyType. Available values are ‘DES’ and ‘AES128’.
snmpMode (string) – SNMPv3CredentialDTO’s snmpMode. Available values are ‘AUTHPRIV’, ‘AUTHNOPRIV’ and ‘NOAUTHNOPRIV’.
username (string) – SNMPv3CredentialDTO’s username.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_snmp_properties(headers=None, **request_parameters)[source]¶
Returns SNMP properties.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_discovery_by_id(id, headers=None, **request_parameters)[source]¶
Stops the discovery for the given Discovery ID and removes it. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- start_discovery(cdpLevel=None, discoveryType=None, enablePasswordList=None, globalCredentialIdList=None, httpReadCredential=None, httpWriteCredential=None, ipAddressList=None, ipFilterList=None, lldpLevel=None, name=None, netconfPort=None, noAddNewDevice=None, parentDiscoveryId=None, passwordList=None, preferredMgmtIPMethod=None, protocolOrder=None, reDiscovery=None, retry=None, snmpAuthPassphrase=None, snmpAuthProtocol=None, snmpMode=None, snmpPrivPassphrase=None, snmpPrivProtocol=None, snmpROCommunity=None, snmpROCommunityDesc=None, snmpRWCommunity=None, snmpRWCommunityDesc=None, snmpUserName=None, snmpVersion=None, timeout=None, updateMgmtIp=None, userNameList=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Initiates discovery with the given parameters.
- Parameters
cdpLevel (number) – InventoryRequest’s cdpLevel.
discoveryType (string) – InventoryRequest’s discoveryType.
enablePasswordList (list) – InventoryRequest’s enablePasswordList (list of string, objects).
globalCredentialIdList (list) – InventoryRequest’s globalCredentialIdList (list of string, objects).
httpReadCredential (object) – InventoryRequest’s httpReadCredential.
httpWriteCredential (object) – InventoryRequest’s httpWriteCredential.
ipAddressList (string) – InventoryRequest’s ipAddressList.
ipFilterList (list) – InventoryRequest’s ipFilterList (list of string, objects).
lldpLevel (number) – InventoryRequest’s lldpLevel.
name (string) – InventoryRequest’s name.
netconfPort (string) – InventoryRequest’s netconfPort.
noAddNewDevice (boolean) – InventoryRequest’s noAddNewDevice.
parentDiscoveryId (string) – InventoryRequest’s parentDiscoveryId.
passwordList (list) – InventoryRequest’s passwordList (list of string, objects).
preferredMgmtIPMethod (string) – InventoryRequest’s preferredMgmtIPMethod.
protocolOrder (string) – InventoryRequest’s protocolOrder.
reDiscovery (boolean) – InventoryRequest’s reDiscovery.
retry (number) – InventoryRequest’s retry.
snmpAuthPassphrase (string) – InventoryRequest’s snmpAuthPassphrase.
snmpAuthProtocol (string) – InventoryRequest’s snmpAuthProtocol.
snmpMode (string) – InventoryRequest’s snmpMode.
snmpPrivPassphrase (string) – InventoryRequest’s snmpPrivPassphrase.
snmpPrivProtocol (string) – InventoryRequest’s snmpPrivProtocol.
snmpROCommunity (string) – InventoryRequest’s snmpROCommunity.
snmpROCommunityDesc (string) – InventoryRequest’s snmpROCommunityDesc.
snmpRWCommunity (string) – InventoryRequest’s snmpRWCommunity.
snmpRWCommunityDesc (string) – InventoryRequest’s snmpRWCommunityDesc.
snmpUserName (string) – InventoryRequest’s snmpUserName.
snmpVersion (string) – InventoryRequest’s snmpVersion.
timeout (number) – InventoryRequest’s timeout.
updateMgmtIp (boolean) – InventoryRequest’s updateMgmtIp.
userNameList (list) – InventoryRequest’s userNameList (list of string, objects).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_snmp_write_community(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global SNMP write community.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_http_write_credentials(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global HTTP write credentials.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_network_devices_from_discovery(id, cli_status=None, http_status=None, ip_address=None, netconf_status=None, ping_status=None, snmp_status=None, sort_by=None, sort_order=None, task_id=None, headers=None, **request_parameters)[source]¶
Returns the network devices from a discovery job based on given filters. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
task_id (basestring) – taskId query parameter.
sort_by (basestring) – sortBy query parameter.
sort_order (basestring) – sortOrder query parameter.
ip_address (basestring, list, set, tuple) – ipAddress query parameter.
ping_status (basestring, list, set, tuple) – pingStatus query parameter.
snmp_status (basestring, list, set, tuple) – snmpStatus query parameter.
cli_status (basestring, list, set, tuple) – cliStatus query parameter.
netconf_status (basestring, list, set, tuple) – netconfStatus query parameter.
http_status (basestring, list, set, tuple) – httpStatus query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_global_credentials(global_credential_id, siteUuids=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Update global credential for network devices in site(s).
- Parameters
siteUuids (list) – SitesInfoDTO’s siteUuids (list of strings).
global_credential_id (basestring) – Global credential Uuid.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discoveries_by_range(records_to_return, start_index, headers=None, **request_parameters)[source]¶
Returns the discovery by specified range.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_snmp_read_community(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global SNMP read community.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discovery_by_id(id, headers=None, **request_parameters)[source]¶
Returns discovery by Discovery ID. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- updates_discovery_by_id(attributeInfo=None, cdpLevel=None, deviceIds=None, discoveryCondition=None, discoveryStatus=None, discoveryType=None, enablePasswordList=None, globalCredentialIdList=None, httpReadCredential=None, httpWriteCredential=None, id=None, ipAddressList=None, ipFilterList=None, isAutoCdp=None, lldpLevel=None, name=None, netconfPort=None, numDevices=None, parentDiscoveryId=None, passwordList=None, preferredMgmtIPMethod=None, protocolOrder=None, retryCount=None, snmpAuthPassphrase=None, snmpAuthProtocol=None, snmpMode=None, snmpPrivPassphrase=None, snmpPrivProtocol=None, snmpRoCommunity=None, snmpRoCommunityDesc=None, snmpRwCommunity=None, snmpRwCommunityDesc=None, snmpUserName=None, timeOut=None, updateMgmtIp=None, userNameList=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Stops or starts an existing discovery.
- Parameters
attributeInfo (object) – DiscoveryNIO’s attributeInfo.
cdpLevel (number) – DiscoveryNIO’s cdpLevel.
deviceIds (string) – DiscoveryNIO’s deviceIds.
discoveryCondition (string) – DiscoveryNIO’s discoveryCondition.
discoveryStatus (string) – DiscoveryNIO’s discoveryStatus.
discoveryType (string) – DiscoveryNIO’s discoveryType.
enablePasswordList (string) – DiscoveryNIO’s enablePasswordList.
globalCredentialIdList (list) – DiscoveryNIO’s globalCredentialIdList (list of string, objects).
httpReadCredential (object) – DiscoveryNIO’s httpReadCredential.
httpWriteCredential (object) – DiscoveryNIO’s httpWriteCredential.
id (string) – DiscoveryNIO’s id.
ipAddressList (string) – DiscoveryNIO’s ipAddressList.
ipFilterList (string) – DiscoveryNIO’s ipFilterList.
isAutoCdp (boolean) – DiscoveryNIO’s isAutoCdp.
lldpLevel (number) – DiscoveryNIO’s lldpLevel.
name (string) – DiscoveryNIO’s name.
netconfPort (string) – DiscoveryNIO’s netconfPort.
numDevices (number) – DiscoveryNIO’s numDevices.
parentDiscoveryId (string) – DiscoveryNIO’s parentDiscoveryId.
passwordList (string) – DiscoveryNIO’s passwordList.
preferredMgmtIPMethod (string) – DiscoveryNIO’s preferredMgmtIPMethod.
protocolOrder (string) – DiscoveryNIO’s protocolOrder.
retryCount (number) – DiscoveryNIO’s retryCount.
snmpAuthPassphrase (string) – DiscoveryNIO’s snmpAuthPassphrase.
snmpAuthProtocol (string) – DiscoveryNIO’s snmpAuthProtocol.
snmpMode (string) – DiscoveryNIO’s snmpMode.
snmpPrivPassphrase (string) – DiscoveryNIO’s snmpPrivPassphrase.
snmpPrivProtocol (string) – DiscoveryNIO’s snmpPrivProtocol.
snmpRoCommunity (string) – DiscoveryNIO’s snmpRoCommunity.
snmpRoCommunityDesc (string) – DiscoveryNIO’s snmpRoCommunityDesc.
snmpRwCommunity (string) – DiscoveryNIO’s snmpRwCommunity.
snmpRwCommunityDesc (string) – DiscoveryNIO’s snmpRwCommunityDesc.
snmpUserName (string) – DiscoveryNIO’s snmpUserName.
timeOut (number) – DiscoveryNIO’s timeOut.
updateMgmtIp (boolean) – DiscoveryNIO’s updateMgmtIp.
userNameList (string) – DiscoveryNIO’s userNameList.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_cli_credentials(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global CLI credential.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_snmp_read_community(comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, readCommunity=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global SNMP read community.
- Parameters
comments (string) – SNMPv2ReadCommunityDTO’s comments.
credentialType (string) – SNMPv2ReadCommunityDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – SNMPv2ReadCommunityDTO’s description.
id (string) – SNMPv2ReadCommunityDTO’s id.
instanceTenantId (string) – SNMPv2ReadCommunityDTO’s instanceTenantId.
instanceUuid (string) – SNMPv2ReadCommunityDTO’s instanceUuid.
readCommunity (string) – SNMPv2ReadCommunityDTO’s readCommunity.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_list_of_discoveries_by_discovery_id(id, ip_address=None, limit=None, offset=None, headers=None, **request_parameters)[source]¶
Returns the list of discovery jobs for the given Discovery ID. The results can be optionally filtered based on IP. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
offset (int) – offset query parameter.
limit (int) – limit query parameter.
ip_address (basestring) – ipAddress query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_update_snmp_properties(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds SNMP properties.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discovery_jobs_by_ip(ip_address, limit=None, name=None, offset=None, headers=None, **request_parameters)[source]¶
Returns the list of discovery jobs for the given IP.
- Parameters
offset (int) – offset query parameter.
limit (int) – limit query parameter.
ip_address (basestring) – ipAddress query parameter.
name (basestring) – name query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discovered_devices_by_range(id, records_to_return, start_index, task_id=None, headers=None, **request_parameters)[source]¶
Returns the network devices discovered for the given discovery and for the given range. The maximum number of records that can be retrieved is 500. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
start_index (int) – Start index.
records_to_return (int) – Number of records to return.
task_id (basestring) – taskId query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_credential_sub_type_by_credential_id(id, headers=None, **request_parameters)[source]¶
Returns the credential sub type for the given Id.
- Parameters
id (basestring) – Global Credential ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_http_write_credentials(comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, password=None, port=None, secure=None, username=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global HTTP write credentials.
- Parameters
comments (string) – HTTPWriteCredentialDTO’s comments.
credentialType (string) – HTTPWriteCredentialDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – HTTPWriteCredentialDTO’s description.
id (string) – HTTPWriteCredentialDTO’s id.
instanceTenantId (string) – HTTPWriteCredentialDTO’s instanceTenantId.
instanceUuid (string) – HTTPWriteCredentialDTO’s instanceUuid.
password (string) – HTTPWriteCredentialDTO’s password.
port (number) – HTTPWriteCredentialDTO’s port.
secure (boolean) – HTTPWriteCredentialDTO’s secure.
username (string) – HTTPWriteCredentialDTO’s username.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_discovery_by_specified_range(records_to_delete, start_index, headers=None, **request_parameters)[source]¶
Stops discovery for the given range and removes them.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_http_read_credentials(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds HTTP read credentials.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_netconf_credentials(comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, netconfPort=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global netconf credentials.
- Parameters
comments (string) – NetconfCredentialDTO’s comments.
credentialType (string) – NetconfCredentialDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – NetconfCredentialDTO’s description.
id (string) – NetconfCredentialDTO’s id.
instanceTenantId (string) – NetconfCredentialDTO’s instanceTenantId.
instanceUuid (string) – NetconfCredentialDTO’s instanceUuid.
netconfPort (string) – NetconfCredentialDTO’s netconfPort.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_all_discovery(headers=None, **request_parameters)[source]¶
Stops all the discoveries and removes them.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_global_credentials_by_id(global_credential_id, headers=None, **request_parameters)[source]¶
Deletes global credential for the given ID.
- Parameters
global_credential_id (basestring) – ID of global- credential.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_http_read_credential(comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, password=None, port=None, secure=None, username=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global HTTP Read credential.
- Parameters
comments (string) – HTTPReadCredentialDTO’s comments.
credentialType (string) – HTTPReadCredentialDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – HTTPReadCredentialDTO’s description.
id (string) – HTTPReadCredentialDTO’s id.
instanceTenantId (string) – HTTPReadCredentialDTO’s instanceTenantId.
instanceUuid (string) – HTTPReadCredentialDTO’s instanceUuid.
password (string) – HTTPReadCredentialDTO’s password.
port (number) – HTTPReadCredentialDTO’s port.
secure (boolean) – HTTPReadCredentialDTO’s secure.
username (string) – HTTPReadCredentialDTO’s username.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_cli_credentials(comments=None, credentialType=None, description=None, enablePassword=None, id=None, instanceTenantId=None, instanceUuid=None, password=None, username=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global CLI credentials.
- Parameters
comments (string) – CLICredentialDTO’s comments.
credentialType (string) – CLICredentialDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – CLICredentialDTO’s description.
enablePassword (string) – CLICredentialDTO’s enablePassword.
id (string) – CLICredentialDTO’s id.
instanceTenantId (string) – CLICredentialDTO’s instanceTenantId.
instanceUuid (string) – CLICredentialDTO’s instanceUuid.
password (string) – CLICredentialDTO’s password.
username (string) – CLICredentialDTO’s username.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_snmpv3_credentials(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global SNMPv3 credentials.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_devices_discovered_by_id(id, task_id=None, headers=None, **request_parameters)[source]¶
Returns the count of network devices discovered in the given discovery. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
task_id (basestring) – taskId query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discovered_network_devices_by_discovery_id(id, task_id=None, headers=None, **request_parameters)[source]¶
Returns the network devices discovered for the given Discovery ID. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
task_id (basestring) – taskId query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_global_credentials(credential_sub_type, order=None, sort_by=None, headers=None, **request_parameters)[source]¶
Returns global credential for the given credential sub type.
- Parameters
credential_sub_type (basestring) – Credential type as CLI / SNMPV2_READ_COMMUNITY / SNMPV2_WRITE_COMMUNITY / SNMPV3 / HTTP_WRITE / HTTP_READ / NETCONF.
sort_by (basestring) – sortBy query parameter.
order (basestring) – order query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
networks¶
- class Networks[source]¶
Cisco DNA Center Networks API (version: 1.2.10).
Wraps the DNA Center Networks API and exposes the API as native Python methods that return native Python objects.
- get_vlan_details(headers=None, **request_parameters)[source]¶
Returns the list of VLAN names.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_site_topology(headers=None, **request_parameters)[source]¶
Returns site topology.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_physical_topology(node_type=None, headers=None, **request_parameters)[source]¶
Returns the raw physical topology by specified criteria of nodeType.
- Parameters
node_type (basestring) – nodeType query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_l3_topology_details(topology_type, headers=None, **request_parameters)[source]¶
Returns the Layer 3 network topology by routing protocol.
- Parameters
topology_type (basestring) – Type of topology(OSPF,ISIS,etc).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_topology_details(vlan_id, headers=None, **request_parameters)[source]¶
Returns Layer 2 network topology by specified VLAN ID.
- Parameters
vlan_id (basestring) – Vlan Name for e.g Vlan1, Vlan23 etc.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_overall_network_health(timestamp=None, headers=None, **request_parameters)[source]¶
Returns Overall Network Health information by Device category (Access, Distribution, Core, Router, Wireless) for any given point of time.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
non_fabric_wireless¶
- class NonFabricWireless[source]¶
Cisco DNA Center Non-Fabric Wireless API (version: 1.2.10).
Wraps the DNA Center Non-Fabric Wireless API and exposes the API as native Python methods that return native Python objects.
- delete_and_provision_ssid(managed_aplocations, ssid_name, headers=None, **request_parameters)[source]¶
Beta - Removes SSID from the given site profile and provisions these changes to devices matching the site profile.
- Parameters
ssid_name (basestring) – Enter the SSID name to be deleted.
managed_aplocations (basestring) – Enter complete site hierarchy to remove the SSID from the devices found in it. To enter more than one site hierarchy, use comma delimiter without extra space.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_enterprise_ssid(enableBroadcastSSID=None, enableFastLane=None, enableMACFiltering=None, fastTransition=None, name=None, passphrase=None, radioPolicy=None, securityLevel=None, trafficType=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Beta - Creates enterprise SSID.
- Parameters
enableBroadcastSSID (boolean) – enableBroadcastSSID, property of the request body.
enableFastLane (boolean) – enableFastLane, property of the request body.
enableMACFiltering (boolean) – enableMACFiltering, property of the request body.
fastTransition (string) – Fast Transition, property of the request body. Available values are ‘Adaptive’, ‘Enable’ and ‘Disable’.
name (string) – Enter SSID Name, property of the request body. Constraints: maxLength set to 32.
passphrase (string) – Pass Phrase (Only applicable for SSID with PERSONAL security level), property of the request body. Constraints: maxLength set to 63 and minLength set to 8.
radioPolicy (string) – Radio Policy, property of the request body. Available values are ‘Dual band operation (2.4GHz and 5GHz)’, ‘Dual band operation with band select’, ‘5GHz only’ and ‘2.4GHz only’.
securityLevel (string) – Security Level, property of the request body. Available values are ‘WPA2_ENTERPRISE’, ‘WPA2_PERSONAL’ and ‘OPEN’.
trafficType (string) – Traffic Type, property of the request body. Available values are ‘voicedata’ and ‘data’.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_and_provision_ssid(enableFabric=None, flexConnect=None, managedAPLocations=None, ssidDetails=None, ssidType=None, vlanAndDynamicInterfaceDetails=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Beta - Creates SSID, adds it to the corresponding site profiles and provisions to devices matching the site profile.
- Parameters
enableFabric (boolean) – enableFabric, property of the request body.
flexConnect (object) – Flex Connect Applicable for non fabric profile, property of the request body.
managedAPLocations (list) – Managed AP Locations (Enter entire Site(s) hierarchy), property of the request body (list of strings).
ssidDetails (object) – SsidDetails, property of the request body.
ssidType (string) – SSID Type, property of the request body. Available values are ‘Guest’ and ‘Enterprise’.
vlanAndDynamicInterfaceDetails (object) – VLAN And Dynamic Interface Details, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_enterprise_ssid(ssid_name, headers=None, **request_parameters)[source]¶
Beta - Deletes given enterprise SSID.
- Parameters
ssid_name (basestring) – Enter the SSID name to be deleted.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_enterprise_ssid(ssid_name=None, headers=None, **request_parameters)[source]¶
Beta - Gets either one or all the enterprise SSID.
- Parameters
ssid_name (basestring) – Enter the enterprise SSID name that needs to be retrieved. If not entered, all the enterprise SSIDs will be retrieved.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
path_trace¶
- class PathTrace[source]¶
Cisco DNA Center Path Trace API (version: 1.2.10).
Wraps the DNA Center Path Trace API and exposes the API as native Python methods that return native Python objects.
- retrives_all_previous_pathtraces_summary(dest_ip=None, dest_port=None, gt_create_time=None, last_update_time=None, limit=None, lt_create_time=None, offset=None, order=None, periodic_refresh=None, protocol=None, sort_by=None, source_ip=None, source_port=None, status=None, task_id=None, headers=None, **request_parameters)[source]¶
Returns a summary of all flow analyses stored. Results can be filtered by specified parameters.
- Parameters
periodic_refresh (bool) – Is analysis periodically refreshed?.
source_ip (basestring) – Source IP address.
dest_ip (basestring) – Destination IP address.
source_port (basestring) – Source port.
dest_port (basestring) – Destination port.
gt_create_time (basestring) – Analyses requested after this time.
lt_create_time (basestring) – Analyses requested before this time.
protocol (basestring) – protocol query parameter.
status (basestring) – status query parameter.
task_id (basestring) – Task ID.
last_update_time (basestring) – Last update time.
limit (basestring) – Number of resources returned.
offset (basestring) – Start index of resources returned (1-based).
order (basestring) – Order by this field.
sort_by (basestring) – Sort by this field.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- deletes_pathtrace_by_id(flow_analysis_id, headers=None, **request_parameters)[source]¶
Deletes a flow analysis request by its id.
- Parameters
flow_analysis_id (basestring) – Flow analysis request id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- initiate_a_new_pathtrace(controlPath=None, destIP=None, destPort=None, inclusions=None, periodicRefresh=None, protocol=None, sourceIP=None, sourcePort=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Initiates a new flow analysis with periodic refresh and stat collection options. Returns a request id and a task id to get results and follow progress.
- Parameters
controlPath (boolean) – FlowAnalysisRequest’s controlPath.
destIP (string) – FlowAnalysisRequest’s destIP.
destPort (string) – FlowAnalysisRequest’s destPort.
inclusions (list) – FlowAnalysisRequest’s inclusions (list of strings).
periodicRefresh (boolean) – FlowAnalysisRequest’s periodicRefresh.
protocol (string) – FlowAnalysisRequest’s protocol.
sourceIP (string) – FlowAnalysisRequest’s sourceIP.
sourcePort (string) – FlowAnalysisRequest’s sourcePort.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- retrieves_previous_pathtrace(flow_analysis_id, headers=None, **request_parameters)[source]¶
Returns result of a previously requested flow analysis by its Flow Analysis id.
- Parameters
flow_analysis_id (basestring) – Flow analysis request id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
pnp¶
- class Pnp[source]¶
Cisco DNA Center PnP API (version: 1.2.10).
Wraps the DNA Center PnP API and exposes the API as native Python methods that return native Python objects.
- get_sync_result_for_virtual_account(domain, name, headers=None, **request_parameters)[source]¶
Returns the summary of devices synced from the given smart account & virtual account with PnP.
- Parameters
domain (basestring) – Smart Account Domain.
name (basestring) – Virtual Account Name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- import_devices_in_bulk(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add devices to PnP in bulk.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_workflow(id, _id=None, addToInventory=None, addedOn=None, configId=None, currTaskIdx=None, description=None, endTime=None, execTime=None, imageId=None, instanceType=None, lastupdateOn=None, name=None, startTime=None, state=None, tasks=None, tenantId=None, type=None, useState=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates an existing workflow.
- Parameters
_id (string) – Workflow’s _id.
addToInventory (boolean) – Workflow’s addToInventory.
addedOn (number) – Workflow’s addedOn.
configId (string) – Workflow’s configId.
currTaskIdx (number) – Workflow’s currTaskIdx.
description (string) – Workflow’s description.
endTime (number) – Workflow’s endTime.
execTime (number) – Workflow’s execTime.
imageId (string) – Workflow’s imageId.
instanceType (string) – Workflow’s instanceType. Available values are ‘SystemWorkflow’, ‘UserWorkflow’ and ‘SystemResetWorkflow’.
lastupdateOn (number) – Workflow’s lastupdateOn.
name (string) – Workflow’s name.
startTime (number) – Workflow’s startTime.
state (string) – Workflow’s state.
tasks (list) – Workflow’s tasks (list of objects).
tenantId (string) – Workflow’s tenantId.
type (string) – Workflow’s type.
useState (string) – Workflow’s useState.
version (number) – Workflow’s version.
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- un_claim_device(deviceIdList=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Un-Claims one of more devices with specified workflow.
- Parameters
deviceIdList (list) – UnclaimRequest’s deviceIdList (list of string, objects).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_virtual_account(autoSyncPeriod=None, ccoUser=None, expiry=None, lastSync=None, profile=None, smartAccountId=None, syncResult=None, syncResultStr=None, syncStartTime=None, syncStatus=None, tenantId=None, token=None, virtualAccountId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Registers a Smart Account, Virtual Account and the relevant server profile info with the PnP System & database. The devices present in the registered virtual account are synced with the PnP database as well. The response payload returns the new profile.
- Parameters
autoSyncPeriod (number) – SAVAMapping’s autoSyncPeriod.
ccoUser (string) – SAVAMapping’s ccoUser.
expiry (number) – SAVAMapping’s expiry.
lastSync (number) – SAVAMapping’s lastSync.
profile (object) – SAVAMapping’s profile.
smartAccountId (string) – SAVAMapping’s smartAccountId.
syncResult (object) – SAVAMapping’s syncResult.
syncResultStr (string) – SAVAMapping’s syncResultStr.
syncStartTime (number) – SAVAMapping’s syncStartTime.
syncStatus (string) – SAVAMapping’s syncStatus. Available values are ‘NOT_SYNCED’, ‘SYNCING’, ‘SUCCESS’ and ‘FAILURE’.
tenantId (string) – SAVAMapping’s tenantId.
token (string) – SAVAMapping’s token.
virtualAccountId (string) – SAVAMapping’s virtualAccountId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_device(id, _id=None, deviceInfo=None, runSummaryList=None, systemResetWorkflow=None, systemWorkflow=None, tenantId=None, version=None, workflow=None, workflowParameters=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates device details specified by device id in PnP database.
- Parameters
_id (string) – Device’s _id.
deviceInfo (object) – Device’s deviceInfo.
runSummaryList (list) – Device’s runSummaryList (list of objects).
systemResetWorkflow (object) – Device’s systemResetWorkflow.
systemWorkflow (object) – Device’s systemWorkflow.
tenantId (string) – Device’s tenantId.
version (number) – Device’s version.
workflow (object) – Device’s workflow.
workflowParameters (object) – Device’s workflowParameters.
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- claim_a_device_to_a_site(deviceId=None, siteId=None, type=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Claim a device based on DNA-C Site based design process. Different parameters are required for different device platforms.
- Parameters
deviceId (string) – SiteProvisionRequest’s deviceId.
siteId (string) – SiteProvisionRequest’s siteId.
type (string) – SiteProvisionRequest’s type. Available values are ‘Default’, ‘AccessPoint’, ‘StackSwitch’, ‘Sensor’ and ‘MobilityExpress’.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- deregister_virtual_account(domain, name, headers=None, **request_parameters)[source]¶
Deregisters the specified smart account & virtual account info and the associated device information from the PnP System & database. The devices associated with the deregistered virtual account are removed from the PnP database as well. The response payload contains the deregistered smart & virtual account information.
- Parameters
domain (basestring) – Smart Account Domain.
name (basestring) – Virtual Account Name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_smart_account_list(headers=None, **request_parameters)[source]¶
Returns the list of Smart Account domains.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_workflow_by_id(id, headers=None, **request_parameters)[source]¶
Returns a workflow specified by id.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_pnp_server_profile(autoSyncPeriod=None, ccoUser=None, expiry=None, lastSync=None, profile=None, smartAccountId=None, syncResult=None, syncResultStr=None, syncStartTime=None, syncStatus=None, tenantId=None, token=None, virtualAccountId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates the PnP Server profile in a registered Virtual Account in the PnP database. The response payload returns the updated smart & virtual account info.
- Parameters
autoSyncPeriod (number) – SAVAMapping’s autoSyncPeriod.
ccoUser (string) – SAVAMapping’s ccoUser.
expiry (number) – SAVAMapping’s expiry.
lastSync (number) – SAVAMapping’s lastSync.
profile (object) – SAVAMapping’s profile.
smartAccountId (string) – SAVAMapping’s smartAccountId.
syncResult (object) – SAVAMapping’s syncResult.
syncResultStr (string) – SAVAMapping’s syncResultStr.
syncStartTime (number) – SAVAMapping’s syncStartTime.
syncStatus (string) – SAVAMapping’s syncStatus. Available values are ‘NOT_SYNCED’, ‘SYNCING’, ‘SUCCESS’ and ‘FAILURE’.
tenantId (string) – SAVAMapping’s tenantId.
token (string) – SAVAMapping’s token.
virtualAccountId (string) – SAVAMapping’s virtualAccountId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_workflow_count(name=None, headers=None, **request_parameters)[source]¶
Returns the workflow count.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_pnp_global_settings(_id=None, aaaCredentials=None, acceptEula=None, defaultProfile=None, savaMappingList=None, taskTimeOuts=None, tenantId=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates the user’s list of global PnP settings.
- Parameters
_id (string) – Settings’s _id.
aaaCredentials (object) – Settings’s aaaCredentials.
acceptEula (boolean) – Settings’s acceptEula.
defaultProfile (object) – Settings’s defaultProfile.
savaMappingList (list) – Settings’s savaMappingList (list of objects).
taskTimeOuts (object) – Settings’s taskTimeOuts.
tenantId (string) – Settings’s tenantId.
version (number) – Settings’s version.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_pnp_global_settings(headers=None, **request_parameters)[source]¶
Returns global PnP settings of the user.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- reset_device(deviceResetList=None, projectId=None, workflowId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Recovers a device from a Workflow Execution Error state.
- Parameters
deviceResetList (list) – ResetRequest’s deviceResetList (list of objects).
projectId (string) – ResetRequest’s projectId.
workflowId (string) – ResetRequest’s workflowId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- sync_virtual_account_devices(autoSyncPeriod=None, ccoUser=None, expiry=None, lastSync=None, profile=None, smartAccountId=None, syncResult=None, syncResultStr=None, syncStartTime=None, syncStatus=None, tenantId=None, token=None, virtualAccountId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Synchronizes the device info from the given smart account & virtual account with the PnP database. The response payload returns a list of synced devices.
- Parameters
autoSyncPeriod (number) – SAVAMapping’s autoSyncPeriod.
ccoUser (string) – SAVAMapping’s ccoUser.
expiry (number) – SAVAMapping’s expiry.
lastSync (number) – SAVAMapping’s lastSync.
profile (object) – SAVAMapping’s profile.
smartAccountId (string) – SAVAMapping’s smartAccountId.
syncResult (object) – SAVAMapping’s syncResult.
syncResultStr (string) – SAVAMapping’s syncResultStr.
syncStartTime (number) – SAVAMapping’s syncStartTime.
syncStatus (string) – SAVAMapping’s syncStatus. Available values are ‘NOT_SYNCED’, ‘SYNCING’, ‘SUCCESS’ and ‘FAILURE’.
tenantId (string) – SAVAMapping’s tenantId.
token (string) – SAVAMapping’s token.
virtualAccountId (string) – SAVAMapping’s virtualAccountId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_workflows(limit=None, name=None, offset=None, sort=None, sort_order=None, type=None, headers=None, **request_parameters)[source]¶
Returns the list of workflows based on filter criteria. If a limit is not specified, it will default to return 50 workflows. Pagination and sorting are also supported by this endpoint.
- Parameters
limit (int) – Limits number of results.
offset (int) – Index of first result.
sort (basestring, list, set, tuple) – Comma seperated lost of fields to sort on.
sort_order (basestring) – Sort Order Ascending (asc) or Descending (des).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_workflow_by_id(id, headers=None, **request_parameters)[source]¶
Deletes a workflow specified by id.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_by_id(id, headers=None, **request_parameters)[source]¶
Returns device details specified by device id.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_virtual_account_list(domain, headers=None, **request_parameters)[source]¶
Returns list of virtual accounts associated with the specified smart account.
- Parameters
domain (basestring) – Smart Account Domain.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- preview_config(deviceId=None, siteId=None, type=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Triggers a preview for site-based Day 0 Configuration.
- Parameters
deviceId (string) – SiteProvisionRequest’s deviceId.
siteId (string) – SiteProvisionRequest’s siteId.
type (string) – SiteProvisionRequest’s type. Available values are ‘Default’, ‘AccessPoint’, ‘StackSwitch’, ‘Sensor’ and ‘MobilityExpress’.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- claim_device(configFileUrl=None, configId=None, deviceClaimList=None, fileServiceId=None, imageId=None, imageUrl=None, populateInventory=None, projectId=None, workflowId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Claims one of more devices with specified workflow.
- Parameters
configFileUrl (string) – ClaimDeviceRequest’s configFileUrl.
configId (string) – ClaimDeviceRequest’s configId.
deviceClaimList (list) – ClaimDeviceRequest’s deviceClaimList (list of objects).
fileServiceId (string) – ClaimDeviceRequest’s fileServiceId.
imageId (string) – ClaimDeviceRequest’s imageId.
imageUrl (string) – ClaimDeviceRequest’s imageUrl.
populateInventory (boolean) – ClaimDeviceRequest’s populateInventory.
projectId (string) – ClaimDeviceRequest’s projectId.
workflowId (string) – ClaimDeviceRequest’s workflowId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_list(cm_state=None, last_contact=None, limit=None, name=None, offset=None, onb_state=None, pid=None, project_id=None, project_name=None, serial_number=None, smart_account_id=None, sort=None, sort_order=None, source=None, state=None, virtual_account_id=None, workflow_id=None, workflow_name=None, headers=None, **request_parameters)[source]¶
Returns list of devices based on filter crieteria. If a limit is not specified, it will default to return 50 devices. Pagination and sorting are also supported by this endpoint.
- Parameters
limit (int) – Limits number of results.
offset (int) – Index of first result.
sort (basestring, list, set, tuple) – Comma seperated list of fields to sort on.
sort_order (basestring) – Sort Order Ascending (asc) or Descending (des).
serial_number (basestring, list, set, tuple) – Device Serial Number.
onb_state (basestring, list, set, tuple) – Device Onboarding State.
cm_state (basestring, list, set, tuple) – Device Connection Manager State.
project_id (basestring, list, set, tuple) – Device Project Id.
workflow_id (basestring, list, set, tuple) – Device Workflow Id.
project_name (basestring, list, set, tuple) – Device Project Name.
workflow_name (basestring, list, set, tuple) – Device Workflow Name.
smart_account_id (basestring, list, set, tuple) – Device Smart Account.
virtual_account_id (basestring, list, set, tuple) – Device Virtual Account.
last_contact (bool) – Device Has Contacted lastContact > 0.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_a_workflow(_id=None, addToInventory=None, addedOn=None, configId=None, currTaskIdx=None, description=None, endTime=None, execTime=None, imageId=None, instanceType=None, lastupdateOn=None, name=None, startTime=None, state=None, tasks=None, tenantId=None, type=None, useState=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds a PnP Workflow along with the relevant tasks in the workflow into the PnP database.
- Parameters
_id (string) – Workflow’s _id.
addToInventory (boolean) – Workflow’s addToInventory.
addedOn (number) – Workflow’s addedOn.
configId (string) – Workflow’s configId.
currTaskIdx (number) – Workflow’s currTaskIdx.
description (string) – Workflow’s description.
endTime (number) – Workflow’s endTime.
execTime (number) – Workflow’s execTime.
imageId (string) – Workflow’s imageId.
instanceType (string) – Workflow’s instanceType. Available values are ‘SystemWorkflow’, ‘UserWorkflow’ and ‘SystemResetWorkflow’.
lastupdateOn (number) – Workflow’s lastupdateOn.
name (string) – Workflow’s name.
startTime (number) – Workflow’s startTime.
state (string) – Workflow’s state.
tasks (list) – Workflow’s tasks (list of objects).
tenantId (string) – Workflow’s tenantId.
type (string) – Workflow’s type.
useState (string) – Workflow’s useState.
version (number) – Workflow’s version.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_count(cm_state=None, last_contact=None, name=None, onb_state=None, pid=None, project_id=None, project_name=None, serial_number=None, smart_account_id=None, source=None, state=None, virtual_account_id=None, workflow_id=None, workflow_name=None, headers=None, **request_parameters)[source]¶
Returns the device count based on filter criteria. This is useful for pagination.
- Parameters
serial_number (basestring, list, set, tuple) – Device Serial Number.
onb_state (basestring, list, set, tuple) – Device Onboarding State.
cm_state (basestring, list, set, tuple) – Device Connection Manager State.
project_id (basestring, list, set, tuple) – Device Project Id.
workflow_id (basestring, list, set, tuple) – Device Workflow Id.
project_name (basestring, list, set, tuple) – Device Project Name.
workflow_name (basestring, list, set, tuple) – Device Workflow Name.
smart_account_id (basestring, list, set, tuple) – Device Smart Account.
virtual_account_id (basestring, list, set, tuple) – Device Virtual Account.
last_contact (bool) – Device Has Contacted lastContact > 0.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_history(serial_number, sort=None, sort_order=None, headers=None, **request_parameters)[source]¶
Returns history for a specific device. Serial number is a required parameter.
- Parameters
serial_number (basestring) – Device Serial Number.
sort (basestring, list, set, tuple) – Comma seperated list of fields to sort on.
sort_order (basestring) – Sort Order Ascending (asc) or Descending (des).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_device_by_id_from_pnp(id, headers=None, **request_parameters)[source]¶
Deletes specified device from PnP database.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_device(_id=None, deviceInfo=None, runSummaryList=None, systemResetWorkflow=None, systemWorkflow=None, tenantId=None, version=None, workflow=None, workflowParameters=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds a device to the PnP database.
- Parameters
_id (string) – Device’s _id.
deviceInfo (object) – Device’s deviceInfo.
runSummaryList (list) – Device’s runSummaryList (list of objects).
systemResetWorkflow (object) – Device’s systemResetWorkflow.
systemWorkflow (object) – Device’s systemWorkflow.
tenantId (string) – Device’s tenantId.
version (number) – Device’s version.
workflow (object) – Device’s workflow.
workflowParameters (object) – Device’s workflowParameters.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
swim¶
- class Swim[source]¶
Cisco DNA Center SWIM API (version: 1.2.10).
Wraps the DNA Center SWIM API and exposes the API as native Python methods that return native Python objects.
- get_software_image_details(application_type=None, created_time=None, family=None, image_integrity_status=None, image_name=None, image_series=None, image_size_greater_than=None, image_size_lesser_than=None, image_uuid=None, is_cco_latest=None, is_cco_recommended=None, is_tagged_golden=None, limit=None, name=None, offset=None, sort_by=None, sort_order='asc', version=None, headers=None, **request_parameters)[source]¶
Returns software image list based on a filter criteria. For example: “filterbyName = cat3k%”.
- Parameters
image_uuid (basestring) – imageUuid query parameter.
name (basestring) – name query parameter.
family (basestring) – family query parameter.
application_type (basestring) – applicationType query parameter.
image_integrity_status (basestring) – imageIntegrityStatus FAILURE, UNKNOWN, VERIFIED.
version (basestring) – software Image Version.
image_series (basestring) – image Series.
image_name (basestring) – image Name.
is_tagged_golden (bool) – is Tagged Golden.
is_cco_recommended (bool) – is recommended from cisco.com.
is_cco_latest (bool) – is latest from cisco.com.
created_time (int) – time in milliseconds (epoch format).
image_size_greater_than (int) – size in bytes.
image_size_lesser_than (int) – size in bytes.
sort_by (basestring) – sort results by this field.
sort_order (basestring) – sort order ‘asc’ or ‘des’. Default is asc.
limit (int) – limit query parameter.
offset (int) – offset query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- trigger_software_image_distribution(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Distributes a software image on a given device. Software image must be imported successfully into DNA Center before it can be distributed.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- import_local_software_image(multipart_fields, multipart_monitor_callback, is_third_party=None, third_party_application_type=None, third_party_image_family=None, third_party_vendor=None, headers=None, **request_parameters)[source]¶
Fetches a software image from local file system and uploads to DNA Center. Supported software image files extensions are bin, img, tar, smu, pie, aes, iso, ova, tar_gz and qcow2.
The following code gives an example of the multipart_fields.
multipart_fields={'file': ('file.zip', open('file.zip', 'rb')} multipart_fields={'file': ('file.txt', open('file.txt', 'rb'), 'text/plain', {'X-My-Header': 'my-value'})} multipart_fields=[('images', ('foo.png', open('foo.png', 'rb'), 'image/png')), ('images', ('bar.png', open('bar.png', 'rb'), 'image/png'))]
The following example demonstrates how to use multipart_monitor_callback=create_callback to create a progress bar using clint.
from clint.textui.progress import Bar def create_callback(encoder): encoder_len = encoder.len bar = Bar(expected_size=encoder_len, filled_char="=") def callback(monitor): bar.show(monitor.bytes_read) return callback
- Parameters
is_third_party (bool) – Third party Image check.
third_party_vendor (basestring) – Third Party Vendor.
third_party_image_family (basestring) – Third Party image family.
third_party_application_type (basestring) – Third Party Application Type.
multipart_fields (dict) – Fields from which to create a multipart/form-data body.
multipart_monitor_callback (function) – function used to monitor the progress of the upload.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- import_software_image_via_url(schedule_at=None, schedule_desc=None, schedule_origin=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Fetches a software image from remote file system (using URL for HTTP/FTP) and uploads to DNA Center. Supported image files extensions are bin, img, tar, smu, pie, aes, iso, ova, tar_gz and qcow2.
- Parameters
schedule_at (basestring) – Epoch Time (The number of milli-seconds since January 1 1970 UTC) at which the distribution should be scheduled (Optional) .
schedule_desc (basestring) – Custom Description (Optional).
schedule_origin (basestring) – Originator of this call (Optional).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- trigger_software_image_activation(schedule_validate=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Activates a software image on a given device. Software image must be present in the device flash.
- Parameters
schedule_validate (bool) – scheduleValidate, validates data before schedule (Optional).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
site_profile¶
- class SiteProfile[source]¶
Cisco DNA Center Site Profile API (version: 1.2.10).
Wraps the DNA Center Site Profile API and exposes the API as native Python methods that return native Python objects.
- get_device_details_by_ip(device_ip, headers=None, **request_parameters)[source]¶
Beta - Returns provisioning device information for the specified IP address.
- Parameters
device_ip (basestring) – Device to which the provisioning detail has to be retrieved.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- provision_nfv(callbackUrl=None, provisioning=None, siteProfile=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Design and Provision single/multi NFV device with given site/area/building/floor .
- Parameters
callbackUrl (string) – Callback Url, property of the request body.
provisioning (list) – Provisioning, property of the request body (list of objects).
siteProfile (list) – Site Profile, property of the request body (list of objects).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
sites¶
- class Sites[source]¶
Cisco DNA Center Sites API (version: 1.2.10).
Wraps the DNA Center Sites API and exposes the API as native Python methods that return native Python objects.
- get_site_health(timestamp=None, headers=None, **request_parameters)[source]¶
Returns Overall Health information for all sites.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- assign_device_to_site(site_id, device=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Assigns list of devices to a site.
- Parameters
device (list) – Device, property of the request body (list of objects).
site_id (basestring) – Site id to which the device is assigned.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_site(site=None, type=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates site with area/building/floor with specified hierarchy.
- Parameters
site (object) – Site, property of the request body.
type (string) – Type, property of the request body. Available values are ‘area’, ‘building’ and ‘floor’.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
tag¶
- class Tag[source]¶
Cisco DNA Center Tag API (version: 1.2.10).
Wraps the DNA Center Tag API and exposes the API as native Python methods that return native Python objects.
- add_members_to_the_tag(id, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds members to the tag specified by id.
- Parameters
id (basestring) – Tag ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag_member_count(id, member_type, level='0', member_association_type=None, headers=None, **request_parameters)[source]¶
Returns the number of members in a given tag.
- Parameters
id (basestring) – Tag ID.
member_type (basestring) – memberType query parameter.
member_association_type (basestring) – memberAssociationType query parameter.
level (basestring) – level query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_tag(description=None, dynamicRules=None, id=None, instanceTenantId=None, name=None, systemTag=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates tag with specified tag attributes.
- Parameters
description (string) – TagDTO’s description.
dynamicRules (list) – TagDTO’s dynamicRules (list of objects).
id (string) – TagDTO’s id.
instanceTenantId (string) – TagDTO’s instanceTenantId.
name (string) – TagDTO’s name.
systemTag (boolean) – TagDTO’s systemTag.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag_resource_types(headers=None, **request_parameters)[source]¶
Returns list of supported resource types.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- updates_tag_membership(memberToTags=None, memberType=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates tag membership. As part of the request payload through this API, only the specified members are added / retained to the given input tags. Possible values of memberType attribute in the request payload can be queried by using the /tag/member/type API.
- Parameters
memberToTags (array, object) – TagMemberDTO’s memberToTags.
memberType (string) – TagMemberDTO’s memberType.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_tag(description=None, dynamicRules=None, id=None, instanceTenantId=None, name=None, systemTag=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates a tag specified by id.
- Parameters
description (string) – TagDTO’s description.
dynamicRules (list) – TagDTO’s dynamicRules (list of objects).
id (string) – TagDTO’s id.
instanceTenantId (string) – TagDTO’s instanceTenantId.
name (string) – TagDTO’s name.
systemTag (boolean) – TagDTO’s systemTag.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag_count(attribute_name=None, level=None, name=None, name_space=None, size=None, system_tag=None, headers=None, **request_parameters)[source]¶
Returns tag count.
- Parameters
name (basestring) – name query parameter.
name_space (basestring) – nameSpace query parameter.
attribute_name (basestring) – attributeName query parameter.
level (basestring) – level query parameter.
size (basestring) – size in kilobytes(KB).
system_tag (basestring) – systemTag query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_tag(id, headers=None, **request_parameters)[source]¶
Deletes a tag specified by id.
- Parameters
id (basestring) – Tag ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- remove_tag_member(id, member_id, headers=None, **request_parameters)[source]¶
Removes Tag member from the tag specified by id.
- Parameters
id (basestring) – Tag ID.
member_id (basestring) – TagMember id to be removed from tag.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag_members_by_id(id, member_type, level='0', limit=None, member_association_type=None, offset=None, headers=None, **request_parameters)[source]¶
Returns tag members specified by id.
- Parameters
id (basestring) – Tag ID.
member_type (basestring) – Entity type of the member. Possible values can be retrieved by using /tag/member/type API.
offset (basestring) – Used for pagination. It indicates the starting row number out of available member records.
limit (basestring) – Used to Number of maximum members to return in the result.
member_association_type (basestring) – Indicates how the member is associated with the tag. Possible values and description. 1) DYNAMIC : The member is associated to the tag through rules. 2) STATIC – The member is associated to the tag manually. 3) MIXED – The member is associated manually and also satisfies the rule defined for the tag.
level (basestring) – level query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag_by_id(id, headers=None, **request_parameters)[source]¶
Returns tag specified by Id.
- Parameters
id (basestring) – Tag ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag(additional_info_attributes=None, additional_info_name_space=None, field=None, level=None, limit=None, name=None, offset=None, order=None, size=None, sort_by=None, system_tag=None, headers=None, **request_parameters)[source]¶
Returns the tags for given filter criteria.
- Parameters
name (basestring) – Tag name is mandatory when filter operation is used.
additional_info_name_space (basestring) – additionalInfo.nameSpace query parameter.
additional_info_attributes (basestring) – additionalInfo.attributes query parameter.
level (basestring) – level query parameter.
offset (basestring) – offset query parameter.
limit (basestring) – limit query parameter.
size (basestring) – size in kilobytes(KB).
field (basestring) – Available field names are :’name,id,p arentId,type,additionalInfo.nameSpace,ad ditionalInfo.attributes’.
sort_by (basestring) – Only supported attribute is name. SortyBy is mandatory when order is used.
order (basestring) – Available values are asc and des.
system_tag (basestring) – systemTag query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
task¶
- class Task[source]¶
Cisco DNA Center Task API (version: 1.2.10).
Wraps the DNA Center Task API and exposes the API as native Python methods that return native Python objects.
- get_task_count(data=None, end_time=None, error_code=None, failure_reason=None, is_error=None, parent_id=None, progress=None, service_type=None, start_time=None, username=None, headers=None, **request_parameters)[source]¶
Returns Task count.
- Parameters
start_time (basestring) – This is the epoch start time from which tasks need to be fetched.
end_time (basestring) – This is the epoch end time upto which audit records need to be fetched.
data (basestring) – Fetch tasks that contains this data.
error_code (basestring) – Fetch tasks that have this error code.
service_type (basestring) – Fetch tasks with this service type.
username (basestring) – Fetch tasks with this username.
progress (basestring) – Fetch tasks that contains this progress.
is_error (basestring) – Fetch tasks ended as success or failure. Valid values: true, false.
failure_reason (basestring) – Fetch tasks that contains this failure reason.
parent_id (basestring) – Fetch tasks that have this parent Id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_task_by_id(task_id, headers=None, **request_parameters)[source]¶
Returns a task by specified id.
- Parameters
task_id (basestring) – UUID of the Task.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tasks(data=None, end_time=None, error_code=None, failure_reason=None, is_error=None, limit=None, offset=None, order=None, parent_id=None, progress=None, service_type=None, sort_by=None, start_time=None, username=None, headers=None, **request_parameters)[source]¶
Returns task(s) based on filter criteria.
- Parameters
start_time (basestring) – This is the epoch start time from which tasks need to be fetched.
end_time (basestring) – This is the epoch end time upto which audit records need to be fetched.
data (basestring) – Fetch tasks that contains this data.
error_code (basestring) – Fetch tasks that have this error code.
service_type (basestring) – Fetch tasks with this service type.
username (basestring) – Fetch tasks with this username.
progress (basestring) – Fetch tasks that contains this progress.
is_error (basestring) – Fetch tasks ended as success or failure. Valid values: true, false.
failure_reason (basestring) – Fetch tasks that contains this failure reason.
parent_id (basestring) – Fetch tasks that have this parent Id.
offset (basestring) – offset query parameter.
limit (basestring) – limit query parameter.
sort_by (basestring) – Sort results by this field.
order (basestring) – Sort order asc or dsc.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_task_tree(task_id, headers=None, **request_parameters)[source]¶
Returns a task with its children tasks by based on their id.
- Parameters
task_id (basestring) – UUID of the Task.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_task_by_operationid(limit, offset, operation_id, headers=None, **request_parameters)[source]¶
Returns root tasks associated with an Operationid.
- Parameters
operation_id (basestring) – operationId path parameter.
offset (int) – Index, minimum value is 0.
limit (int) – The maximum value of {limit} supported is 500. Base 1 indexing for {limit}, minimum value is 1.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
template_programmer¶
- class TemplateProgrammer[source]¶
Cisco DNA Center Template Programmer API (version: 1.2.10).
Wraps the DNA Center Template Programmer API and exposes the API as native Python methods that return native Python objects.
- gets_the_templates_available(filter_conflicting_templates=None, product_family=None, product_series=None, product_type=None, project_id=None, software_type=None, software_version=None, headers=None, **request_parameters)[source]¶
List the templates available.
- Parameters
project_id (basestring) – projectId query parameter.
software_type (basestring) – softwareType query parameter.
software_version (basestring) – softwareVersion query parameter.
product_family (basestring) – productFamily query parameter.
product_series (basestring) – productSeries query parameter.
product_type (basestring) – productType query parameter.
filter_conflicting_templates (bool) – filterConflictingTemplates query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_project(createTime=None, description=None, id=None, lastUpdateTime=None, name=None, tags=None, templates=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates a new project.
- Parameters
createTime (number) – ProjectDTO’s createTime.
description (string) – ProjectDTO’s description.
id (string) – ProjectDTO’s id.
lastUpdateTime (number) – ProjectDTO’s lastUpdateTime.
name (string) – ProjectDTO’s name.
tags (list) – ProjectDTO’s tags (list of string, objects).
templates – Part of the JSON serializable Python object to send in the body of the Request.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_template(author=None, composite=None, containingTemplates=None, createTime=None, description=None, deviceTypes=None, failurePolicy=None, id=None, lastUpdateTime=None, name=None, parentTemplateId=None, projectId=None, projectName=None, rollbackTemplateContent=None, rollbackTemplateParams=None, softwareType=None, softwareVariant=None, softwareVersion=None, tags=None, templateContent=None, templateParams=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates an existing template.
- Parameters
author (string) – TemplateDTO’s author.
composite (boolean) – TemplateDTO’s composite.
containingTemplates (list) – TemplateDTO’s containingTemplates (list of objects).
createTime (number) – TemplateDTO’s createTime.
description (string) – TemplateDTO’s description.
deviceTypes (list) – TemplateDTO’s deviceTypes (list of objects).
failurePolicy (string) – TemplateDTO’s failurePolicy. Available values are ‘ABORT_ON_ERROR’, ‘CONTINUE_ON_ERROR’, ‘ROLLBACK_ON_ERROR’, ‘ROLLBACK_TARGET_ON_ERROR’ and ‘ABORT_TARGET_ON_ERROR’.
id (string) – TemplateDTO’s id.
lastUpdateTime (number) – TemplateDTO’s lastUpdateTime.
name (string) – TemplateDTO’s name.
parentTemplateId (string) – TemplateDTO’s parentTemplateId.
projectId (string) – TemplateDTO’s projectId.
projectName (string) – TemplateDTO’s projectName.
rollbackTemplateContent (string) – TemplateDTO’s rollbackTemplateContent.
rollbackTemplateParams (list) – TemplateDTO’s rollbackTemplateParams (list of objects).
softwareType (string) – TemplateDTO’s softwareType.
softwareVariant (string) – TemplateDTO’s softwareVariant.
softwareVersion (string) – TemplateDTO’s softwareVersion.
tags (list) – TemplateDTO’s tags (list of string, objects).
templateContent (string) – TemplateDTO’s templateContent.
templateParams (list) – TemplateDTO’s templateParams (list of objects).
version (string) – TemplateDTO’s version.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_projects(name=None, headers=None, **request_parameters)[source]¶
Returns the projects in the system.
- Parameters
name (basestring) – Name of project to be searched.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- deploy_template(forcePushTemplate=None, isComposite=None, mainTemplateId=None, memberTemplateDeploymentInfo=None, targetInfo=None, templateId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Deploys a template.
- Parameters
forcePushTemplate (boolean) – TemplateDeploymentInfo’s forcePushTemplate.
isComposite (boolean) – TemplateDeploymentInfo’s isComposite.
mainTemplateId (string) – TemplateDeploymentInfo’s mainTemplateId.
memberTemplateDeploymentInfo (list) – TemplateDeploymentInfo’s memberTemplateDeploymentInfo (list of any objects).
targetInfo (list) – TemplateDeploymentInfo’s targetInfo (list of objects).
templateId (string) – TemplateDeploymentInfo’s templateId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_template_details(template_id, latest_version=None, headers=None, **request_parameters)[source]¶
Returns details of the specified template.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_project(createTime=None, description=None, id=None, lastUpdateTime=None, name=None, tags=None, templates=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates an existing project.
- Parameters
createTime (number) – ProjectDTO’s createTime.
description (string) – ProjectDTO’s description.
id (string) – ProjectDTO’s id.
lastUpdateTime (number) – ProjectDTO’s lastUpdateTime.
name (string) – ProjectDTO’s name.
tags (list) – ProjectDTO’s tags (list of string, objects).
templates – Part of the JSON serializable Python object to send in the body of the Request.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_template_deployment_status(deployment_id, headers=None, **request_parameters)[source]¶
Returns the status of a deployed template.
- Parameters
deployment_id (basestring) – deploymentId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_template(template_id, headers=None, **request_parameters)[source]¶
Deletes an existing template.
- Parameters
template_id (basestring) – templateId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- version_template(comments=None, templateId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates Versioning for the current contents of the template.
- Parameters
comments (string) – TemplateVersionRequestDTO’s comments.
templateId (string) – TemplateVersionRequestDTO’s templateId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- preview_template(params=None, templateId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Previews an existing template.
- Parameters
params (object) – TemplatePreviewRequestDTO’s params.
templateId (string) – TemplatePreviewRequestDTO’s templateId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_project(project_id, headers=None, **request_parameters)[source]¶
Deletes an existing Project.
- Parameters
project_id (basestring) – projectId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_template(project_id, author=None, composite=None, containingTemplates=None, createTime=None, description=None, deviceTypes=None, failurePolicy=None, id=None, lastUpdateTime=None, name=None, parentTemplateId=None, projectId=None, projectName=None, rollbackTemplateContent=None, rollbackTemplateParams=None, softwareType=None, softwareVariant=None, softwareVersion=None, tags=None, templateContent=None, templateParams=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates a new template.
- Parameters
author (string) – TemplateDTO’s author.
composite (boolean) – TemplateDTO’s composite.
containingTemplates (list) – TemplateDTO’s containingTemplates (list of objects).
createTime (number) – TemplateDTO’s createTime.
description (string) – TemplateDTO’s description.
deviceTypes (list) – TemplateDTO’s deviceTypes (list of objects).
failurePolicy (string) – TemplateDTO’s failurePolicy. Available values are ‘ABORT_ON_ERROR’, ‘CONTINUE_ON_ERROR’, ‘ROLLBACK_ON_ERROR’, ‘ROLLBACK_TARGET_ON_ERROR’ and ‘ABORT_TARGET_ON_ERROR’.
id (string) – TemplateDTO’s id.
lastUpdateTime (number) – TemplateDTO’s lastUpdateTime.
name (string) – TemplateDTO’s name.
parentTemplateId (string) – TemplateDTO’s parentTemplateId.
projectId (string) – TemplateDTO’s projectId.
projectName (string) – TemplateDTO’s projectName.
rollbackTemplateContent (string) – TemplateDTO’s rollbackTemplateContent.
rollbackTemplateParams (list) – TemplateDTO’s rollbackTemplateParams (list of objects).
softwareType (string) – TemplateDTO’s softwareType.
softwareVariant (string) – TemplateDTO’s softwareVariant.
softwareVersion (string) – TemplateDTO’s softwareVersion.
tags (list) – TemplateDTO’s tags (list of string, objects).
templateContent (string) – TemplateDTO’s templateContent.
templateParams (list) – TemplateDTO’s templateParams (list of objects).
version (string) – TemplateDTO’s version.
project_id (basestring) – projectId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_template_versions(template_id, headers=None, **request_parameters)[source]¶
Returns the versions of a specified template.
- Parameters
template_id (basestring) – templateId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
DNACenterAPI v1.3.0¶
clients¶
- class Clients[source]¶
Cisco DNA Center Clients API (version: 1.3.0).
Wraps the DNA Center Clients API and exposes the API as native Python methods that return native Python objects.
- get_overall_client_health(timestamp=None, headers=None, **request_parameters)[source]¶
Returns Overall Client Health information by Client type (Wired and Wireless) for any given point of time.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_client_detail(mac_address, timestamp=None, headers=None, **request_parameters)[source]¶
Returns detailed Client information retrieved by Mac Address for any given point of time. .
- Parameters
timestamp (basestring, int) – Epoch time(in milliseconds) when the Client health data is required.
mac_address (basestring) – MAC Address of the client.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
command_runner¶
- class CommandRunner[source]¶
Cisco DNA Center Command Runner API (version: 1.3.0).
Wraps the DNA Center Command Runner API and exposes the API as native Python methods that return native Python objects.
- get_all_keywords_of_clis_accepted(headers=None, **request_parameters)[source]¶
Get valid keywords.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- run_read_only_commands_on_devices(commands=None, description=None, deviceUuids=None, name=None, timeout=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Submit request for read-only CLIs.
- Parameters
commands (list) – CommandRunnerDTO’s commands (list of strings).
description (string) – CommandRunnerDTO’s description.
deviceUuids (list) – CommandRunnerDTO’s deviceUuids (list of strings).
name (string) – CommandRunnerDTO’s name.
timeout (number) – CommandRunnerDTO’s timeout.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
devices¶
- class Devices[source]¶
Cisco DNA Center Devices API (version: 1.3.0).
Wraps the DNA Center Devices API and exposes the API as native Python methods that return native Python objects.
- get_module_info_by_id(id, headers=None, **request_parameters)[source]¶
Returns Module info by id.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_device_by_id(id, is_force_delete=None, headers=None, **request_parameters)[source]¶
Deletes the network device for the given Id.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- sync_devices_using_forcesync(force_sync=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Synchronizes the devices. If forceSync param is false (default) then the sync would run in normal priority thread. If forceSync param is true then the sync would run in high priority thread if available, else the sync will fail. Result can be seen in the child task of each device.
- Parameters
force_sync (bool) – forceSync query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_list(associated_wlc_ip=None, collection_interval=None, collection_status=None, error_code=None, error_description=None, family=None, hostname=None, id=None, license_name=None, license_status=None, license_type=None, location=None, location_name=None, mac_address=None, management_ip_address=None, module_equpimenttype=None, module_name=None, module_operationstatecode=None, module_partnumber=None, module_servicestate=None, module_vendorequipmenttype=None, not_synced_for_minutes=None, platform_id=None, reachability_status=None, role=None, serial_number=None, series=None, software_type=None, software_version=None, type=None, up_time=None, headers=None, **request_parameters)[source]¶
Returns list of network devices based on filter criteria such as management IP address, mac address, hostname, location name and a wide variety of additional criteria. You can also use the asterisk in any value to conduct a wildcard search. For example, to find all hostnames beginning with myhost in the IP address range 192.25.18.n, issue the following request: GET fqdnoripofdnacenterplatform/dna/intent/api/v1/network- device? hostname=myhost* & managementIpAddress=192.25.18.* For a complete list of parameter names that you can use for filtering this request, see the DNA Center API Reference documentation. Note: If id parameter is provided, it will return the list of network-devices for the given ids and ignores the other request parameters. .
- Parameters
hostname (basestring, list, set, tuple) – hostname query parameter.
management_ip_address (basestring, list, set, tuple) – managementIpAddress query parameter.
mac_address (basestring, list, set, tuple) – macAddress query parameter.
location_name (basestring, list, set, tuple) – locationName query parameter.
serial_number (basestring, list, set, tuple) – serialNumber query parameter.
location (basestring, list, set, tuple) – location query parameter.
family (basestring, list, set, tuple) – family query parameter.
series (basestring, list, set, tuple) – series query parameter.
collection_status (basestring, list, set, tuple) – collectionStatus query parameter.
collection_interval (basestring, list, set, tuple) – collectionInterval query parameter.
not_synced_for_minutes (basestring, list, set, tuple) – notSyncedForMinutes query parameter.
error_code (basestring, list, set, tuple) – errorCode query parameter.
error_description (basestring, list, set, tuple) – errorDescription query parameter.
software_version (basestring, list, set, tuple) – softwareVersion query parameter.
software_type (basestring, list, set, tuple) – softwareType query parameter.
platform_id (basestring, list, set, tuple) – platformId query parameter.
reachability_status (basestring, list, set, tuple) – reachabilityStatus query parameter.
up_time (basestring, list, set, tuple) – upTime query parameter.
associated_wlc_ip (basestring, list, set, tuple) – associatedWlcIp query parameter.
license_name (basestring, list, set, tuple) – license.name query parameter.
license_type (basestring, list, set, tuple) – license.type query parameter.
license_status (basestring, list, set, tuple) – license.status query parameter.
module_name (basestring, list, set, tuple) – module+name query parameter.
module_equpimenttype (basestring, list, set, tuple) – module+equpimenttype query parameter.
module_servicestate (basestring, list, set, tuple) – module+servicestate query parameter.
module_vendorequipmenttype(basestring – tuple): module+vendorequipmenttype query parameter.
list – tuple): module+vendorequipmenttype query parameter.
set – tuple): module+vendorequipmenttype query parameter.
- :paramtuple): module+vendorequipmenttype query
parameter.
- Parameters
module_partnumber (basestring, list, set, tuple) – module+partnumber query parameter.
module_operationstatecode (basestring, list, set, tuple) – module+operationstatecode query parameter.
id (basestring) – Accepts comma separated id’s and return list of network-devices for the given id’s. If invalid or not-found id’s are provided, null entry will be returned in the list.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_interface_vlans(id, interface_type=None, headers=None, **request_parameters)[source]¶
Returns Device Interface VLANs.
- Parameters
id (basestring) – id path parameter.
interface_type (basestring) – Vlan assocaited with sub- interface.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_polling_interval_for_all_devices(headers=None, **request_parameters)[source]¶
Returns polling interval of all devices.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_interfaces_by_specified_range(device_id, records_to_return, start_index, headers=None, **request_parameters)[source]¶
Returns the list of interfaces for the device for the specified range.
- Parameters
device_id (basestring) – Device ID.
start_index (int) – Start index.
records_to_return (int) – Number of records to return.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_interface_count(headers=None, **request_parameters)[source]¶
Returns the count of interfaces for all devices.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_device(cliTransport=None, computeDevice=None, enablePassword=None, extendedDiscoveryInfo=None, httpPassword=None, httpPort=None, httpSecure=None, httpUserName=None, ipAddress=None, merakiOrgId=None, netconfPort=None, password=None, serialNumber=None, snmpAuthPassphrase=None, snmpAuthProtocol=None, snmpMode=None, snmpPrivPassphrase=None, snmpPrivProtocol=None, snmpROCommunity=None, snmpRWCommunity=None, snmpRetry=None, snmpTimeout=None, snmpUserName=None, snmpVersion=None, type=None, updateMgmtIPaddressList=None, userName=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds the device with given credential.
- Parameters
cliTransport (string) – InventoryDeviceInfo’s cliTransport.
computeDevice (boolean) – InventoryDeviceInfo’s computeDevice.
enablePassword (string) – InventoryDeviceInfo’s enablePassword.
extendedDiscoveryInfo (string) – InventoryDeviceInfo’s extendedDiscoveryInfo.
httpPassword (string) – InventoryDeviceInfo’s httpPassword.
httpPort (string) – InventoryDeviceInfo’s httpPort.
httpSecure (boolean) – InventoryDeviceInfo’s httpSecure.
httpUserName (string) – InventoryDeviceInfo’s httpUserName.
ipAddress (list) – InventoryDeviceInfo’s ipAddress (list of strings).
merakiOrgId (list) – InventoryDeviceInfo’s merakiOrgId (list of strings).
netconfPort (string) – InventoryDeviceInfo’s netconfPort.
password (string) – InventoryDeviceInfo’s password.
serialNumber (string) – InventoryDeviceInfo’s serialNumber.
snmpAuthPassphrase (string) – InventoryDeviceInfo’s snmpAuthPassphrase.
snmpAuthProtocol (string) – InventoryDeviceInfo’s snmpAuthProtocol.
snmpMode (string) – InventoryDeviceInfo’s snmpMode.
snmpPrivPassphrase (string) – InventoryDeviceInfo’s snmpPrivPassphrase.
snmpPrivProtocol (string) – InventoryDeviceInfo’s snmpPrivProtocol.
snmpROCommunity (string) – InventoryDeviceInfo’s snmpROCommunity.
snmpRWCommunity (string) – InventoryDeviceInfo’s snmpRWCommunity.
snmpRetry (number) – InventoryDeviceInfo’s snmpRetry.
snmpTimeout (number) – InventoryDeviceInfo’s snmpTimeout.
snmpUserName (string) – InventoryDeviceInfo’s snmpUserName.
snmpVersion (string) – InventoryDeviceInfo’s snmpVersion.
type (string) – InventoryDeviceInfo’s type. Available values are ‘COMPUTE_DEVICE’, ‘MERAKI_DASHBOARD’, ‘NETWORK_DEVICE’ and ‘NODATACHANGE’.
updateMgmtIPaddressList (list) – InventoryDeviceInfo’s updateMgmtIPaddressList (list of objects).
userName (string) – InventoryDeviceInfo’s userName.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_interface_details(device_id, name, headers=None, **request_parameters)[source]¶
Returns interface by specified device Id and interface name.
- Parameters
device_id (basestring) – Device ID.
name (basestring) – Interface name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_interface_count_by_id(device_id, headers=None, **request_parameters)[source]¶
Returns the interface count for the given device.
- Parameters
device_id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_count(headers=None, **request_parameters)[source]¶
Returns the count of network devices based on the filter criteria by management IP address, mac address, hostname and location name.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_ospf_interfaces(headers=None, **request_parameters)[source]¶
Returns the interfaces that has OSPF enabled.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_polling_interval_by_id(id, headers=None, **request_parameters)[source]¶
Returns polling interval by device id.
- Parameters
id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_organization_list_for_meraki(id, headers=None, **request_parameters)[source]¶
Returns list of organizations for meraki dashboard.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_functional_capability_by_id(id, headers=None, **request_parameters)[source]¶
Returns functional capability with given Id.
- Parameters
id (basestring) – Functional Capability UUID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_isis_interfaces(headers=None, **request_parameters)[source]¶
Returns the interfaces that has ISIS enabled.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_config_by_id(network_device_id, headers=None, **request_parameters)[source]¶
Returns the device config by specified device ID.
- Parameters
network_device_id (basestring) – networkDeviceId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_summary(id, headers=None, **request_parameters)[source]¶
Returns brief summary of device info such as hostname, management IP address for the given device Id.
- Parameters
id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_by_id(id, headers=None, **request_parameters)[source]¶
Returns the network device details for the given device ID.
- Parameters
id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_interface_info_by_id(device_id, headers=None, **request_parameters)[source]¶
Returns list of interfaces by specified device.
- Parameters
device_id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- register_device_for_wsa(macaddress=None, serial_number=None, headers=None, **request_parameters)[source]¶
Registers a device for WSA notification.
- Parameters
serial_number (basestring) – Serial number of the device.
macaddress (basestring) – Mac addres of the device.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_device_role(id=None, role=None, roleSource=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates the role of the device as access, core, distribution, border router.
- Parameters
id (string) – NetworkDeviceBriefNIO’s id.
role (string) – NetworkDeviceBriefNIO’s role.
roleSource (string) – NetworkDeviceBriefNIO’s roleSource.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_config_for_all_devices(headers=None, **request_parameters)[source]¶
Returns the config for all devices.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- export_device_list(deviceUuids=None, id=None, operationEnum=None, parameters=None, password=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Exports the selected network device to a file.
- Parameters
deviceUuids (list) – ExportDeviceDTO’s deviceUuids (list of strings).
id (string) – ExportDeviceDTO’s id.
operationEnum (string) – ExportDeviceDTO’s operationEnum. Available values are ‘CREDENTIALDETAILS’ and ‘DEVICEDETAILS’.
parameters (list) – ExportDeviceDTO’s parameters (list of strings).
password (string) – ExportDeviceDTO’s password.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_interface_by_ip(ip_address, headers=None, **request_parameters)[source]¶
Returns list of interfaces by specified IP address.
- Parameters
ip_address (basestring) – IP address of the interface.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_network_device_by_ip(ip_address, headers=None, **request_parameters)[source]¶
Returns the network device by specified IP address.
- Parameters
ip_address (basestring) – Device IP address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_config_count(headers=None, **request_parameters)[source]¶
Returns the count of device configs.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_by_serial_number(serial_number, headers=None, **request_parameters)[source]¶
Returns the network device with given serial number.
- Parameters
serial_number (basestring) – Device serial number.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_all_interfaces(headers=None, **request_parameters)[source]¶
Returns all available interfaces. This endpoint can return a maximum of 500 interfaces.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_module_count(device_id, name_list=None, operational_state_code_list=None, part_number_list=None, vendor_equipment_type_list=None, headers=None, **request_parameters)[source]¶
Returns Module Count.
- Parameters
device_id (basestring) – deviceId query parameter.
name_list (basestring, list, set, tuple) – nameList query parameter.
vendor_equipment_type_list(basestring – tuple): vendorEquipmentTypeList query parameter.
list – tuple): vendorEquipmentTypeList query parameter.
set – tuple): vendorEquipmentTypeList query parameter.
- :paramtuple): vendorEquipmentTypeList query
parameter.
- Parameters
- :paramtuple): operationalStateCodeList query
parameter.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_modules(device_id, limit=None, name_list=None, offset=None, operational_state_code_list=None, part_number_list=None, vendor_equipment_type_list=None, headers=None, **request_parameters)[source]¶
Returns modules by specified device id.
- Parameters
device_id (basestring) – deviceId query parameter.
limit (basestring) – limit query parameter.
offset (basestring) – offset query parameter.
name_list (basestring, list, set, tuple) – nameList query parameter.
vendor_equipment_type_list(basestring – tuple): vendorEquipmentTypeList query parameter.
list – tuple): vendorEquipmentTypeList query parameter.
set – tuple): vendorEquipmentTypeList query parameter.
- :paramtuple): vendorEquipmentTypeList query
parameter.
- Parameters
- :paramtuple): operationalStateCodeList query
parameter.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_wireless_lan_controller_details_by_id(id, headers=None, **request_parameters)[source]¶
Returns the wireless lan controller info with given device ID.
- Parameters
id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- sync_devices(cliTransport=None, computeDevice=None, enablePassword=None, extendedDiscoveryInfo=None, httpPassword=None, httpPort=None, httpSecure=None, httpUserName=None, ipAddress=None, merakiOrgId=None, netconfPort=None, password=None, serialNumber=None, snmpAuthPassphrase=None, snmpAuthProtocol=None, snmpMode=None, snmpPrivPassphrase=None, snmpPrivProtocol=None, snmpROCommunity=None, snmpRWCommunity=None, snmpRetry=None, snmpTimeout=None, snmpUserName=None, snmpVersion=None, type=None, updateMgmtIPaddressList=None, userName=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Sync the devices provided as input.
- Parameters
cliTransport (string) – InventoryDeviceInfo’s cliTransport.
computeDevice (boolean) – InventoryDeviceInfo’s computeDevice.
enablePassword (string) – InventoryDeviceInfo’s enablePassword.
extendedDiscoveryInfo (string) – InventoryDeviceInfo’s extendedDiscoveryInfo.
httpPassword (string) – InventoryDeviceInfo’s httpPassword.
httpPort (string) – InventoryDeviceInfo’s httpPort.
httpSecure (boolean) – InventoryDeviceInfo’s httpSecure.
httpUserName (string) – InventoryDeviceInfo’s httpUserName.
ipAddress (list) – InventoryDeviceInfo’s ipAddress (list of strings).
merakiOrgId (list) – InventoryDeviceInfo’s merakiOrgId (list of strings).
netconfPort (string) – InventoryDeviceInfo’s netconfPort.
password (string) – InventoryDeviceInfo’s password.
serialNumber (string) – InventoryDeviceInfo’s serialNumber.
snmpAuthPassphrase (string) – InventoryDeviceInfo’s snmpAuthPassphrase.
snmpAuthProtocol (string) – InventoryDeviceInfo’s snmpAuthProtocol.
snmpMode (string) – InventoryDeviceInfo’s snmpMode.
snmpPrivPassphrase (string) – InventoryDeviceInfo’s snmpPrivPassphrase.
snmpPrivProtocol (string) – InventoryDeviceInfo’s snmpPrivProtocol.
snmpROCommunity (string) – InventoryDeviceInfo’s snmpROCommunity.
snmpRWCommunity (string) – InventoryDeviceInfo’s snmpRWCommunity.
snmpRetry (number) – InventoryDeviceInfo’s snmpRetry.
snmpTimeout (number) – InventoryDeviceInfo’s snmpTimeout.
snmpUserName (string) – InventoryDeviceInfo’s snmpUserName.
snmpVersion (string) – InventoryDeviceInfo’s snmpVersion.
type (string) – InventoryDeviceInfo’s type. Available values are ‘COMPUTE_DEVICE’, ‘MERAKI_DASHBOARD’, ‘NETWORK_DEVICE’ and ‘NODATACHANGE’.
updateMgmtIPaddressList (list) – InventoryDeviceInfo’s updateMgmtIPaddressList (list of objects).
userName (string) – InventoryDeviceInfo’s userName.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_interface_by_id(id, headers=None, **request_parameters)[source]¶
Returns the interface for the given interface ID.
- Parameters
id (basestring) – Interface ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_functional_capability_for_devices(device_id=None, function_name=None, headers=None, **request_parameters)[source]¶
Returns the functional-capability for given devices.
- Parameters
device_id (basestring) – Accepts comma separated deviceid’s and return list of functional-capabilities for the given id’s. If invalid or not-found id’s are provided, null entry will be returned in the list.
function_name (basestring, list, set, tuple) – functionName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_detail(identifier, search_by, timestamp=None, headers=None, **request_parameters)[source]¶
Returns detailed Network Device information retrieved by Mac Address, Device Name or UUID for any given point of time. .
- Parameters
timestamp (basestring, int) – Epoch time(in milliseconds) when the device data is required.
search_by (basestring) – MAC Address or Device Name value or UUID of the network device.
identifier (basestring) – One of keywords : macAddress or uuid or nwDeviceName.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_network_device_by_pagination_range(records_to_return, start_index, headers=None, **request_parameters)[source]¶
Returns the list of network devices for the given pagination range.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- retrieves_all_network_devices(associated_wlc_ip=None, collection_interval=None, collection_status=None, error_code=None, family=None, hostname=None, limit=None, mac_address=None, management_ip_address=None, offset=None, platform_id=None, reachability_failure_reason=None, reachability_status=None, role=None, role_source=None, serial_number=None, series=None, software_type=None, software_version=None, type=None, up_time=None, vrf_name=None, headers=None, **request_parameters)[source]¶
Gets the list of first 500 network devices sorted lexicographically based on host name. It can be filtered using management IP address, mac address, hostname and location name. If id param is provided, it will be returning the list of network-devices for the given id’s and other request params will be ignored. In case of autocomplete request, returns the list of specified attributes.
- Parameters
vrf_name (basestring) – vrfName query parameter.
management_ip_address (basestring) – managementIpAddress query parameter.
hostname (basestring) – hostname query parameter.
mac_address (basestring) – macAddress query parameter.
family (basestring) – family query parameter.
collection_status (basestring) – collectionStatus query parameter.
collection_interval (basestring) – collectionInterval query parameter.
software_version (basestring) – softwareVersion query parameter.
software_type (basestring) – softwareType query parameter.
reachability_status (basestring) – reachabilityStatus query parameter.
reachability_failure_reason (basestring) – reachabilityFailureReason query parameter.
error_code (basestring) – errorCode query parameter.
platform_id (basestring) – platformId query parameter.
series (basestring) – series query parameter.
type (basestring) – type query parameter.
serial_number (basestring) – serialNumber query parameter.
up_time (basestring) – upTime query parameter.
role (basestring) – role query parameter.
role_source (basestring) – roleSource query parameter.
associated_wlc_ip (basestring) – associatedWlcIp query parameter.
offset (basestring) – offset query parameter.
limit (basestring) – limit query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
fabric_wired¶
- class FabricWired[source]¶
Cisco DNA Center Fabric Wired API (version: 1.3.0).
Wraps the DNA Center Fabric Wired API and exposes the API as native Python methods that return native Python objects.
- deletes_border_device_from_sda_fabric(device_ip_address, headers=None, **request_parameters)[source]¶
Deletes border device from sda Fabric.
- Parameters
device_ip_address (basestring) – device-ip-address path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- adds_border_device_in_sda_fabric(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds border device in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- gets_border_device_details_from_sda_fabric(device_ip_address, headers=None, **request_parameters)[source]¶
Gets border device detail from SDA Fabric.
- Parameters
device_ip_address (basestring) – device-ip-address path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
file¶
- class File[source]¶
Cisco DNA Center File API (version: 1.3.0).
Wraps the DNA Center File API and exposes the API as native Python methods that return native Python objects.
- get_list_of_available_namespaces(headers=None, **request_parameters)[source]¶
Returns list of available namespaces.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_list_of_files(name_space, headers=None, **request_parameters)[source]¶
Returns list of files under a specific namespace.
- Parameters
name_space (basestring) – A listing of fileId’s.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- download_a_file_by_fileid(file_id, dirpath=None, save_file=None, headers=None, **request_parameters)[source]¶
Downloads a file specified by fileId.
- Parameters
file_id (basestring) – File Identification number.
dirpath (basestring) – Directory absolute path. Defaults to os.getcwd().
save_file (bool) – Enable or disable automatic file creation of raw response.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
HTTP Response container. For more information check the urlib3 documentation
- Return type
urllib3.response.HTTPResponse
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
DownloadFailure – If was not able to download the raw
response to a file. –
network_discovery¶
- class NetworkDiscovery[source]¶
Cisco DNA Center Network Discovery API (version: 1.3.0).
Wraps the DNA Center Network Discovery API and exposes the API as native Python methods that return native Python objects.
- get_count_of_all_discovery_jobs(headers=None, **request_parameters)[source]¶
Returns the count of all available discovery jobs.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_netconf_credentials(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global netconf credentials.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_snmp_write_community(comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, writeCommunity=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global SNMP write community.
- Parameters
comments (string) – SNMPv2WriteCommunityDTO’s comments.
credentialType (string) – SNMPv2WriteCommunityDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – SNMPv2WriteCommunityDTO’s description.
id (string) – SNMPv2WriteCommunityDTO’s id.
instanceTenantId (string) – SNMPv2WriteCommunityDTO’s instanceTenantId.
instanceUuid (string) – SNMPv2WriteCommunityDTO’s instanceUuid.
writeCommunity (string) – SNMPv2WriteCommunityDTO’s writeCommunity.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_snmpv3_credentials(authPassword=None, authType=None, comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, privacyPassword=None, privacyType=None, snmpMode=None, username=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global SNMPv3 credential.
- Parameters
authPassword (string) – SNMPv3CredentialDTO’s authPassword.
authType (string) – SNMPv3CredentialDTO’s authType. Available values are ‘SHA’ and ‘MD5’.
comments (string) – SNMPv3CredentialDTO’s comments.
credentialType (string) – SNMPv3CredentialDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – SNMPv3CredentialDTO’s description.
id (string) – SNMPv3CredentialDTO’s id.
instanceTenantId (string) – SNMPv3CredentialDTO’s instanceTenantId.
instanceUuid (string) – SNMPv3CredentialDTO’s instanceUuid.
privacyPassword (string) – SNMPv3CredentialDTO’s privacyPassword.
privacyType (string) – SNMPv3CredentialDTO’s privacyType. Available values are ‘DES’ and ‘AES128’.
snmpMode (string) – SNMPv3CredentialDTO’s snmpMode. Available values are ‘AUTHPRIV’, ‘AUTHNOPRIV’ and ‘NOAUTHNOPRIV’.
username (string) – SNMPv3CredentialDTO’s username.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_snmp_read_community(comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, readCommunity=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global SNMP read community.
- Parameters
comments (string) – SNMPv2ReadCommunityDTO’s comments.
credentialType (string) – SNMPv2ReadCommunityDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – SNMPv2ReadCommunityDTO’s description.
id (string) – SNMPv2ReadCommunityDTO’s id.
instanceTenantId (string) – SNMPv2ReadCommunityDTO’s instanceTenantId.
instanceUuid (string) – SNMPv2ReadCommunityDTO’s instanceUuid.
readCommunity (string) – SNMPv2ReadCommunityDTO’s readCommunity.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discoveries_by_range(records_to_return, start_index, headers=None, **request_parameters)[source]¶
Returns the discovery by specified range.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_network_devices_from_discovery(id, cli_status=None, http_status=None, ip_address=None, netconf_status=None, ping_status=None, snmp_status=None, sort_by=None, sort_order=None, task_id=None, headers=None, **request_parameters)[source]¶
Returns the network devices from a discovery job based on given filters. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
task_id (basestring) – taskId query parameter.
sort_by (basestring) – sortBy query parameter.
sort_order (basestring) – sortOrder query parameter.
ip_address (basestring, list, set, tuple) – ipAddress query parameter.
ping_status (basestring, list, set, tuple) – pingStatus query parameter.
snmp_status (basestring, list, set, tuple) – snmpStatus query parameter.
cli_status (basestring, list, set, tuple) – cliStatus query parameter.
netconf_status (basestring, list, set, tuple) – netconfStatus query parameter.
http_status (basestring, list, set, tuple) – httpStatus query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_http_write_credentials(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global HTTP write credentials.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_snmp_properties(headers=None, **request_parameters)[source]¶
Returns SNMP properties.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_discovery_by_id(id, headers=None, **request_parameters)[source]¶
Stops the discovery for the given Discovery ID and removes it. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- start_discovery(cdpLevel=None, discoveryType=None, enablePasswordList=None, globalCredentialIdList=None, httpReadCredential=None, httpWriteCredential=None, ipAddressList=None, ipFilterList=None, lldpLevel=None, name=None, netconfPort=None, noAddNewDevice=None, parentDiscoveryId=None, passwordList=None, preferredMgmtIPMethod=None, protocolOrder=None, reDiscovery=None, retry=None, snmpAuthPassphrase=None, snmpAuthProtocol=None, snmpMode=None, snmpPrivPassphrase=None, snmpPrivProtocol=None, snmpROCommunity=None, snmpROCommunityDesc=None, snmpRWCommunity=None, snmpRWCommunityDesc=None, snmpUserName=None, snmpVersion=None, timeout=None, updateMgmtIp=None, userNameList=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Initiates discovery with the given parameters.
- Parameters
cdpLevel (number) – InventoryRequest’s cdpLevel.
discoveryType (string) – InventoryRequest’s discoveryType.
enablePasswordList (list) – InventoryRequest’s enablePasswordList (list of string, objects).
globalCredentialIdList (list) – InventoryRequest’s globalCredentialIdList (list of string, objects).
httpReadCredential (object) – InventoryRequest’s httpReadCredential.
httpWriteCredential (object) – InventoryRequest’s httpWriteCredential.
ipAddressList (string) – InventoryRequest’s ipAddressList.
ipFilterList (list) – InventoryRequest’s ipFilterList (list of string, objects).
lldpLevel (number) – InventoryRequest’s lldpLevel.
name (string) – InventoryRequest’s name.
netconfPort (string) – InventoryRequest’s netconfPort.
noAddNewDevice (boolean) – InventoryRequest’s noAddNewDevice.
parentDiscoveryId (string) – InventoryRequest’s parentDiscoveryId.
passwordList (list) – InventoryRequest’s passwordList (list of string, objects).
preferredMgmtIPMethod (string) – InventoryRequest’s preferredMgmtIPMethod.
protocolOrder (string) – InventoryRequest’s protocolOrder.
reDiscovery (boolean) – InventoryRequest’s reDiscovery.
retry (number) – InventoryRequest’s retry.
snmpAuthPassphrase (string) – InventoryRequest’s snmpAuthPassphrase.
snmpAuthProtocol (string) – InventoryRequest’s snmpAuthProtocol.
snmpMode (string) – InventoryRequest’s snmpMode.
snmpPrivPassphrase (string) – InventoryRequest’s snmpPrivPassphrase.
snmpPrivProtocol (string) – InventoryRequest’s snmpPrivProtocol.
snmpROCommunity (string) – InventoryRequest’s snmpROCommunity.
snmpROCommunityDesc (string) – InventoryRequest’s snmpROCommunityDesc.
snmpRWCommunity (string) – InventoryRequest’s snmpRWCommunity.
snmpRWCommunityDesc (string) – InventoryRequest’s snmpRWCommunityDesc.
snmpUserName (string) – InventoryRequest’s snmpUserName.
snmpVersion (string) – InventoryRequest’s snmpVersion.
timeout (number) – InventoryRequest’s timeout.
updateMgmtIp (boolean) – InventoryRequest’s updateMgmtIp.
userNameList (list) – InventoryRequest’s userNameList (list of string, objects).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discovery_by_id(id, headers=None, **request_parameters)[source]¶
Returns discovery by Discovery ID. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_snmp_write_community(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global SNMP write community.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_cli_credentials(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global CLI credential.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_http_read_credential(comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, password=None, port=None, secure=None, username=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global HTTP Read credential.
- Parameters
comments (string) – HTTPReadCredentialDTO’s comments.
credentialType (string) – HTTPReadCredentialDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – HTTPReadCredentialDTO’s description.
id (string) – HTTPReadCredentialDTO’s id.
instanceTenantId (string) – HTTPReadCredentialDTO’s instanceTenantId.
instanceUuid (string) – HTTPReadCredentialDTO’s instanceUuid.
password (string) – HTTPReadCredentialDTO’s password.
port (number) – HTTPReadCredentialDTO’s port.
secure (boolean) – HTTPReadCredentialDTO’s secure.
username (string) – HTTPReadCredentialDTO’s username.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_list_of_discoveries_by_discovery_id(id, ip_address=None, limit=None, offset=None, headers=None, **request_parameters)[source]¶
Returns the list of discovery jobs for the given Discovery ID. The results can be optionally filtered based on IP. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
offset (int) – offset query parameter.
limit (int) – limit query parameter.
ip_address (basestring) – ipAddress query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_snmpv3_credentials(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global SNMPv3 credentials.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_update_snmp_properties(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds SNMP properties.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- updates_discovery_by_id(attributeInfo=None, cdpLevel=None, deviceIds=None, discoveryCondition=None, discoveryStatus=None, discoveryType=None, enablePasswordList=None, globalCredentialIdList=None, httpReadCredential=None, httpWriteCredential=None, id=None, ipAddressList=None, ipFilterList=None, isAutoCdp=None, lldpLevel=None, name=None, netconfPort=None, numDevices=None, parentDiscoveryId=None, passwordList=None, preferredMgmtIPMethod=None, protocolOrder=None, retryCount=None, snmpAuthPassphrase=None, snmpAuthProtocol=None, snmpMode=None, snmpPrivPassphrase=None, snmpPrivProtocol=None, snmpRoCommunity=None, snmpRoCommunityDesc=None, snmpRwCommunity=None, snmpRwCommunityDesc=None, snmpUserName=None, timeOut=None, updateMgmtIp=None, userNameList=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Stops or starts an existing discovery.
- Parameters
attributeInfo (object) – DiscoveryNIO’s attributeInfo.
cdpLevel (number) – DiscoveryNIO’s cdpLevel.
deviceIds (string) – DiscoveryNIO’s deviceIds.
discoveryCondition (string) – DiscoveryNIO’s discoveryCondition.
discoveryStatus (string) – DiscoveryNIO’s discoveryStatus.
discoveryType (string) – DiscoveryNIO’s discoveryType.
enablePasswordList (string) – DiscoveryNIO’s enablePasswordList.
globalCredentialIdList (list) – DiscoveryNIO’s globalCredentialIdList (list of string, objects).
httpReadCredential (object) – DiscoveryNIO’s httpReadCredential.
httpWriteCredential (object) – DiscoveryNIO’s httpWriteCredential.
id (string) – DiscoveryNIO’s id.
ipAddressList (string) – DiscoveryNIO’s ipAddressList.
ipFilterList (string) – DiscoveryNIO’s ipFilterList.
isAutoCdp (boolean) – DiscoveryNIO’s isAutoCdp.
lldpLevel (number) – DiscoveryNIO’s lldpLevel.
name (string) – DiscoveryNIO’s name.
netconfPort (string) – DiscoveryNIO’s netconfPort.
numDevices (number) – DiscoveryNIO’s numDevices.
parentDiscoveryId (string) – DiscoveryNIO’s parentDiscoveryId.
passwordList (string) – DiscoveryNIO’s passwordList.
preferredMgmtIPMethod (string) – DiscoveryNIO’s preferredMgmtIPMethod.
protocolOrder (string) – DiscoveryNIO’s protocolOrder.
retryCount (number) – DiscoveryNIO’s retryCount.
snmpAuthPassphrase (string) – DiscoveryNIO’s snmpAuthPassphrase.
snmpAuthProtocol (string) – DiscoveryNIO’s snmpAuthProtocol.
snmpMode (string) – DiscoveryNIO’s snmpMode.
snmpPrivPassphrase (string) – DiscoveryNIO’s snmpPrivPassphrase.
snmpPrivProtocol (string) – DiscoveryNIO’s snmpPrivProtocol.
snmpRoCommunity (string) – DiscoveryNIO’s snmpRoCommunity.
snmpRoCommunityDesc (string) – DiscoveryNIO’s snmpRoCommunityDesc.
snmpRwCommunity (string) – DiscoveryNIO’s snmpRwCommunity.
snmpRwCommunityDesc (string) – DiscoveryNIO’s snmpRwCommunityDesc.
snmpUserName (string) – DiscoveryNIO’s snmpUserName.
timeOut (number) – DiscoveryNIO’s timeOut.
updateMgmtIp (boolean) – DiscoveryNIO’s updateMgmtIp.
userNameList (string) – DiscoveryNIO’s userNameList.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_http_write_credentials(comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, password=None, port=None, secure=None, username=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global HTTP write credentials.
- Parameters
comments (string) – HTTPWriteCredentialDTO’s comments.
credentialType (string) – HTTPWriteCredentialDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – HTTPWriteCredentialDTO’s description.
id (string) – HTTPWriteCredentialDTO’s id.
instanceTenantId (string) – HTTPWriteCredentialDTO’s instanceTenantId.
instanceUuid (string) – HTTPWriteCredentialDTO’s instanceUuid.
password (string) – HTTPWriteCredentialDTO’s password.
port (number) – HTTPWriteCredentialDTO’s port.
secure (boolean) – HTTPWriteCredentialDTO’s secure.
username (string) – HTTPWriteCredentialDTO’s username.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_discovery_by_specified_range(records_to_delete, start_index, headers=None, **request_parameters)[source]¶
Stops discovery for the given range and removes them.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_all_discovery(headers=None, **request_parameters)[source]¶
Stops all the discoveries and removes them.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_devices_discovered_by_id(id, task_id=None, headers=None, **request_parameters)[source]¶
Returns the count of network devices discovered in the given discovery. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
task_id (basestring) – taskId query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_global_credentials_by_id(global_credential_id, headers=None, **request_parameters)[source]¶
Deletes global credential for the given ID.
- Parameters
global_credential_id (basestring) – ID of global- credential.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_cli_credentials(comments=None, credentialType=None, description=None, enablePassword=None, id=None, instanceTenantId=None, instanceUuid=None, password=None, username=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global CLI credentials.
- Parameters
comments (string) – CLICredentialDTO’s comments.
credentialType (string) – CLICredentialDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – CLICredentialDTO’s description.
enablePassword (string) – CLICredentialDTO’s enablePassword.
id (string) – CLICredentialDTO’s id.
instanceTenantId (string) – CLICredentialDTO’s instanceTenantId.
instanceUuid (string) – CLICredentialDTO’s instanceUuid.
password (string) – CLICredentialDTO’s password.
username (string) – CLICredentialDTO’s username.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_http_read_credentials(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds HTTP read credentials.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_netconf_credentials(comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, netconfPort=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global netconf credentials.
- Parameters
comments (string) – NetconfCredentialDTO’s comments.
credentialType (string) – NetconfCredentialDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – NetconfCredentialDTO’s description.
id (string) – NetconfCredentialDTO’s id.
instanceTenantId (string) – NetconfCredentialDTO’s instanceTenantId.
instanceUuid (string) – NetconfCredentialDTO’s instanceUuid.
netconfPort (string) – NetconfCredentialDTO’s netconfPort.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_credential_sub_type_by_credential_id(id, headers=None, **request_parameters)[source]¶
Returns the credential sub type for the given Id.
- Parameters
id (basestring) – Global Credential ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_global_credentials(global_credential_id, siteUuids=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Update global credential for network devices in site(s).
- Parameters
siteUuids (list) – SitesInfoDTO’s siteUuids (list of strings).
global_credential_id (basestring) – Global credential Uuid.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_snmp_read_community(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global SNMP read community.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discovery_jobs_by_ip(ip_address, limit=None, name=None, offset=None, headers=None, **request_parameters)[source]¶
Returns the list of discovery jobs for the given IP.
- Parameters
offset (int) – offset query parameter.
limit (int) – limit query parameter.
ip_address (basestring) – ipAddress query parameter.
name (basestring) – name query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discovered_devices_by_range(id, records_to_return, start_index, task_id=None, headers=None, **request_parameters)[source]¶
Returns the network devices discovered for the given discovery and for the given range. The maximum number of records that can be retrieved is 500. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
start_index (int) – Start index.
records_to_return (int) – Number of records to return.
task_id (basestring) – taskId query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_global_credentials(credential_sub_type=None, order=None, sort_by=None, headers=None, **request_parameters)[source]¶
Returns global credential for the given credential sub type.
- Parameters
credential_sub_type (basestring) – Credential type as CLI / SNMPV2_READ_COMMUNITY / SNMPV2_WRITE_COMMUNITY / SNMPV3 / HTTP_WRITE / HTTP_READ / NETCONF.
sort_by (basestring) – sortBy query parameter.
order (basestring) – order query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discovered_network_devices_by_discovery_id(id, task_id=None, headers=None, **request_parameters)[source]¶
Returns the network devices discovered for the given Discovery ID. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
task_id (basestring) – taskId query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
networks¶
- class Networks[source]¶
Cisco DNA Center Networks API (version: 1.3.0).
Wraps the DNA Center Networks API and exposes the API as native Python methods that return native Python objects.
- get_vlan_details(headers=None, **request_parameters)[source]¶
Returns the list of VLAN names.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_site_topology(headers=None, **request_parameters)[source]¶
Returns site topology.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_physical_topology(node_type=None, headers=None, **request_parameters)[source]¶
Returns the raw physical topology by specified criteria of nodeType.
- Parameters
node_type (basestring) – nodeType query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_topology_details(vlan_id, headers=None, **request_parameters)[source]¶
Returns Layer 2 network topology by specified VLAN ID.
- Parameters
vlan_id (basestring) – Vlan Name for e.g Vlan1, Vlan23 etc.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_l3_topology_details(topology_type, headers=None, **request_parameters)[source]¶
Returns the Layer 3 network topology by routing protocol.
- Parameters
topology_type (basestring) – Type of topology(OSPF,ISIS,etc).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_overall_network_health(timestamp=None, headers=None, **request_parameters)[source]¶
Returns Overall Network Health information by Device category (Access, Distribution, Core, Router, Wireless) for any given point of time.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
non_fabric_wireless¶
- class NonFabricWireless[source]¶
Cisco DNA Center Non-Fabric Wireless API (version: 1.3.0).
Wraps the DNA Center Non-Fabric Wireless API and exposes the API as native Python methods that return native Python objects.
- provision(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Provision wireless devices.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_wireless_profile(profileDetails=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates the wireless Network Profile with updated details provided. All sites to be present in the network profile should be provided.
- Parameters
profileDetails (object) – Profile Details, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_wireless_profile(profile_name=None, headers=None, **request_parameters)[source]¶
Gets either one or all the wireless network profiles if no name is provided for network-profile.
- Parameters
profile_name (basestring) – profileName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_provision(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates wireless provisioning.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_wireless_profile(wireless_profile_name, headers=None, **request_parameters)[source]¶
Delete the Wireless Profile from DNAC whose name is provided.
- Parameters
wireless_profile_name (basestring) – wirelessProfileName path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_wireless_profile(profileDetails=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates Wireless Network Profile on DNAC and associates sites and SSIDs to it.
- Parameters
profileDetails (object) – Profile Details, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_and_provision_ssid(enableFabric=None, flexConnect=None, managedAPLocations=None, ssidDetails=None, ssidType=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates SSID, updates the SSID to the corresponding site profiles and provision it to the devices matching the given sites.
- Parameters
enableFabric (boolean) – enableFabric, property of the request body.
flexConnect (object) – Flex Connect Applicable for non fabric profile, property of the request body.
managedAPLocations (list) – Managed AP Locations (Enter entire Site(s) hierarchy), property of the request body (list of strings).
ssidDetails (object) – SsidDetails, property of the request body.
ssidType (string) – SSID Type, property of the request body. Available values are ‘Guest’ and ‘Enterprise’.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_enterprise_ssid(ssid_name, headers=None, **request_parameters)[source]¶
Deletes given enterprise SSID.
- Parameters
ssid_name (basestring) – Enter the SSID name to be deleted.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_and_provision_ssid(managed_aplocations, ssid_name, headers=None, **request_parameters)[source]¶
Removes SSID for the given site hierarchy matching network profile, provision the device and deletes the SSID from DNA Center.
- Parameters
ssid_name (basestring) – Enter the SSID name to be deleted.
managed_aplocations (basestring) – Enter complete site hierarchy to remove the SSID from the devices found in it. To enter more than one site hierarchy, use comma delimiter without extra space.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_enterprise_ssid(ssid_name=None, headers=None, **request_parameters)[source]¶
Gets either one or all the enterprise SSID.
- Parameters
ssid_name (basestring) – Enter the enterprise SSID name that needs to be retrieved. If not entered, all the enterprise SSIDs will be retrieved.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_enterprise_ssid(enableBroadcastSSID=None, enableFastLane=None, enableMACFiltering=None, fastTransition=None, name=None, passphrase=None, radioPolicy=None, securityLevel=None, trafficType=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates enterprise SSID.
- Parameters
enableBroadcastSSID (boolean) – enableBroadcastSSID, property of the request body.
enableFastLane (boolean) – enableFastLane, property of the request body.
enableMACFiltering (boolean) – enableMACFiltering, property of the request body.
fastTransition (string) – Fast Transition, property of the request body. Available values are ‘Adaptive’, ‘Enable’ and ‘Disable’.
name (string) – Enter SSID Name, property of the request body. Constraints: maxLength set to 32.
passphrase (string) – Pass Phrase (Only applicable for SSID with PERSONAL security level), property of the request body. Constraints: maxLength set to 63 and minLength set to 8.
radioPolicy (string) – Radio Policy, property of the request body. Available values are ‘Dual band operation (2.4GHz and 5GHz)’, ‘Dual band operation with band select’, ‘5GHz only’ and ‘2.4GHz only’.
securityLevel (string) – Security Level, property of the request body. Available values are ‘WPA2_ENTERPRISE’, ‘WPA2_PERSONAL’ and ‘OPEN’.
trafficType (string) – Traffic Type, property of the request body. Available values are ‘voicedata’ and ‘data’.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
path_trace¶
- class PathTrace[source]¶
Cisco DNA Center Path Trace API (version: 1.3.0).
Wraps the DNA Center Path Trace API and exposes the API as native Python methods that return native Python objects.
- retrives_all_previous_pathtraces_summary(dest_ip=None, dest_port=None, gt_create_time=None, last_update_time=None, limit=None, lt_create_time=None, offset=None, order=None, periodic_refresh=None, protocol=None, sort_by=None, source_ip=None, source_port=None, status=None, task_id=None, headers=None, **request_parameters)[source]¶
Returns a summary of all flow analyses stored. Results can be filtered by specified parameters.
- Parameters
periodic_refresh (bool) – Is analysis periodically refreshed?.
source_ip (basestring) – Source IP address.
dest_ip (basestring) – Destination IP address.
source_port (basestring) – Source port.
dest_port (basestring) – Destination port.
gt_create_time (basestring) – Analyses requested after this time.
lt_create_time (basestring) – Analyses requested before this time.
protocol (basestring) – protocol query parameter.
status (basestring) – status query parameter.
task_id (basestring) – Task ID.
last_update_time (basestring) – Last update time.
limit (basestring) – Number of resources returned.
offset (basestring) – Start index of resources returned (1-based).
order (basestring) – Order by this field.
sort_by (basestring) – Sort by this field.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- retrieves_previous_pathtrace(flow_analysis_id, headers=None, **request_parameters)[source]¶
Returns result of a previously requested flow analysis by its Flow Analysis id.
- Parameters
flow_analysis_id (basestring) – Flow analysis request id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- deletes_pathtrace_by_id(flow_analysis_id, headers=None, **request_parameters)[source]¶
Deletes a flow analysis request by its id.
- Parameters
flow_analysis_id (basestring) – Flow analysis request id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- initiate_a_new_pathtrace(controlPath=None, destIP=None, destPort=None, inclusions=None, periodicRefresh=None, protocol=None, sourceIP=None, sourcePort=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Initiates a new flow analysis with periodic refresh and stat collection options. Returns a request id and a task id to get results and follow progress.
- Parameters
controlPath (boolean) – FlowAnalysisRequest’s controlPath.
destIP (string) – FlowAnalysisRequest’s destIP.
destPort (string) – FlowAnalysisRequest’s destPort.
inclusions (list) – FlowAnalysisRequest’s inclusions (list of strings).
periodicRefresh (boolean) – FlowAnalysisRequest’s periodicRefresh.
protocol (string) – FlowAnalysisRequest’s protocol.
sourceIP (string) – FlowAnalysisRequest’s sourceIP.
sourcePort (string) – FlowAnalysisRequest’s sourcePort.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
pnp¶
- class Pnp[source]¶
Cisco DNA Center PnP API (version: 1.3.0).
Wraps the DNA Center PnP API and exposes the API as native Python methods that return native Python objects.
- un_claim_device(deviceIdList=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Un-Claims one of more devices with specified workflow.
- Parameters
deviceIdList (list) – UnclaimRequest’s deviceIdList (list of string, objects).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_sync_result_for_virtual_account(domain, name, headers=None, **request_parameters)[source]¶
Returns the summary of devices synced from the given smart account & virtual account with PnP.
- Parameters
domain (basestring) – Smart Account Domain.
name (basestring) – Virtual Account Name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_device(id, _id=None, deviceInfo=None, runSummaryList=None, systemResetWorkflow=None, systemWorkflow=None, tenantId=None, version=None, workflow=None, workflowParameters=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates device details specified by device id in PnP database.
- Parameters
_id (string) – Device’s _id.
deviceInfo (object) – Device’s deviceInfo.
runSummaryList (list) – Device’s runSummaryList (list of objects).
systemResetWorkflow (object) – Device’s systemResetWorkflow.
systemWorkflow (object) – Device’s systemWorkflow.
tenantId (string) – Device’s tenantId.
version (number) – Device’s version.
workflow (object) – Device’s workflow.
workflowParameters (object) – Device’s workflowParameters.
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- deregister_virtual_account(domain, name, headers=None, **request_parameters)[source]¶
Deregisters the specified smart account & virtual account info and the associated device information from the PnP System & database. The devices associated with the deregistered virtual account are removed from the PnP database as well. The response payload contains the deregistered smart & virtual account information.
- Parameters
domain (basestring) – Smart Account Domain.
name (basestring) – Virtual Account Name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_virtual_account(autoSyncPeriod=None, ccoUser=None, expiry=None, lastSync=None, profile=None, smartAccountId=None, syncResult=None, syncResultStr=None, syncStartTime=None, syncStatus=None, tenantId=None, token=None, virtualAccountId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Registers a Smart Account, Virtual Account and the relevant server profile info with the PnP System & database. The devices present in the registered virtual account are synced with the PnP database as well. The response payload returns the new profile.
- Parameters
autoSyncPeriod (number) – SAVAMapping’s autoSyncPeriod.
ccoUser (string) – SAVAMapping’s ccoUser.
expiry (number) – SAVAMapping’s expiry.
lastSync (number) – SAVAMapping’s lastSync.
profile (object) – SAVAMapping’s profile.
smartAccountId (string) – SAVAMapping’s smartAccountId.
syncResult (object) – SAVAMapping’s syncResult.
syncResultStr (string) – SAVAMapping’s syncResultStr.
syncStartTime (number) – SAVAMapping’s syncStartTime.
syncStatus (string) – SAVAMapping’s syncStatus. Available values are ‘NOT_SYNCED’, ‘SYNCING’, ‘SUCCESS’ and ‘FAILURE’.
tenantId (string) – SAVAMapping’s tenantId.
token (string) – SAVAMapping’s token.
virtualAccountId (string) – SAVAMapping’s virtualAccountId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- import_devices_in_bulk(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add devices to PnP in bulk.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_workflow(id, _id=None, addToInventory=None, addedOn=None, configId=None, currTaskIdx=None, description=None, endTime=None, execTime=None, imageId=None, instanceType=None, lastupdateOn=None, name=None, startTime=None, state=None, tasks=None, tenantId=None, type=None, useState=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates an existing workflow.
- Parameters
_id (string) – Workflow’s _id.
addToInventory (boolean) – Workflow’s addToInventory.
addedOn (number) – Workflow’s addedOn.
configId (string) – Workflow’s configId.
currTaskIdx (number) – Workflow’s currTaskIdx.
description (string) – Workflow’s description.
endTime (number) – Workflow’s endTime.
execTime (number) – Workflow’s execTime.
imageId (string) – Workflow’s imageId.
instanceType (string) – Workflow’s instanceType. Available values are ‘SystemWorkflow’, ‘UserWorkflow’ and ‘SystemResetWorkflow’.
lastupdateOn (number) – Workflow’s lastupdateOn.
name (string) – Workflow’s name.
startTime (number) – Workflow’s startTime.
state (string) – Workflow’s state.
tasks (list) – Workflow’s tasks (list of objects).
tenantId (string) – Workflow’s tenantId.
type (string) – Workflow’s type.
useState (string) – Workflow’s useState.
version (number) – Workflow’s version.
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_smart_account_list(headers=None, **request_parameters)[source]¶
Returns the list of Smart Account domains.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- claim_a_device_to_a_site(deviceId=None, siteId=None, type=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Claim a device based on DNA-C Site based design process. Different parameters are required for different device platforms.
- Parameters
deviceId (string) – SiteProvisionRequest’s deviceId.
siteId (string) – SiteProvisionRequest’s siteId.
type (string) – SiteProvisionRequest’s type. Available values are ‘Default’, ‘AccessPoint’, ‘StackSwitch’, ‘Sensor’ and ‘MobilityExpress’.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_pnp_server_profile(autoSyncPeriod=None, ccoUser=None, expiry=None, lastSync=None, profile=None, smartAccountId=None, syncResult=None, syncResultStr=None, syncStartTime=None, syncStatus=None, tenantId=None, token=None, virtualAccountId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates the PnP Server profile in a registered Virtual Account in the PnP database. The response payload returns the updated smart & virtual account info.
- Parameters
autoSyncPeriod (number) – SAVAMapping’s autoSyncPeriod.
ccoUser (string) – SAVAMapping’s ccoUser.
expiry (number) – SAVAMapping’s expiry.
lastSync (number) – SAVAMapping’s lastSync.
profile (object) – SAVAMapping’s profile.
smartAccountId (string) – SAVAMapping’s smartAccountId.
syncResult (object) – SAVAMapping’s syncResult.
syncResultStr (string) – SAVAMapping’s syncResultStr.
syncStartTime (number) – SAVAMapping’s syncStartTime.
syncStatus (string) – SAVAMapping’s syncStatus. Available values are ‘NOT_SYNCED’, ‘SYNCING’, ‘SUCCESS’ and ‘FAILURE’.
tenantId (string) – SAVAMapping’s tenantId.
token (string) – SAVAMapping’s token.
virtualAccountId (string) – SAVAMapping’s virtualAccountId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_workflow_count(name=None, headers=None, **request_parameters)[source]¶
Returns the workflow count.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_virtual_account_list(domain, headers=None, **request_parameters)[source]¶
Returns list of virtual accounts associated with the specified smart account.
- Parameters
domain (basestring) – Smart Account Domain.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_pnp_global_settings(headers=None, **request_parameters)[source]¶
Returns global PnP settings of the user.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_pnp_global_settings(_id=None, aaaCredentials=None, acceptEula=None, defaultProfile=None, savaMappingList=None, taskTimeOuts=None, tenantId=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates the user’s list of global PnP settings.
- Parameters
_id (string) – Settings’s _id.
aaaCredentials (object) – Settings’s aaaCredentials.
acceptEula (boolean) – Settings’s acceptEula.
defaultProfile (object) – Settings’s defaultProfile.
savaMappingList (list) – Settings’s savaMappingList (list of objects).
taskTimeOuts (object) – Settings’s taskTimeOuts.
tenantId (string) – Settings’s tenantId.
version (number) – Settings’s version.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_a_workflow(_id=None, addToInventory=None, addedOn=None, configId=None, currTaskIdx=None, description=None, endTime=None, execTime=None, imageId=None, instanceType=None, lastupdateOn=None, name=None, startTime=None, state=None, tasks=None, tenantId=None, type=None, useState=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds a PnP Workflow along with the relevant tasks in the workflow into the PnP database.
- Parameters
_id (string) – Workflow’s _id.
addToInventory (boolean) – Workflow’s addToInventory.
addedOn (number) – Workflow’s addedOn.
configId (string) – Workflow’s configId.
currTaskIdx (number) – Workflow’s currTaskIdx.
description (string) – Workflow’s description.
endTime (number) – Workflow’s endTime.
execTime (number) – Workflow’s execTime.
imageId (string) – Workflow’s imageId.
instanceType (string) – Workflow’s instanceType. Available values are ‘SystemWorkflow’, ‘UserWorkflow’ and ‘SystemResetWorkflow’.
lastupdateOn (number) – Workflow’s lastupdateOn.
name (string) – Workflow’s name.
startTime (number) – Workflow’s startTime.
state (string) – Workflow’s state.
tasks (list) – Workflow’s tasks (list of objects).
tenantId (string) – Workflow’s tenantId.
type (string) – Workflow’s type.
useState (string) – Workflow’s useState.
version (number) – Workflow’s version.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- sync_virtual_account_devices(autoSyncPeriod=None, ccoUser=None, expiry=None, lastSync=None, profile=None, smartAccountId=None, syncResult=None, syncResultStr=None, syncStartTime=None, syncStatus=None, tenantId=None, token=None, virtualAccountId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Synchronizes the device info from the given smart account & virtual account with the PnP database. The response payload returns a list of synced devices.
- Parameters
autoSyncPeriod (number) – SAVAMapping’s autoSyncPeriod.
ccoUser (string) – SAVAMapping’s ccoUser.
expiry (number) – SAVAMapping’s expiry.
lastSync (number) – SAVAMapping’s lastSync.
profile (object) – SAVAMapping’s profile.
smartAccountId (string) – SAVAMapping’s smartAccountId.
syncResult (object) – SAVAMapping’s syncResult.
syncResultStr (string) – SAVAMapping’s syncResultStr.
syncStartTime (number) – SAVAMapping’s syncStartTime.
syncStatus (string) – SAVAMapping’s syncStatus. Available values are ‘NOT_SYNCED’, ‘SYNCING’, ‘SUCCESS’ and ‘FAILURE’.
tenantId (string) – SAVAMapping’s tenantId.
token (string) – SAVAMapping’s token.
virtualAccountId (string) – SAVAMapping’s virtualAccountId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- reset_device(deviceResetList=None, projectId=None, workflowId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Recovers a device from a Workflow Execution Error state.
- Parameters
deviceResetList (list) – ResetRequest’s deviceResetList (list of objects).
projectId (string) – ResetRequest’s projectId.
workflowId (string) – ResetRequest’s workflowId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_workflow_by_id(id, headers=None, **request_parameters)[source]¶
Deletes a workflow specified by id.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_device_by_id_from_pnp(id, headers=None, **request_parameters)[source]¶
Deletes specified device from PnP database.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_workflows(limit=None, name=None, offset=None, sort=None, sort_order=None, type=None, headers=None, **request_parameters)[source]¶
Returns the list of workflows based on filter criteria. If a limit is not specified, it will default to return 50 workflows. Pagination and sorting are also supported by this endpoint.
- Parameters
limit (int) – Limits number of results.
offset (int) – Index of first result.
sort (basestring, list, set, tuple) – Comma seperated lost of fields to sort on.
sort_order (basestring) – Sort Order Ascending (asc) or Descending (des).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_by_id(id, headers=None, **request_parameters)[source]¶
Returns device details specified by device id.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_count(cm_state=None, last_contact=None, name=None, onb_state=None, pid=None, project_id=None, project_name=None, serial_number=None, smart_account_id=None, source=None, state=None, virtual_account_id=None, workflow_id=None, workflow_name=None, headers=None, **request_parameters)[source]¶
Returns the device count based on filter criteria. This is useful for pagination.
- Parameters
serial_number (basestring, list, set, tuple) – Device Serial Number.
onb_state (basestring, list, set, tuple) – Device Onboarding State.
cm_state (basestring, list, set, tuple) – Device Connection Manager State.
project_id (basestring, list, set, tuple) – Device Project Id.
workflow_id (basestring, list, set, tuple) – Device Workflow Id.
project_name (basestring, list, set, tuple) – Device Project Name.
workflow_name (basestring, list, set, tuple) – Device Workflow Name.
smart_account_id (basestring, list, set, tuple) – Device Smart Account.
virtual_account_id (basestring, list, set, tuple) – Device Virtual Account.
last_contact (bool) – Device Has Contacted lastContact > 0.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_workflow_by_id(id, headers=None, **request_parameters)[source]¶
Returns a workflow specified by id.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_history(serial_number, sort=None, sort_order=None, headers=None, **request_parameters)[source]¶
Returns history for a specific device. Serial number is a required parameter.
- Parameters
serial_number (basestring) – Device Serial Number.
sort (basestring, list, set, tuple) – Comma seperated list of fields to sort on.
sort_order (basestring) – Sort Order Ascending (asc) or Descending (des).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_list(cm_state=None, last_contact=None, limit=None, name=None, offset=None, onb_state=None, pid=None, project_id=None, project_name=None, serial_number=None, smart_account_id=None, sort=None, sort_order=None, source=None, state=None, virtual_account_id=None, workflow_id=None, workflow_name=None, headers=None, **request_parameters)[source]¶
Returns list of devices based on filter crieteria. If a limit is not specified, it will default to return 50 devices. Pagination and sorting are also supported by this endpoint.
- Parameters
limit (int) – Limits number of results.
offset (int) – Index of first result.
sort (basestring, list, set, tuple) – Comma seperated list of fields to sort on.
sort_order (basestring) – Sort Order Ascending (asc) or Descending (des).
serial_number (basestring, list, set, tuple) – Device Serial Number.
onb_state (basestring, list, set, tuple) – Device Onboarding State.
cm_state (basestring, list, set, tuple) – Device Connection Manager State.
project_id (basestring, list, set, tuple) – Device Project Id.
workflow_id (basestring, list, set, tuple) – Device Workflow Id.
project_name (basestring, list, set, tuple) – Device Project Name.
workflow_name (basestring, list, set, tuple) – Device Workflow Name.
smart_account_id (basestring, list, set, tuple) – Device Smart Account.
virtual_account_id (basestring, list, set, tuple) – Device Virtual Account.
last_contact (bool) – Device Has Contacted lastContact > 0.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- preview_config(deviceId=None, siteId=None, type=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Triggers a preview for site-based Day 0 Configuration.
- Parameters
deviceId (string) – SiteProvisionRequest’s deviceId.
siteId (string) – SiteProvisionRequest’s siteId.
type (string) – SiteProvisionRequest’s type. Available values are ‘Default’, ‘AccessPoint’, ‘StackSwitch’, ‘Sensor’ and ‘MobilityExpress’.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_device(_id=None, deviceInfo=None, runSummaryList=None, systemResetWorkflow=None, systemWorkflow=None, tenantId=None, version=None, workflow=None, workflowParameters=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds a device to the PnP database.
- Parameters
_id (string) – Device’s _id.
deviceInfo (object) – Device’s deviceInfo.
runSummaryList (list) – Device’s runSummaryList (list of objects).
systemResetWorkflow (object) – Device’s systemResetWorkflow.
systemWorkflow (object) – Device’s systemWorkflow.
tenantId (string) – Device’s tenantId.
version (number) – Device’s version.
workflow (object) – Device’s workflow.
workflowParameters (object) – Device’s workflowParameters.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- claim_device(configFileUrl=None, configId=None, deviceClaimList=None, fileServiceId=None, imageId=None, imageUrl=None, populateInventory=None, projectId=None, workflowId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Claims one of more devices with specified workflow.
- Parameters
configFileUrl (string) – ClaimDeviceRequest’s configFileUrl.
configId (string) – ClaimDeviceRequest’s configId.
deviceClaimList (list) – ClaimDeviceRequest’s deviceClaimList (list of objects).
fileServiceId (string) – ClaimDeviceRequest’s fileServiceId.
imageId (string) – ClaimDeviceRequest’s imageId.
imageUrl (string) – ClaimDeviceRequest’s imageUrl.
populateInventory (boolean) – ClaimDeviceRequest’s populateInventory.
projectId (string) – ClaimDeviceRequest’s projectId.
workflowId (string) – ClaimDeviceRequest’s workflowId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
swim¶
- class Swim[source]¶
Cisco DNA Center SWIM API (version: 1.3.0).
Wraps the DNA Center SWIM API and exposes the API as native Python methods that return native Python objects.
- get_software_image_details(application_type=None, created_time=None, family=None, image_integrity_status=None, image_name=None, image_series=None, image_size_greater_than=None, image_size_lesser_than=None, image_uuid=None, is_cco_latest=None, is_cco_recommended=None, is_tagged_golden=None, limit=None, name=None, offset=None, sort_by=None, sort_order='asc', version=None, headers=None, **request_parameters)[source]¶
Returns software image list based on a filter criteria. For example: “filterbyName = cat3k%”.
- Parameters
image_uuid (basestring) – imageUuid query parameter.
name (basestring) – name query parameter.
family (basestring) – family query parameter.
application_type (basestring) – applicationType query parameter.
image_integrity_status (basestring) – imageIntegrityStatus FAILURE, UNKNOWN, VERIFIED.
version (basestring) – software Image Version.
image_series (basestring) – image Series.
image_name (basestring) – image Name.
is_tagged_golden (bool) – is Tagged Golden.
is_cco_recommended (bool) – is recommended from cisco.com.
is_cco_latest (bool) – is latest from cisco.com.
created_time (int) – time in milliseconds (epoch format).
image_size_greater_than (int) – size in bytes.
image_size_lesser_than (int) – size in bytes.
sort_by (basestring) – sort results by this field.
sort_order (basestring) – sort order ‘asc’ or ‘des’. Default is asc.
limit (int) – limit query parameter.
offset (int) – offset query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- trigger_software_image_distribution(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Distributes a software image on a given device. Software image must be imported successfully into DNA Center before it can be distributed.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- import_local_software_image(multipart_fields, multipart_monitor_callback, is_third_party=None, third_party_application_type=None, third_party_image_family=None, third_party_vendor=None, headers=None, **request_parameters)[source]¶
Fetches a software image from local file system and uploads to DNA Center. Supported software image files extensions are bin, img, tar, smu, pie, aes, iso, ova, tar_gz and qcow2.
The following code gives an example of the multipart_fields.
multipart_fields={'file': ('file.zip', open('file.zip', 'rb')} multipart_fields={'file': ('file.txt', open('file.txt', 'rb'), 'text/plain', {'X-My-Header': 'my-value'})} multipart_fields=[('images', ('foo.png', open('foo.png', 'rb'), 'image/png')), ('images', ('bar.png', open('bar.png', 'rb'), 'image/png'))]
The following example demonstrates how to use multipart_monitor_callback=create_callback to create a progress bar using clint.
from clint.textui.progress import Bar def create_callback(encoder): encoder_len = encoder.len bar = Bar(expected_size=encoder_len, filled_char="=") def callback(monitor): bar.show(monitor.bytes_read) return callback
- Parameters
is_third_party (bool) – Third party Image check.
third_party_vendor (basestring) – Third Party Vendor.
third_party_image_family (basestring) – Third Party image family.
third_party_application_type (basestring) – Third Party Application Type.
multipart_fields (dict) – Fields from which to create a multipart/form-data body.
multipart_monitor_callback (function) – function used to monitor the progress of the upload.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- trigger_software_image_activation(schedule_validate=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Activates a software image on a given device. Software image must be present in the device flash.
- Parameters
schedule_validate (bool) – scheduleValidate, validates data before schedule (Optional).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- import_software_image_via_url(schedule_at=None, schedule_desc=None, schedule_origin=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Fetches a software image from remote file system (using URL for HTTP/FTP) and uploads to DNA Center. Supported image files extensions are bin, img, tar, smu, pie, aes, iso, ova, tar_gz and qcow2.
- Parameters
schedule_at (basestring) – Epoch Time (The number of milli-seconds since January 1 1970 UTC) at which the distribution should be scheduled (Optional) .
schedule_desc (basestring) – Custom Description (Optional).
schedule_origin (basestring) – Originator of this call (Optional).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
site_profile¶
- class SiteProfile[source]¶
Cisco DNA Center Site Profile API (version: 1.3.0).
Wraps the DNA Center Site Profile API and exposes the API as native Python methods that return native Python objects.
- get_device_details_by_ip(device_ip, headers=None, **request_parameters)[source]¶
Returns provisioning device information for the specified IP address.
- Parameters
device_ip (basestring) – Device to which the provisioning detail has to be retrieved.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- provision_nfv(provisioning=None, siteProfile=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Design and Provision single/multi NFV device with given site/area/building/floor .
- Parameters
provisioning (list) – Provisioning, property of the request body (list of objects).
siteProfile (list) – Site Profile, property of the request body (list of objects).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- nfv_provisioning_detail(device_ip=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Checks the provisioning detail of an ENCS device including log information.
- Parameters
device_ip (string) – Device Ip, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
sites¶
- class Sites[source]¶
Cisco DNA Center Sites API (version: 1.3.0).
Wraps the DNA Center Sites API and exposes the API as native Python methods that return native Python objects.
- get_site_health(timestamp=None, headers=None, **request_parameters)[source]¶
Returns Overall Health information for all sites.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_site(site_id, site=None, type=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Update site area/building/floor with specified hierarchy and new values.
- Parameters
site (object) – Site, property of the request body.
type (string) – Type, property of the request body. Available values are ‘area’, ‘building’ and ‘floor’.
site_id (basestring) – site id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_site(site=None, type=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates site with area/building/floor with specified hierarchy.
- Parameters
site (object) – Site, property of the request body.
type (string) – Type, property of the request body. Available values are ‘area’, ‘building’ and ‘floor’.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_site(limit=None, name=None, offset=None, site_id=None, type=None, headers=None, **request_parameters)[source]¶
Get site with area/building/floor with specified hierarchy.
- Parameters
name (basestring) – groupNameHierarchy (ex: global/groupName).
site_id (basestring) – site id.
type (basestring) – type (ex: area, building, floor).
offset (int) – offset/starting row.
limit (int) – Number of sites to be retrieved.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_site(site_id, headers=None, **request_parameters)[source]¶
Delete site with area/building/floor by siteId.
- Parameters
site_id (basestring) – site id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_site_count(site_id=None, headers=None, **request_parameters)[source]¶
API to get site count .
- Parameters
site_id (basestring) – site id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- assign_device_to_site(site_id, device=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Assigns list of devices to a site.
- Parameters
device (list) – Device, property of the request body (list of objects).
site_id (basestring) – Site id to which the device is assigned.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_membership(site_id, headers=None, **request_parameters)[source]¶
Getting the site children details and device details.
- Parameters
site_id (basestring) – site id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
tag¶
- class Tag[source]¶
Cisco DNA Center Tag API (version: 1.3.0).
Wraps the DNA Center Tag API and exposes the API as native Python methods that return native Python objects.
- add_members_to_the_tag(id, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds members to the tag specified by id.
- Parameters
id (basestring) – Tag ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_tag(description=None, dynamicRules=None, id=None, instanceTenantId=None, name=None, systemTag=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates tag with specified tag attributes.
- Parameters
description (string) – TagDTO’s description.
dynamicRules (list) – TagDTO’s dynamicRules (list of objects).
id (string) – TagDTO’s id.
instanceTenantId (string) – TagDTO’s instanceTenantId.
name (string) – TagDTO’s name.
systemTag (boolean) – TagDTO’s systemTag.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_tag(id, headers=None, **request_parameters)[source]¶
Deletes a tag specified by id.
- Parameters
id (basestring) – Tag ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag_member_count(id, member_type, level='0', member_association_type=None, headers=None, **request_parameters)[source]¶
Returns the number of members in a given tag.
- Parameters
id (basestring) – Tag ID.
member_type (basestring) – memberType query parameter.
member_association_type (basestring) – memberAssociationType query parameter.
level (basestring) – level query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag_resource_types(headers=None, **request_parameters)[source]¶
Returns list of supported resource types.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- updates_tag_membership(memberToTags=None, memberType=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates tag membership. As part of the request payload through this API, only the specified members are added / retained to the given input tags. Possible values of memberType attribute in the request payload can be queried by using the /tag/member/type API.
- Parameters
memberToTags (array, object) – TagMemberDTO’s memberToTags.
memberType (string) – TagMemberDTO’s memberType.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_tag(description=None, dynamicRules=None, id=None, instanceTenantId=None, name=None, systemTag=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates a tag specified by id.
- Parameters
description (string) – TagDTO’s description.
dynamicRules (list) – TagDTO’s dynamicRules (list of objects).
id (string) – TagDTO’s id.
instanceTenantId (string) – TagDTO’s instanceTenantId.
name (string) – TagDTO’s name.
systemTag (boolean) – TagDTO’s systemTag.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag_count(attribute_name=None, level=None, name=None, name_space=None, size=None, system_tag=None, headers=None, **request_parameters)[source]¶
Returns tag count.
- Parameters
name (basestring) – name query parameter.
name_space (basestring) – nameSpace query parameter.
attribute_name (basestring) – attributeName query parameter.
level (basestring) – level query parameter.
size (basestring) – size in kilobytes(KB).
system_tag (basestring) – systemTag query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag_by_id(id, headers=None, **request_parameters)[source]¶
Returns tag specified by Id.
- Parameters
id (basestring) – Tag ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag_members_by_id(id, member_type, level='0', limit=None, member_association_type=None, offset=None, headers=None, **request_parameters)[source]¶
Returns tag members specified by id.
- Parameters
id (basestring) – Tag ID.
member_type (basestring) – Entity type of the member. Possible values can be retrieved by using /tag/member/type API.
offset (basestring) – Used for pagination. It indicates the starting row number out of available member records.
limit (basestring) – Used to Number of maximum members to return in the result.
member_association_type (basestring) – Indicates how the member is associated with the tag. Possible values and description. 1) DYNAMIC : The member is associated to the tag through rules. 2) STATIC – The member is associated to the tag manually. 3) MIXED – The member is associated manually and also satisfies the rule defined for the tag.
level (basestring) – level query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- remove_tag_member(id, member_id, headers=None, **request_parameters)[source]¶
Removes Tag member from the tag specified by id.
- Parameters
id (basestring) – Tag ID.
member_id (basestring) – TagMember id to be removed from tag.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag(additional_info_attributes=None, additional_info_name_space=None, field=None, level=None, limit=None, name=None, offset=None, order=None, size=None, sort_by=None, system_tag=None, headers=None, **request_parameters)[source]¶
Returns the tags for given filter criteria.
- Parameters
name (basestring) – Tag name is mandatory when filter operation is used.
additional_info_name_space (basestring) – additionalInfo.nameSpace query parameter.
additional_info_attributes (basestring) – additionalInfo.attributes query parameter.
level (basestring) – level query parameter.
offset (basestring) – offset query parameter.
limit (basestring) – limit query parameter.
size (basestring) – size in kilobytes(KB).
field (basestring) – Available field names are :’name,id,p arentId,type,additionalInfo.nameSpace,ad ditionalInfo.attributes’.
sort_by (basestring) – Only supported attribute is name. SortyBy is mandatory when order is used.
order (basestring) – Available values are asc and des.
system_tag (basestring) – systemTag query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
task¶
- class Task[source]¶
Cisco DNA Center Task API (version: 1.3.0).
Wraps the DNA Center Task API and exposes the API as native Python methods that return native Python objects.
- get_task_count(data=None, end_time=None, error_code=None, failure_reason=None, is_error=None, parent_id=None, progress=None, service_type=None, start_time=None, username=None, headers=None, **request_parameters)[source]¶
Returns Task count.
- Parameters
start_time (basestring) – This is the epoch start time from which tasks need to be fetched.
end_time (basestring) – This is the epoch end time upto which audit records need to be fetched.
data (basestring) – Fetch tasks that contains this data.
error_code (basestring) – Fetch tasks that have this error code.
service_type (basestring) – Fetch tasks with this service type.
username (basestring) – Fetch tasks with this username.
progress (basestring) – Fetch tasks that contains this progress.
is_error (basestring) – Fetch tasks ended as success or failure. Valid values: true, false.
failure_reason (basestring) – Fetch tasks that contains this failure reason.
parent_id (basestring) – Fetch tasks that have this parent Id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_task_by_id(task_id, headers=None, **request_parameters)[source]¶
Returns a task by specified id.
- Parameters
task_id (basestring) – UUID of the Task.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tasks(data=None, end_time=None, error_code=None, failure_reason=None, is_error=None, limit=None, offset=None, order=None, parent_id=None, progress=None, service_type=None, sort_by=None, start_time=None, username=None, headers=None, **request_parameters)[source]¶
Returns task(s) based on filter criteria.
- Parameters
start_time (basestring) – This is the epoch start time from which tasks need to be fetched.
end_time (basestring) – This is the epoch end time upto which audit records need to be fetched.
data (basestring) – Fetch tasks that contains this data.
error_code (basestring) – Fetch tasks that have this error code.
service_type (basestring) – Fetch tasks with this service type.
username (basestring) – Fetch tasks with this username.
progress (basestring) – Fetch tasks that contains this progress.
is_error (basestring) – Fetch tasks ended as success or failure. Valid values: true, false.
failure_reason (basestring) – Fetch tasks that contains this failure reason.
parent_id (basestring) – Fetch tasks that have this parent Id.
offset (basestring) – offset query parameter.
limit (basestring) – limit query parameter.
sort_by (basestring) – Sort results by this field.
order (basestring) – Sort order asc or dsc.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_task_tree(task_id, headers=None, **request_parameters)[source]¶
Returns a task with its children tasks by based on their id.
- Parameters
task_id (basestring) – UUID of the Task.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_task_by_operationid(limit, offset, operation_id, headers=None, **request_parameters)[source]¶
Returns root tasks associated with an Operationid.
- Parameters
operation_id (basestring) – operationId path parameter.
offset (int) – Index, minimum value is 0.
limit (int) – The maximum value of {limit} supported is 500. Base 1 indexing for {limit}, minimum value is 1.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
template_programmer¶
- class TemplateProgrammer[source]¶
Cisco DNA Center Template Programmer API (version: 1.3.0).
Wraps the DNA Center Template Programmer API and exposes the API as native Python methods that return native Python objects.
- create_project(createTime=None, description=None, id=None, lastUpdateTime=None, name=None, tags=None, templates=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates a new project.
- Parameters
createTime (number) – ProjectDTO’s createTime.
description (string) – ProjectDTO’s description.
id (string) – ProjectDTO’s id.
lastUpdateTime (number) – ProjectDTO’s lastUpdateTime.
name (string) – ProjectDTO’s name.
tags (list) – ProjectDTO’s tags (list of string, objects).
templates – Part of the JSON serializable Python object to send in the body of the Request.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- gets_the_templates_available(filter_conflicting_templates=None, product_family=None, product_series=None, product_type=None, project_id=None, software_type=None, software_version=None, headers=None, **request_parameters)[source]¶
List the templates available.
- Parameters
project_id (basestring) – projectId query parameter.
software_type (basestring) – softwareType query parameter.
software_version (basestring) – softwareVersion query parameter.
product_family (basestring) – productFamily query parameter.
product_series (basestring) – productSeries query parameter.
product_type (basestring) – productType query parameter.
filter_conflicting_templates (bool) – filterConflictingTemplates query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_projects(name=None, headers=None, **request_parameters)[source]¶
Returns the projects in the system.
- Parameters
name (basestring) – Name of project to be searched.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- deploy_template(forcePushTemplate=None, isComposite=None, mainTemplateId=None, memberTemplateDeploymentInfo=None, targetInfo=None, templateId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Deploys a template.
- Parameters
forcePushTemplate (boolean) – TemplateDeploymentInfo’s forcePushTemplate.
isComposite (boolean) – TemplateDeploymentInfo’s isComposite.
mainTemplateId (string) – TemplateDeploymentInfo’s mainTemplateId.
memberTemplateDeploymentInfo (list) – TemplateDeploymentInfo’s memberTemplateDeploymentInfo (list of any objects).
targetInfo (list) – TemplateDeploymentInfo’s targetInfo (list of objects).
templateId (string) – TemplateDeploymentInfo’s templateId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_template(author=None, composite=None, containingTemplates=None, createTime=None, description=None, deviceTypes=None, failurePolicy=None, id=None, lastUpdateTime=None, name=None, parentTemplateId=None, projectId=None, projectName=None, rollbackTemplateContent=None, rollbackTemplateParams=None, softwareType=None, softwareVariant=None, softwareVersion=None, tags=None, templateContent=None, templateParams=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates an existing template.
- Parameters
author (string) – TemplateDTO’s author.
composite (boolean) – TemplateDTO’s composite.
containingTemplates (list) – TemplateDTO’s containingTemplates (list of objects).
createTime (number) – TemplateDTO’s createTime.
description (string) – TemplateDTO’s description.
deviceTypes (list) – TemplateDTO’s deviceTypes (list of objects).
failurePolicy (string) – TemplateDTO’s failurePolicy. Available values are ‘ABORT_ON_ERROR’, ‘CONTINUE_ON_ERROR’, ‘ROLLBACK_ON_ERROR’, ‘ROLLBACK_TARGET_ON_ERROR’ and ‘ABORT_TARGET_ON_ERROR’.
id (string) – TemplateDTO’s id.
lastUpdateTime (number) – TemplateDTO’s lastUpdateTime.
name (string) – TemplateDTO’s name.
parentTemplateId (string) – TemplateDTO’s parentTemplateId.
projectId (string) – TemplateDTO’s projectId.
projectName (string) – TemplateDTO’s projectName.
rollbackTemplateContent (string) – TemplateDTO’s rollbackTemplateContent.
rollbackTemplateParams (list) – TemplateDTO’s rollbackTemplateParams (list of objects).
softwareType (string) – TemplateDTO’s softwareType.
softwareVariant (string) – TemplateDTO’s softwareVariant.
softwareVersion (string) – TemplateDTO’s softwareVersion.
tags (list) – TemplateDTO’s tags (list of string, objects).
templateContent (string) – TemplateDTO’s templateContent.
templateParams (list) – TemplateDTO’s templateParams (list of objects).
version (string) – TemplateDTO’s version.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_project(createTime=None, description=None, id=None, lastUpdateTime=None, name=None, tags=None, templates=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates an existing project.
- Parameters
createTime (number) – ProjectDTO’s createTime.
description (string) – ProjectDTO’s description.
id (string) – ProjectDTO’s id.
lastUpdateTime (number) – ProjectDTO’s lastUpdateTime.
name (string) – ProjectDTO’s name.
tags (list) – ProjectDTO’s tags (list of string, objects).
templates – Part of the JSON serializable Python object to send in the body of the Request.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_template(template_id, headers=None, **request_parameters)[source]¶
Deletes an existing template.
- Parameters
template_id (basestring) – templateId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- preview_template(params=None, templateId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Previews an existing template.
- Parameters
params (object) – TemplatePreviewRequestDTO’s params.
templateId (string) – TemplatePreviewRequestDTO’s templateId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_template_versions(template_id, headers=None, **request_parameters)[source]¶
Returns the versions of a specified template.
- Parameters
template_id (basestring) – templateId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- version_template(comments=None, templateId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates Versioning for the current contents of the template.
- Parameters
comments (string) – TemplateVersionRequestDTO’s comments.
templateId (string) – TemplateVersionRequestDTO’s templateId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_template_details(template_id, latest_version=None, headers=None, **request_parameters)[source]¶
Returns details of the specified template.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_template(project_id, author=None, composite=None, containingTemplates=None, createTime=None, description=None, deviceTypes=None, failurePolicy=None, id=None, lastUpdateTime=None, name=None, parentTemplateId=None, projectId=None, projectName=None, rollbackTemplateContent=None, rollbackTemplateParams=None, softwareType=None, softwareVariant=None, softwareVersion=None, tags=None, templateContent=None, templateParams=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates a new template.
- Parameters
author (string) – TemplateDTO’s author.
composite (boolean) – TemplateDTO’s composite.
containingTemplates (list) – TemplateDTO’s containingTemplates (list of objects).
createTime (number) – TemplateDTO’s createTime.
description (string) – TemplateDTO’s description.
deviceTypes (list) – TemplateDTO’s deviceTypes (list of objects).
failurePolicy (string) – TemplateDTO’s failurePolicy. Available values are ‘ABORT_ON_ERROR’, ‘CONTINUE_ON_ERROR’, ‘ROLLBACK_ON_ERROR’, ‘ROLLBACK_TARGET_ON_ERROR’ and ‘ABORT_TARGET_ON_ERROR’.
id (string) – TemplateDTO’s id.
lastUpdateTime (number) – TemplateDTO’s lastUpdateTime.
name (string) – TemplateDTO’s name.
parentTemplateId (string) – TemplateDTO’s parentTemplateId.
projectId (string) – TemplateDTO’s projectId.
projectName (string) – TemplateDTO’s projectName.
rollbackTemplateContent (string) – TemplateDTO’s rollbackTemplateContent.
rollbackTemplateParams (list) – TemplateDTO’s rollbackTemplateParams (list of objects).
softwareType (string) – TemplateDTO’s softwareType.
softwareVariant (string) – TemplateDTO’s softwareVariant.
softwareVersion (string) – TemplateDTO’s softwareVersion.
tags (list) – TemplateDTO’s tags (list of string, objects).
templateContent (string) – TemplateDTO’s templateContent.
templateParams (list) – TemplateDTO’s templateParams (list of objects).
version (string) – TemplateDTO’s version.
project_id (basestring) – projectId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_template_deployment_status(deployment_id, headers=None, **request_parameters)[source]¶
Returns the status of a deployed template.
- Parameters
deployment_id (basestring) – deploymentId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_project(project_id, headers=None, **request_parameters)[source]¶
Deletes an existing Project.
- Parameters
project_id (basestring) – projectId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
DNACenterAPI v1.3.1¶
application_policy¶
- class ApplicationPolicy[source]¶
Cisco DNA Center Application Policy API (version: 1.3.1).
Wraps the DNA Center Application Policy API and exposes the API as native Python methods that return native Python objects.
- create_application_set(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Create new custom application-set/s.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_application_sets_count(headers=None, **request_parameters)[source]¶
Get the number of existing application-sets .
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_application(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Create new Custom application.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_application(id, headers=None, **request_parameters)[source]¶
Delete existing application by its id.
- Parameters
id (basestring) – Application’s Id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_application_sets(limit=500, name=None, offset=1, headers=None, **request_parameters)[source]¶
Get appllication-sets by offset/limit or by name.
- Parameters
offset (int) – offset query parameter.
limit (int) – limit query parameter.
name (basestring) – name query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_applications_count(headers=None, **request_parameters)[source]¶
Get the number of all existing applications.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- edit_application(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Edit the attributes of an existing application.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_application_set(id, headers=None, **request_parameters)[source]¶
Delete existing application-set by it’s id.
- Parameters
id (basestring) – id query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_applications(limit=500, name=None, offset=1, headers=None, **request_parameters)[source]¶
Get applications by offset/limit or by name.
- Parameters
offset (int) – The offset of the first application to be returned.
limit (int) – The maximum number of applications to be returned.
name (basestring) – Application’s name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
clients¶
- class Clients[source]¶
Cisco DNA Center Clients API (version: 1.3.1).
Wraps the DNA Center Clients API and exposes the API as native Python methods that return native Python objects.
- get_client_enrichment_details(headers=None, **request_parameters)[source]¶
Enriches a given network End User context (a network user-id or end user’s device Mac Address) with details about the user, the devices that the user is connected to and the assurance issues that the user is impacted by.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_overall_client_health(timestamp=None, headers=None, **request_parameters)[source]¶
Returns Overall Client Health information by Client type (Wired and Wireless) for any given point of time.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_client_detail(mac_address, timestamp=None, headers=None, **request_parameters)[source]¶
Returns detailed Client information retrieved by Mac Address for any given point of time. .
- Parameters
timestamp (basestring, int) – Epoch time(in milliseconds) when the Client health data is required.
mac_address (basestring) – MAC Address of the client.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
command_runner¶
- class CommandRunner[source]¶
Cisco DNA Center Command Runner API (version: 1.3.1).
Wraps the DNA Center Command Runner API and exposes the API as native Python methods that return native Python objects.
- get_all_keywords_of_clis_accepted(headers=None, **request_parameters)[source]¶
Get valid keywords.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- run_read_only_commands_on_devices(commands=None, description=None, deviceUuids=None, name=None, timeout=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Submit request for read-only CLIs.
- Parameters
commands (list) – CommandRunnerDTO’s commands (list of strings).
description (string) – CommandRunnerDTO’s description.
deviceUuids (list) – CommandRunnerDTO’s deviceUuids (list of strings).
name (string) – CommandRunnerDTO’s name.
timeout (number) – CommandRunnerDTO’s timeout.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
configuration_templates¶
- class ConfigurationTemplates[source]¶
Cisco DNA Center Configuration Templates API (version: 1.3.1).
Wraps the DNA Center Configuration Templates API and exposes the API as native Python methods that return native Python objects.
- gets_the_templates_available(filter_conflicting_templates=None, product_family=None, product_series=None, product_type=None, project_id=None, software_type=None, software_version=None, headers=None, **request_parameters)[source]¶
List the templates available.
- Parameters
project_id (basestring) – projectId query parameter.
software_type (basestring) – softwareType query parameter.
software_version (basestring) – softwareVersion query parameter.
product_family (basestring) – productFamily query parameter.
product_series (basestring) – productSeries query parameter.
product_type (basestring) – productType query parameter.
filter_conflicting_templates (bool) – filterConflictingTemplates query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_project(createTime=None, description=None, id=None, lastUpdateTime=None, name=None, tags=None, templates=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates a new project.
- Parameters
createTime (number) – ProjectDTO’s createTime.
description (string) – ProjectDTO’s description.
id (string) – ProjectDTO’s id.
lastUpdateTime (number) – ProjectDTO’s lastUpdateTime.
name (string) – ProjectDTO’s name.
tags (list) – ProjectDTO’s tags (list of string, objects).
templates – Part of the JSON serializable Python object to send in the body of the Request.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_projects(name=None, headers=None, **request_parameters)[source]¶
Returns the projects in the system.
- Parameters
name (basestring) – Name of project to be searched.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- version_template(comments=None, templateId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates Versioning for the current contents of the template.
- Parameters
comments (string) – TemplateVersionRequestDTO’s comments.
templateId (string) – TemplateVersionRequestDTO’s templateId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- deploy_template(forcePushTemplate=None, isComposite=None, mainTemplateId=None, memberTemplateDeploymentInfo=None, targetInfo=None, templateId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Deploys a template.
- Parameters
forcePushTemplate (boolean) – TemplateDeploymentInfo’s forcePushTemplate.
isComposite (boolean) – TemplateDeploymentInfo’s isComposite.
mainTemplateId (string) – TemplateDeploymentInfo’s mainTemplateId.
memberTemplateDeploymentInfo (list) – TemplateDeploymentInfo’s memberTemplateDeploymentInfo (list of any objects).
targetInfo (list) – TemplateDeploymentInfo’s targetInfo (list of objects).
templateId (string) – TemplateDeploymentInfo’s templateId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_template(author=None, composite=None, containingTemplates=None, createTime=None, description=None, deviceTypes=None, failurePolicy=None, id=None, lastUpdateTime=None, name=None, parentTemplateId=None, projectId=None, projectName=None, rollbackTemplateContent=None, rollbackTemplateParams=None, softwareType=None, softwareVariant=None, softwareVersion=None, tags=None, templateContent=None, templateParams=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates an existing template.
- Parameters
author (string) – TemplateDTO’s author.
composite (boolean) – TemplateDTO’s composite.
containingTemplates (list) – TemplateDTO’s containingTemplates (list of objects).
createTime (number) – TemplateDTO’s createTime.
description (string) – TemplateDTO’s description.
deviceTypes (list) – TemplateDTO’s deviceTypes (list of objects).
failurePolicy (string) – TemplateDTO’s failurePolicy. Available values are ‘ABORT_ON_ERROR’, ‘CONTINUE_ON_ERROR’, ‘ROLLBACK_ON_ERROR’, ‘ROLLBACK_TARGET_ON_ERROR’ and ‘ABORT_TARGET_ON_ERROR’.
id (string) – TemplateDTO’s id.
lastUpdateTime (number) – TemplateDTO’s lastUpdateTime.
name (string) – TemplateDTO’s name.
parentTemplateId (string) – TemplateDTO’s parentTemplateId.
projectId (string) – TemplateDTO’s projectId.
projectName (string) – TemplateDTO’s projectName.
rollbackTemplateContent (string) – TemplateDTO’s rollbackTemplateContent.
rollbackTemplateParams (list) – TemplateDTO’s rollbackTemplateParams (list of objects).
softwareType (string) – TemplateDTO’s softwareType.
softwareVariant (string) – TemplateDTO’s softwareVariant.
softwareVersion (string) – TemplateDTO’s softwareVersion.
tags (list) – TemplateDTO’s tags (list of string, objects).
templateContent (string) – TemplateDTO’s templateContent.
templateParams (list) – TemplateDTO’s templateParams (list of objects).
version (string) – TemplateDTO’s version.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_template_details(template_id, latest_version=None, headers=None, **request_parameters)[source]¶
Returns details of the specified template.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_template_deployment_status(deployment_id, headers=None, **request_parameters)[source]¶
Returns the status of a deployed template.
- Parameters
deployment_id (basestring) – deploymentId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_template(template_id, headers=None, **request_parameters)[source]¶
Deletes an existing template.
- Parameters
template_id (basestring) – templateId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_template_versions(template_id, headers=None, **request_parameters)[source]¶
Returns the versions of a specified template.
- Parameters
template_id (basestring) – templateId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_project(project_id, headers=None, **request_parameters)[source]¶
Deletes an existing Project.
- Parameters
project_id (basestring) – projectId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_template(project_id, author=None, composite=None, containingTemplates=None, createTime=None, description=None, deviceTypes=None, failurePolicy=None, id=None, lastUpdateTime=None, name=None, parentTemplateId=None, projectId=None, projectName=None, rollbackTemplateContent=None, rollbackTemplateParams=None, softwareType=None, softwareVariant=None, softwareVersion=None, tags=None, templateContent=None, templateParams=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates a new template.
- Parameters
author (string) – TemplateDTO’s author.
composite (boolean) – TemplateDTO’s composite.
containingTemplates (list) – TemplateDTO’s containingTemplates (list of objects).
createTime (number) – TemplateDTO’s createTime.
description (string) – TemplateDTO’s description.
deviceTypes (list) – TemplateDTO’s deviceTypes (list of objects).
failurePolicy (string) – TemplateDTO’s failurePolicy. Available values are ‘ABORT_ON_ERROR’, ‘CONTINUE_ON_ERROR’, ‘ROLLBACK_ON_ERROR’, ‘ROLLBACK_TARGET_ON_ERROR’ and ‘ABORT_TARGET_ON_ERROR’.
id (string) – TemplateDTO’s id.
lastUpdateTime (number) – TemplateDTO’s lastUpdateTime.
name (string) – TemplateDTO’s name.
parentTemplateId (string) – TemplateDTO’s parentTemplateId.
projectId (string) – TemplateDTO’s projectId.
projectName (string) – TemplateDTO’s projectName.
rollbackTemplateContent (string) – TemplateDTO’s rollbackTemplateContent.
rollbackTemplateParams (list) – TemplateDTO’s rollbackTemplateParams (list of objects).
softwareType (string) – TemplateDTO’s softwareType.
softwareVariant (string) – TemplateDTO’s softwareVariant.
softwareVersion (string) – TemplateDTO’s softwareVersion.
tags (list) – TemplateDTO’s tags (list of string, objects).
templateContent (string) – TemplateDTO’s templateContent.
templateParams (list) – TemplateDTO’s templateParams (list of objects).
version (string) – TemplateDTO’s version.
project_id (basestring) – projectId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- preview_template(params=None, templateId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Previews an existing template.
- Parameters
params (object) – TemplatePreviewRequestDTO’s params.
templateId (string) – TemplatePreviewRequestDTO’s templateId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_project(createTime=None, description=None, id=None, lastUpdateTime=None, name=None, tags=None, templates=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates an existing project.
- Parameters
createTime (number) – ProjectDTO’s createTime.
description (string) – ProjectDTO’s description.
id (string) – ProjectDTO’s id.
lastUpdateTime (number) – ProjectDTO’s lastUpdateTime.
name (string) – ProjectDTO’s name.
tags (list) – ProjectDTO’s tags (list of string, objects).
templates – Part of the JSON serializable Python object to send in the body of the Request.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
device_onboarding_pnp¶
- class DeviceOnboardingPnp[source]¶
Cisco DNA Center Device Onboarding (PnP) API (version: 1.3.1).
Wraps the DNA Center Device Onboarding (PnP) API and exposes the API as native Python methods that return native Python objects.
- get_sync_result_for_virtual_account(domain, name, headers=None, **request_parameters)[source]¶
Returns the summary of devices synced from the given smart account & virtual account with PnP.
- Parameters
domain (basestring) – Smart Account Domain.
name (basestring) – Virtual Account Name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- un_claim_device(deviceIdList=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Un-Claims one of more devices with specified workflow.
- Parameters
deviceIdList (list) – UnclaimRequest’s deviceIdList (list of string, objects).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_device(id, _id=None, deviceInfo=None, runSummaryList=None, systemResetWorkflow=None, systemWorkflow=None, tenantId=None, version=None, workflow=None, workflowParameters=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates device details specified by device id in PnP database.
- Parameters
_id (string) – Device’s _id.
deviceInfo (object) – Device’s deviceInfo.
runSummaryList (list) – Device’s runSummaryList (list of objects).
systemResetWorkflow (object) – Device’s systemResetWorkflow.
systemWorkflow (object) – Device’s systemWorkflow.
tenantId (string) – Device’s tenantId.
version (number) – Device’s version.
workflow (object) – Device’s workflow.
workflowParameters (object) – Device’s workflowParameters.
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_virtual_account(autoSyncPeriod=None, ccoUser=None, expiry=None, lastSync=None, profile=None, smartAccountId=None, syncResult=None, syncResultStr=None, syncStartTime=None, syncStatus=None, tenantId=None, token=None, virtualAccountId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Registers a Smart Account, Virtual Account and the relevant server profile info with the PnP System & database. The devices present in the registered virtual account are synced with the PnP database as well. The response payload returns the new profile.
- Parameters
autoSyncPeriod (number) – SAVAMapping’s autoSyncPeriod.
ccoUser (string) – SAVAMapping’s ccoUser.
expiry (number) – SAVAMapping’s expiry.
lastSync (number) – SAVAMapping’s lastSync.
profile (object) – SAVAMapping’s profile.
smartAccountId (string) – SAVAMapping’s smartAccountId.
syncResult (object) – SAVAMapping’s syncResult.
syncResultStr (string) – SAVAMapping’s syncResultStr.
syncStartTime (number) – SAVAMapping’s syncStartTime.
syncStatus (string) – SAVAMapping’s syncStatus. Available values are ‘NOT_SYNCED’, ‘SYNCING’, ‘SUCCESS’ and ‘FAILURE’.
tenantId (string) – SAVAMapping’s tenantId.
token (string) – SAVAMapping’s token.
virtualAccountId (string) – SAVAMapping’s virtualAccountId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- deregister_virtual_account(domain, name, headers=None, **request_parameters)[source]¶
Deregisters the specified smart account & virtual account info and the associated device information from the PnP System & database. The devices associated with the deregistered virtual account are removed from the PnP database as well. The response payload contains the deregistered smart & virtual account information.
- Parameters
domain (basestring) – Smart Account Domain.
name (basestring) – Virtual Account Name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_smart_account_list(headers=None, **request_parameters)[source]¶
Returns the list of Smart Account domains.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- claim_a_device_to_a_site(deviceId=None, siteId=None, type=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Claim a device based on DNA-C Site based design process. Different parameters are required for different device platforms.
- Parameters
deviceId (string) – SiteProvisionRequest’s deviceId.
siteId (string) – SiteProvisionRequest’s siteId.
type (string) – SiteProvisionRequest’s type. Available values are ‘Default’, ‘AccessPoint’, ‘StackSwitch’, ‘Sensor’ and ‘MobilityExpress’.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_pnp_server_profile(autoSyncPeriod=None, ccoUser=None, expiry=None, lastSync=None, profile=None, smartAccountId=None, syncResult=None, syncResultStr=None, syncStartTime=None, syncStatus=None, tenantId=None, token=None, virtualAccountId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates the PnP Server profile in a registered Virtual Account in the PnP database. The response payload returns the updated smart & virtual account info.
- Parameters
autoSyncPeriod (number) – SAVAMapping’s autoSyncPeriod.
ccoUser (string) – SAVAMapping’s ccoUser.
expiry (number) – SAVAMapping’s expiry.
lastSync (number) – SAVAMapping’s lastSync.
profile (object) – SAVAMapping’s profile.
smartAccountId (string) – SAVAMapping’s smartAccountId.
syncResult (object) – SAVAMapping’s syncResult.
syncResultStr (string) – SAVAMapping’s syncResultStr.
syncStartTime (number) – SAVAMapping’s syncStartTime.
syncStatus (string) – SAVAMapping’s syncStatus. Available values are ‘NOT_SYNCED’, ‘SYNCING’, ‘SUCCESS’ and ‘FAILURE’.
tenantId (string) – SAVAMapping’s tenantId.
token (string) – SAVAMapping’s token.
virtualAccountId (string) – SAVAMapping’s virtualAccountId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_workflow_count(name=None, headers=None, **request_parameters)[source]¶
Returns the workflow count.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_workflow_by_id(id, headers=None, **request_parameters)[source]¶
Returns a workflow specified by id.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_virtual_account_list(domain, headers=None, **request_parameters)[source]¶
Returns list of virtual accounts associated with the specified smart account.
- Parameters
domain (basestring) – Smart Account Domain.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_a_workflow(_id=None, addToInventory=None, addedOn=None, configId=None, currTaskIdx=None, description=None, endTime=None, execTime=None, imageId=None, instanceType=None, lastupdateOn=None, name=None, startTime=None, state=None, tasks=None, tenantId=None, type=None, useState=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds a PnP Workflow along with the relevant tasks in the workflow into the PnP database.
- Parameters
_id (string) – Workflow’s _id.
addToInventory (boolean) – Workflow’s addToInventory.
addedOn (number) – Workflow’s addedOn.
configId (string) – Workflow’s configId.
currTaskIdx (number) – Workflow’s currTaskIdx.
description (string) – Workflow’s description.
endTime (number) – Workflow’s endTime.
execTime (number) – Workflow’s execTime.
imageId (string) – Workflow’s imageId.
instanceType (string) – Workflow’s instanceType. Available values are ‘SystemWorkflow’, ‘UserWorkflow’ and ‘SystemResetWorkflow’.
lastupdateOn (number) – Workflow’s lastupdateOn.
name (string) – Workflow’s name.
startTime (number) – Workflow’s startTime.
state (string) – Workflow’s state.
tasks (list) – Workflow’s tasks (list of objects).
tenantId (string) – Workflow’s tenantId.
type (string) – Workflow’s type.
useState (string) – Workflow’s useState.
version (number) – Workflow’s version.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- sync_virtual_account_devices(autoSyncPeriod=None, ccoUser=None, expiry=None, lastSync=None, profile=None, smartAccountId=None, syncResult=None, syncResultStr=None, syncStartTime=None, syncStatus=None, tenantId=None, token=None, virtualAccountId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Synchronizes the device info from the given smart account & virtual account with the PnP database. The response payload returns a list of synced devices.
- Parameters
autoSyncPeriod (number) – SAVAMapping’s autoSyncPeriod.
ccoUser (string) – SAVAMapping’s ccoUser.
expiry (number) – SAVAMapping’s expiry.
lastSync (number) – SAVAMapping’s lastSync.
profile (object) – SAVAMapping’s profile.
smartAccountId (string) – SAVAMapping’s smartAccountId.
syncResult (object) – SAVAMapping’s syncResult.
syncResultStr (string) – SAVAMapping’s syncResultStr.
syncStartTime (number) – SAVAMapping’s syncStartTime.
syncStatus (string) – SAVAMapping’s syncStatus. Available values are ‘NOT_SYNCED’, ‘SYNCING’, ‘SUCCESS’ and ‘FAILURE’.
tenantId (string) – SAVAMapping’s tenantId.
token (string) – SAVAMapping’s token.
virtualAccountId (string) – SAVAMapping’s virtualAccountId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- reset_device(deviceResetList=None, projectId=None, workflowId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Recovers a device from a Workflow Execution Error state.
- Parameters
deviceResetList (list) – ResetRequest’s deviceResetList (list of objects).
projectId (string) – ResetRequest’s projectId.
workflowId (string) – ResetRequest’s workflowId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_workflows(limit=None, name=None, offset=None, sort=None, sort_order=None, type=None, headers=None, **request_parameters)[source]¶
Returns the list of workflows based on filter criteria. If a limit is not specified, it will default to return 50 workflows. Pagination and sorting are also supported by this endpoint.
- Parameters
limit (int) – Limits number of results.
offset (int) – Index of first result.
sort (basestring, list, set, tuple) – Comma seperated lost of fields to sort on.
sort_order (basestring) – Sort Order Ascending (asc) or Descending (des).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_by_id(id, headers=None, **request_parameters)[source]¶
Returns device details specified by device id.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_count(cm_state=None, last_contact=None, name=None, onb_state=None, pid=None, project_id=None, project_name=None, serial_number=None, smart_account_id=None, source=None, state=None, virtual_account_id=None, workflow_id=None, workflow_name=None, headers=None, **request_parameters)[source]¶
Returns the device count based on filter criteria. This is useful for pagination.
- Parameters
serial_number (basestring, list, set, tuple) – Device Serial Number.
onb_state (basestring, list, set, tuple) – Device Onboarding State.
cm_state (basestring, list, set, tuple) – Device Connection Manager State.
project_id (basestring, list, set, tuple) – Device Project Id.
workflow_id (basestring, list, set, tuple) – Device Workflow Id.
project_name (basestring, list, set, tuple) – Device Project Name.
workflow_name (basestring, list, set, tuple) – Device Workflow Name.
smart_account_id (basestring, list, set, tuple) – Device Smart Account.
virtual_account_id (basestring, list, set, tuple) – Device Virtual Account.
last_contact (bool) – Device Has Contacted lastContact > 0.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_history(serial_number, sort=None, sort_order=None, headers=None, **request_parameters)[source]¶
Returns history for a specific device. Serial number is a required parameter.
- Parameters
serial_number (basestring) – Device Serial Number.
sort (basestring, list, set, tuple) – Comma seperated list of fields to sort on.
sort_order (basestring) – Sort Order Ascending (asc) or Descending (des).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_device_by_id_from_pnp(id, headers=None, **request_parameters)[source]¶
Deletes specified device from PnP database.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- import_devices_in_bulk(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add devices to PnP in bulk.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_workflow(id, _id=None, addToInventory=None, addedOn=None, configId=None, currTaskIdx=None, description=None, endTime=None, execTime=None, imageId=None, instanceType=None, lastupdateOn=None, name=None, startTime=None, state=None, tasks=None, tenantId=None, type=None, useState=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates an existing workflow.
- Parameters
_id (string) – Workflow’s _id.
addToInventory (boolean) – Workflow’s addToInventory.
addedOn (number) – Workflow’s addedOn.
configId (string) – Workflow’s configId.
currTaskIdx (number) – Workflow’s currTaskIdx.
description (string) – Workflow’s description.
endTime (number) – Workflow’s endTime.
execTime (number) – Workflow’s execTime.
imageId (string) – Workflow’s imageId.
instanceType (string) – Workflow’s instanceType. Available values are ‘SystemWorkflow’, ‘UserWorkflow’ and ‘SystemResetWorkflow’.
lastupdateOn (number) – Workflow’s lastupdateOn.
name (string) – Workflow’s name.
startTime (number) – Workflow’s startTime.
state (string) – Workflow’s state.
tasks (list) – Workflow’s tasks (list of objects).
tenantId (string) – Workflow’s tenantId.
type (string) – Workflow’s type.
useState (string) – Workflow’s useState.
version (number) – Workflow’s version.
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_pnp_global_settings(headers=None, **request_parameters)[source]¶
Returns global PnP settings of the user.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_pnp_global_settings(_id=None, aaaCredentials=None, acceptEula=None, defaultProfile=None, savaMappingList=None, taskTimeOuts=None, tenantId=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates the user’s list of global PnP settings.
- Parameters
_id (string) – Settings’s _id.
aaaCredentials (object) – Settings’s aaaCredentials.
acceptEula (boolean) – Settings’s acceptEula.
defaultProfile (object) – Settings’s defaultProfile.
savaMappingList (list) – Settings’s savaMappingList (list of objects).
taskTimeOuts (object) – Settings’s taskTimeOuts.
tenantId (string) – Settings’s tenantId.
version (number) – Settings’s version.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_workflow_by_id(id, headers=None, **request_parameters)[source]¶
Deletes a workflow specified by id.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_device(_id=None, deviceInfo=None, runSummaryList=None, systemResetWorkflow=None, systemWorkflow=None, tenantId=None, version=None, workflow=None, workflowParameters=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds a device to the PnP database.
- Parameters
_id (string) – Device’s _id.
deviceInfo (object) – Device’s deviceInfo.
runSummaryList (list) – Device’s runSummaryList (list of objects).
systemResetWorkflow (object) – Device’s systemResetWorkflow.
systemWorkflow (object) – Device’s systemWorkflow.
tenantId (string) – Device’s tenantId.
version (number) – Device’s version.
workflow (object) – Device’s workflow.
workflowParameters (object) – Device’s workflowParameters.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- preview_config(deviceId=None, siteId=None, type=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Triggers a preview for site-based Day 0 Configuration.
- Parameters
deviceId (string) – SiteProvisionRequest’s deviceId.
siteId (string) – SiteProvisionRequest’s siteId.
type (string) – SiteProvisionRequest’s type. Available values are ‘Default’, ‘AccessPoint’, ‘StackSwitch’, ‘Sensor’ and ‘MobilityExpress’.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- claim_device(configFileUrl=None, configId=None, deviceClaimList=None, fileServiceId=None, imageId=None, imageUrl=None, populateInventory=None, projectId=None, workflowId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Claims one of more devices with specified workflow.
- Parameters
configFileUrl (string) – ClaimDeviceRequest’s configFileUrl.
configId (string) – ClaimDeviceRequest’s configId.
deviceClaimList (list) – ClaimDeviceRequest’s deviceClaimList (list of objects).
fileServiceId (string) – ClaimDeviceRequest’s fileServiceId.
imageId (string) – ClaimDeviceRequest’s imageId.
imageUrl (string) – ClaimDeviceRequest’s imageUrl.
populateInventory (boolean) – ClaimDeviceRequest’s populateInventory.
projectId (string) – ClaimDeviceRequest’s projectId.
workflowId (string) – ClaimDeviceRequest’s workflowId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_list(cm_state=None, last_contact=None, limit=None, name=None, offset=None, onb_state=None, pid=None, project_id=None, project_name=None, serial_number=None, smart_account_id=None, sort=None, sort_order=None, source=None, state=None, virtual_account_id=None, workflow_id=None, workflow_name=None, headers=None, **request_parameters)[source]¶
Returns list of devices based on filter crieteria. If a limit is not specified, it will default to return 50 devices. Pagination and sorting are also supported by this endpoint.
- Parameters
limit (int) – Limits number of results.
offset (int) – Index of first result.
sort (basestring, list, set, tuple) – Comma seperated list of fields to sort on.
sort_order (basestring) – Sort Order Ascending (asc) or Descending (des).
serial_number (basestring, list, set, tuple) – Device Serial Number.
onb_state (basestring, list, set, tuple) – Device Onboarding State.
cm_state (basestring, list, set, tuple) – Device Connection Manager State.
project_id (basestring, list, set, tuple) – Device Project Id.
workflow_id (basestring, list, set, tuple) – Device Workflow Id.
project_name (basestring, list, set, tuple) – Device Project Name.
workflow_name (basestring, list, set, tuple) – Device Workflow Name.
smart_account_id (basestring, list, set, tuple) – Device Smart Account.
virtual_account_id (basestring, list, set, tuple) – Device Virtual Account.
last_contact (bool) – Device Has Contacted lastContact > 0.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
devices¶
- class Devices[source]¶
Cisco DNA Center Devices API (version: 1.3.1).
Wraps the DNA Center Devices API and exposes the API as native Python methods that return native Python objects.
- get_module_info_by_id(id, headers=None, **request_parameters)[source]¶
Returns Module info by id.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_list(associated_wlc_ip=None, collection_interval=None, collection_status=None, error_code=None, error_description=None, family=None, hostname=None, id=None, license_name=None, license_status=None, license_type=None, location=None, location_name=None, mac_address=None, management_ip_address=None, module_equpimenttype=None, module_name=None, module_operationstatecode=None, module_partnumber=None, module_servicestate=None, module_vendorequipmenttype=None, not_synced_for_minutes=None, platform_id=None, reachability_status=None, role=None, serial_number=None, series=None, software_type=None, software_version=None, type=None, up_time=None, headers=None, **request_parameters)[source]¶
Returns list of network devices based on filter criteria such as management IP address, mac address, hostname, location name and a wide variety of additional criteria. You can also use the asterisk in any value to conduct a wildcard search. For example, to find all hostnames beginning with myhost in the IP address range 192.25.18.n, issue the following request: GET fqdnoripofdnacenterplatform/dna/intent/api/v1/network- device? hostname=myhost* & managementIpAddress=192.25.18.* For a complete list of parameter names that you can use for filtering this request, see the DNA Center API Reference documentation. Note: If id parameter is provided, it will return the list of network-devices for the given ids and ignores the other request parameters. .
- Parameters
hostname (basestring, list, set, tuple) – hostname query parameter.
management_ip_address (basestring, list, set, tuple) – managementIpAddress query parameter.
mac_address (basestring, list, set, tuple) – macAddress query parameter.
location_name (basestring, list, set, tuple) – locationName query parameter.
serial_number (basestring, list, set, tuple) – serialNumber query parameter.
location (basestring, list, set, tuple) – location query parameter.
family (basestring, list, set, tuple) – family query parameter.
series (basestring, list, set, tuple) – series query parameter.
collection_status (basestring, list, set, tuple) – collectionStatus query parameter.
collection_interval (basestring, list, set, tuple) – collectionInterval query parameter.
not_synced_for_minutes (basestring, list, set, tuple) – notSyncedForMinutes query parameter.
error_code (basestring, list, set, tuple) – errorCode query parameter.
error_description (basestring, list, set, tuple) – errorDescription query parameter.
software_version (basestring, list, set, tuple) – softwareVersion query parameter.
software_type (basestring, list, set, tuple) – softwareType query parameter.
platform_id (basestring, list, set, tuple) – platformId query parameter.
reachability_status (basestring, list, set, tuple) – reachabilityStatus query parameter.
up_time (basestring, list, set, tuple) – upTime query parameter.
associated_wlc_ip (basestring, list, set, tuple) – associatedWlcIp query parameter.
license_name (basestring, list, set, tuple) – license.name query parameter.
license_type (basestring, list, set, tuple) – license.type query parameter.
license_status (basestring, list, set, tuple) – license.status query parameter.
module_name (basestring, list, set, tuple) – module+name query parameter.
module_equpimenttype (basestring, list, set, tuple) – module+equpimenttype query parameter.
module_servicestate (basestring, list, set, tuple) – module+servicestate query parameter.
module_vendorequipmenttype(basestring – tuple): module+vendorequipmenttype query parameter.
list – tuple): module+vendorequipmenttype query parameter.
set – tuple): module+vendorequipmenttype query parameter.
- :paramtuple): module+vendorequipmenttype query
parameter.
- Parameters
module_partnumber (basestring, list, set, tuple) – module+partnumber query parameter.
module_operationstatecode (basestring, list, set, tuple) – module+operationstatecode query parameter.
id (basestring) – Accepts comma separated id’s and return list of network-devices for the given id’s. If invalid or not-found id’s are provided, null entry will be returned in the list.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_device_by_id(id, is_force_delete=None, headers=None, **request_parameters)[source]¶
Deletes the network device for the given Id.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_interface_vlans(id, interface_type=None, headers=None, **request_parameters)[source]¶
Returns Device Interface VLANs.
- Parameters
id (basestring) – id path parameter.
interface_type (basestring) – Vlan assocaited with sub- interface.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_interfaces_by_specified_range(device_id, records_to_return, start_index, headers=None, **request_parameters)[source]¶
Returns the list of interfaces for the device for the specified range.
- Parameters
device_id (basestring) – Device ID.
start_index (int) – Start index.
records_to_return (int) – Number of records to return.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_interface_count(headers=None, **request_parameters)[source]¶
Returns the count of interfaces for all devices.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_polling_interval_for_all_devices(headers=None, **request_parameters)[source]¶
Returns polling interval of all devices.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_device(cliTransport=None, computeDevice=None, enablePassword=None, extendedDiscoveryInfo=None, httpPassword=None, httpPort=None, httpSecure=None, httpUserName=None, ipAddress=None, merakiOrgId=None, netconfPort=None, password=None, serialNumber=None, snmpAuthPassphrase=None, snmpAuthProtocol=None, snmpMode=None, snmpPrivPassphrase=None, snmpPrivProtocol=None, snmpROCommunity=None, snmpRWCommunity=None, snmpRetry=None, snmpTimeout=None, snmpUserName=None, snmpVersion=None, type=None, updateMgmtIPaddressList=None, userName=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds the device with given credential.
- Parameters
cliTransport (string) – InventoryDeviceInfo’s cliTransport.
computeDevice (boolean) – InventoryDeviceInfo’s computeDevice.
enablePassword (string) – InventoryDeviceInfo’s enablePassword.
extendedDiscoveryInfo (string) – InventoryDeviceInfo’s extendedDiscoveryInfo.
httpPassword (string) – InventoryDeviceInfo’s httpPassword.
httpPort (string) – InventoryDeviceInfo’s httpPort.
httpSecure (boolean) – InventoryDeviceInfo’s httpSecure.
httpUserName (string) – InventoryDeviceInfo’s httpUserName.
ipAddress (list) – InventoryDeviceInfo’s ipAddress (list of strings).
merakiOrgId (list) – InventoryDeviceInfo’s merakiOrgId (list of strings).
netconfPort (string) – InventoryDeviceInfo’s netconfPort.
password (string) – InventoryDeviceInfo’s password.
serialNumber (string) – InventoryDeviceInfo’s serialNumber.
snmpAuthPassphrase (string) – InventoryDeviceInfo’s snmpAuthPassphrase.
snmpAuthProtocol (string) – InventoryDeviceInfo’s snmpAuthProtocol.
snmpMode (string) – InventoryDeviceInfo’s snmpMode.
snmpPrivPassphrase (string) – InventoryDeviceInfo’s snmpPrivPassphrase.
snmpPrivProtocol (string) – InventoryDeviceInfo’s snmpPrivProtocol.
snmpROCommunity (string) – InventoryDeviceInfo’s snmpROCommunity.
snmpRWCommunity (string) – InventoryDeviceInfo’s snmpRWCommunity.
snmpRetry (number) – InventoryDeviceInfo’s snmpRetry.
snmpTimeout (number) – InventoryDeviceInfo’s snmpTimeout.
snmpUserName (string) – InventoryDeviceInfo’s snmpUserName.
snmpVersion (string) – InventoryDeviceInfo’s snmpVersion.
type (string) – InventoryDeviceInfo’s type. Available values are ‘COMPUTE_DEVICE’, ‘MERAKI_DASHBOARD’, ‘NETWORK_DEVICE’ and ‘NODATACHANGE’.
updateMgmtIPaddressList (list) – InventoryDeviceInfo’s updateMgmtIPaddressList (list of objects).
userName (string) – InventoryDeviceInfo’s userName.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_interface_details(device_id, name, headers=None, **request_parameters)[source]¶
Returns interface by specified device Id and interface name.
- Parameters
device_id (basestring) – Device ID.
name (basestring) – Interface name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_interface_count_by_id(device_id, headers=None, **request_parameters)[source]¶
Returns the interface count for the given device.
- Parameters
device_id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_summary(id, headers=None, **request_parameters)[source]¶
Returns brief summary of device info such as hostname, management IP address for the given device Id.
- Parameters
id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_isis_interfaces(headers=None, **request_parameters)[source]¶
Returns the interfaces that has ISIS enabled.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_by_id(id, headers=None, **request_parameters)[source]¶
Returns the network device details for the given device ID.
- Parameters
id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_config_count(headers=None, **request_parameters)[source]¶
Returns the count of device configs.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_functional_capability_by_id(id, headers=None, **request_parameters)[source]¶
Returns functional capability with given Id.
- Parameters
id (basestring) – Functional Capability UUID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_module_count(device_id, name_list=None, operational_state_code_list=None, part_number_list=None, vendor_equipment_type_list=None, headers=None, **request_parameters)[source]¶
Returns Module Count.
- Parameters
device_id (basestring) – deviceId query parameter.
name_list (basestring, list, set, tuple) – nameList query parameter.
vendor_equipment_type_list(basestring – tuple): vendorEquipmentTypeList query parameter.
list – tuple): vendorEquipmentTypeList query parameter.
set – tuple): vendorEquipmentTypeList query parameter.
- :paramtuple): vendorEquipmentTypeList query
parameter.
- Parameters
- :paramtuple): operationalStateCodeList query
parameter.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_config_by_id(network_device_id, headers=None, **request_parameters)[source]¶
Returns the device config by specified device ID.
- Parameters
network_device_id (basestring) – networkDeviceId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_config_for_all_devices(headers=None, **request_parameters)[source]¶
Returns the config for all devices.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_interface_info_by_id(device_id, headers=None, **request_parameters)[source]¶
Returns list of interfaces by specified device.
- Parameters
device_id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- sync_devices(cliTransport=None, computeDevice=None, enablePassword=None, extendedDiscoveryInfo=None, httpPassword=None, httpPort=None, httpSecure=None, httpUserName=None, ipAddress=None, merakiOrgId=None, netconfPort=None, password=None, serialNumber=None, snmpAuthPassphrase=None, snmpAuthProtocol=None, snmpMode=None, snmpPrivPassphrase=None, snmpPrivProtocol=None, snmpROCommunity=None, snmpRWCommunity=None, snmpRetry=None, snmpTimeout=None, snmpUserName=None, snmpVersion=None, type=None, updateMgmtIPaddressList=None, userName=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Sync the devices provided as input.
- Parameters
cliTransport (string) – InventoryDeviceInfo’s cliTransport.
computeDevice (boolean) – InventoryDeviceInfo’s computeDevice.
enablePassword (string) – InventoryDeviceInfo’s enablePassword.
extendedDiscoveryInfo (string) – InventoryDeviceInfo’s extendedDiscoveryInfo.
httpPassword (string) – InventoryDeviceInfo’s httpPassword.
httpPort (string) – InventoryDeviceInfo’s httpPort.
httpSecure (boolean) – InventoryDeviceInfo’s httpSecure.
httpUserName (string) – InventoryDeviceInfo’s httpUserName.
ipAddress (list) – InventoryDeviceInfo’s ipAddress (list of strings).
merakiOrgId (list) – InventoryDeviceInfo’s merakiOrgId (list of strings).
netconfPort (string) – InventoryDeviceInfo’s netconfPort.
password (string) – InventoryDeviceInfo’s password.
serialNumber (string) – InventoryDeviceInfo’s serialNumber.
snmpAuthPassphrase (string) – InventoryDeviceInfo’s snmpAuthPassphrase.
snmpAuthProtocol (string) – InventoryDeviceInfo’s snmpAuthProtocol.
snmpMode (string) – InventoryDeviceInfo’s snmpMode.
snmpPrivPassphrase (string) – InventoryDeviceInfo’s snmpPrivPassphrase.
snmpPrivProtocol (string) – InventoryDeviceInfo’s snmpPrivProtocol.
snmpROCommunity (string) – InventoryDeviceInfo’s snmpROCommunity.
snmpRWCommunity (string) – InventoryDeviceInfo’s snmpRWCommunity.
snmpRetry (number) – InventoryDeviceInfo’s snmpRetry.
snmpTimeout (number) – InventoryDeviceInfo’s snmpTimeout.
snmpUserName (string) – InventoryDeviceInfo’s snmpUserName.
snmpVersion (string) – InventoryDeviceInfo’s snmpVersion.
type (string) – InventoryDeviceInfo’s type. Available values are ‘COMPUTE_DEVICE’, ‘MERAKI_DASHBOARD’, ‘NETWORK_DEVICE’ and ‘NODATACHANGE’.
updateMgmtIPaddressList (list) – InventoryDeviceInfo’s updateMgmtIPaddressList (list of objects).
userName (string) – InventoryDeviceInfo’s userName.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_interface_by_id(id, headers=None, **request_parameters)[source]¶
Returns the interface for the given interface ID.
- Parameters
id (basestring) – Interface ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_functional_capability_for_devices(device_id, function_name=None, headers=None, **request_parameters)[source]¶
Returns the functional-capability for given devices.
- Parameters
device_id (basestring) – Accepts comma separated deviceid’s and return list of functional-capabilities for the given id’s. If invalid or not-found id’s are provided, null entry will be returned in the list.
function_name (basestring, list, set, tuple) – functionName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_interface_by_ip(ip_address, headers=None, **request_parameters)[source]¶
Returns list of interfaces by specified IP address.
- Parameters
ip_address (basestring) – IP address of the interface.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_network_device_by_ip(ip_address, headers=None, **request_parameters)[source]¶
Returns the network device by specified IP address.
- Parameters
ip_address (basestring) – Device IP address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- retrieves_all_network_devices(associated_wlc_ip=None, collection_interval=None, collection_status=None, error_code=None, family=None, hostname=None, limit=None, mac_address=None, management_ip_address=None, offset=None, platform_id=None, reachability_failure_reason=None, reachability_status=None, role=None, role_source=None, serial_number=None, series=None, software_type=None, software_version=None, type=None, up_time=None, vrf_name=None, headers=None, **request_parameters)[source]¶
Gets the list of first 500 network devices sorted lexicographically based on host name. It can be filtered using management IP address, mac address, hostname and location name. If id param is provided, it will be returning the list of network-devices for the given id’s and other request params will be ignored. In case of autocomplete request, returns the list of specified attributes.
- Parameters
vrf_name (basestring) – vrfName query parameter.
management_ip_address (basestring) – managementIpAddress query parameter.
hostname (basestring) – hostname query parameter.
mac_address (basestring) – macAddress query parameter.
family (basestring) – family query parameter.
collection_status (basestring) – collectionStatus query parameter.
collection_interval (basestring) – collectionInterval query parameter.
software_version (basestring) – softwareVersion query parameter.
software_type (basestring) – softwareType query parameter.
reachability_status (basestring) – reachabilityStatus query parameter.
reachability_failure_reason (basestring) – reachabilityFailureReason query parameter.
error_code (basestring) – errorCode query parameter.
platform_id (basestring) – platformId query parameter.
series (basestring) – series query parameter.
type (basestring) – type query parameter.
serial_number (basestring) – serialNumber query parameter.
up_time (basestring) – upTime query parameter.
role (basestring) – role query parameter.
role_source (basestring) – roleSource query parameter.
associated_wlc_ip (basestring) – associatedWlcIp query parameter.
offset (basestring) – offset query parameter.
limit (basestring) – limit query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_enrichment_details(headers=None, **request_parameters)[source]¶
Enriches a given network device context (device id or device Mac Address or device management IP address) with details about the device and neighbor topology.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_by_serial_number(serial_number, headers=None, **request_parameters)[source]¶
Returns the network device with given serial number.
- Parameters
serial_number (basestring) – Device serial number.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_network_device_by_pagination_range(records_to_return, start_index, headers=None, **request_parameters)[source]¶
Returns the list of network devices for the given pagination range.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_wireless_lan_controller_details_by_id(id, headers=None, **request_parameters)[source]¶
Returns the wireless lan controller info with given device ID.
- Parameters
id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- sync_devices_using_forcesync(force_sync=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Synchronizes the devices. If forceSync param is false (default) then the sync would run in normal priority thread. If forceSync param is true then the sync would run in high priority thread if available, else the sync will fail. Result can be seen in the child task of each device.
- Parameters
force_sync (bool) – forceSync query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_count(headers=None, **request_parameters)[source]¶
Returns the count of network devices based on the filter criteria by management IP address, mac address, hostname and location name.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_ospf_interfaces(headers=None, **request_parameters)[source]¶
Returns the interfaces that has OSPF enabled.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_polling_interval_by_id(id, headers=None, **request_parameters)[source]¶
Returns polling interval by device id.
- Parameters
id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_organization_list_for_meraki(id, headers=None, **request_parameters)[source]¶
Returns list of organizations for meraki dashboard.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_device_role(id=None, role=None, roleSource=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates the role of the device as access, core, distribution, border router.
- Parameters
id (string) – NetworkDeviceBriefNIO’s id.
role (string) – NetworkDeviceBriefNIO’s role.
roleSource (string) – NetworkDeviceBriefNIO’s roleSource.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- export_device_list(deviceUuids=None, id=None, operationEnum=None, parameters=None, password=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Exports the selected network device to a file.
- Parameters
deviceUuids (list) – ExportDeviceDTO’s deviceUuids (list of strings).
id (string) – ExportDeviceDTO’s id.
operationEnum (string) – ExportDeviceDTO’s operationEnum. Available values are ‘CREDENTIALDETAILS’ and ‘DEVICEDETAILS’.
parameters (list) – ExportDeviceDTO’s parameters (list of strings).
password (string) – ExportDeviceDTO’s password.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_modules(device_id, limit=None, name_list=None, offset=None, operational_state_code_list=None, part_number_list=None, vendor_equipment_type_list=None, headers=None, **request_parameters)[source]¶
Returns modules by specified device id.
- Parameters
device_id (basestring) – deviceId query parameter.
limit (basestring) – limit query parameter.
offset (basestring) – offset query parameter.
name_list (basestring, list, set, tuple) – nameList query parameter.
vendor_equipment_type_list(basestring – tuple): vendorEquipmentTypeList query parameter.
list – tuple): vendorEquipmentTypeList query parameter.
set – tuple): vendorEquipmentTypeList query parameter.
- :paramtuple): vendorEquipmentTypeList query
parameter.
- Parameters
- :paramtuple): operationalStateCodeList query
parameter.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_detail(identifier, search_by, timestamp=None, headers=None, **request_parameters)[source]¶
Returns detailed Network Device information retrieved by Mac Address, Device Name or UUID for any given point of time. .
- Parameters
timestamp (basestring, int) – Epoch time(in milliseconds) when the device data is required.
search_by (basestring) – MAC Address or Device Name value or UUID of the network device.
identifier (basestring) – One of keywords : macAddress or uuid or nwDeviceName.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- register_device_for_wsa(macaddress=None, serial_number=None, headers=None, **request_parameters)[source]¶
Registers a device for WSA notification.
- Parameters
serial_number (basestring) – Serial number of the device.
macaddress (basestring) – Mac addres of the device.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_all_interfaces(limit=500, offset=1, headers=None, **request_parameters)[source]¶
Returns all available interfaces. This endpoint can return a maximum of 500 interfaces.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
event_management¶
- class EventManagement[source]¶
Cisco DNA Center Event Management API (version: 1.3.1).
Wraps the DNA Center Event Management API and exposes the API as native Python methods that return native Python objects.
- count_of_event_subscriptions(event_ids, headers=None, **request_parameters)[source]¶
Returns the Count of EventSubscriptions.
- Parameters
event_ids (basestring) – List of subscriptions related to the respective eventIds.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_events(tags, event_id=' ', limit=10, offset=None, order=None, sort_by=None, headers=None, **request_parameters)[source]¶
Gets the list of registered Events with provided eventIds or tags as mandatory.
- Parameters
event_id (basestring) – The registered EventId should be provided.
tags (basestring) – The registered Tags should be provided.
offset (int) – The number of Registries to offset in the resultset whose default value 0.
limit (int) – The number of Registries to limit in the resultset whose default value 10.
sort_by (basestring) – SortBy field name.
order (basestring) – order query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_event_subscriptions(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Subscribe SubscriptionEndpoint to list of registered events.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_event_subscriptions(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Update SubscriptionEndpoint to list of registered events.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- count_of_notifications(category=None, domain=None, end_time=None, event_ids=None, severity=None, source=None, start_time=None, sub_domain=None, type=None, headers=None, **request_parameters)[source]¶
Get the Count of Published Notifications.
- Parameters
event_ids (basestring) – The registered EventIds should be provided.
start_time (basestring) – StartTime .
end_time (basestring) – endTime .
category (basestring) – category .
type (basestring) – type .
severity (basestring) – severity .
domain (basestring) – domain .
sub_domain (basestring) – subDomain .
source (basestring) – source .
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_event_subscriptions(subscriptions, headers=None, **request_parameters)[source]¶
Delete EventSubscriptions.
- Parameters
subscriptions (basestring) – List of EventSubscriptionId’s for removal.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_notifications(category=None, domain=None, end_time=None, event_ids=None, limit=20, offset=None, order=None, severity=None, sort_by=None, source=None, start_time=None, sub_domain=None, type=None, headers=None, **request_parameters)[source]¶
Get the list of Published Notifications.
- Parameters
event_ids (basestring) – The registered EventIds should be provided.
start_time (basestring) – StartTime .
end_time (basestring) – endTime .
category (basestring) – category .
type (basestring) – type .
severity (basestring) – severity .
domain (basestring) – domain .
sub_domain (basestring) – subDomain .
source (basestring) – source .
offset (int) – Offset whose default value 0.
limit (int) – Limit whose default value 10.
sort_by (basestring) – SortBy field name.
order (basestring) – order query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_status_api_for_events(execution_id, headers=None, **request_parameters)[source]¶
Get the Status of events API calls with provided executionId as mandatory path parameter.
- Parameters
execution_id (basestring) – Execution ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- count_of_events(tags, event_id=None, headers=None, **request_parameters)[source]¶
Get the count of registered events with provided eventIds or tags as mandatory.
- Parameters
event_id (basestring) – The registered EventId should be provided.
tags (basestring) – The registered Tags should be provided.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_event_subscriptions(event_ids=None, limit=10, offset=None, order=None, sort_by=None, headers=None, **request_parameters)[source]¶
Gets the list of Subscriptions’s based on provided offset and limit.
- Parameters
event_ids (basestring) – List of subscriptions related to the respective eventIds.
offset (int) – The number of Subscriptions’s to offset in the resultset whose default value 0.
limit (int) – The number of Subscriptions’s to limit in the resultset whose default value 10.
sort_by (basestring) – SortBy field name.
order (basestring) – order query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
fabric_wired¶
- class FabricWired[source]¶
Cisco DNA Center Fabric Wired API (version: 1.3.1).
Wraps the DNA Center Fabric Wired API and exposes the API as native Python methods that return native Python objects.
- delete_ip_pool_from_sda_virtual_network(ip_pool_name, virtual_network_name, headers=None, **request_parameters)[source]¶
Delete IP Pool from SDA Virtual Network.
- Parameters
ip_pool_name (basestring) – ipPoolName query parameter.
virtual_network_name (basestring) – virtualNetworkName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_edge_device(device_ipaddress, headers=None, **request_parameters)[source]¶
Delete edge device from SDA Fabric.
- Parameters
device_ipaddress (basestring) – Device IP Address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_default_authentication_profile(site_name_hierarchy, headers=None, **request_parameters)[source]¶
Delete default authentication profile from SDA Fabric.
- Parameters
site_name_hierarchy (basestring) – siteNameHierarchy query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_default_authentication_profile(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Update default authentication profile template in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_edge_device(device_ipaddress, headers=None, **request_parameters)[source]¶
Get edge device from SDA Fabric.
- Parameters
device_ipaddress (basestring) – Device IP Address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_port_assignment_for_user_device(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add Port assignment for user device in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- deletes_border_device(device_ipaddress, headers=None, **request_parameters)[source]¶
Deletes border device from SDA Fabric.
- Parameters
device_ipaddress (basestring) – Device IP Address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_edge_device(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add edge device in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_default_authentication_profile(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add default authentication profile in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_port_assignment_for_user_device(device_ip, interface_name, headers=None, **request_parameters)[source]¶
Delete Port assignment for user device in SDA Fabric.
- Parameters
device_ip (basestring) – device-ip query parameter.
interface_name (basestring) – interfaceName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_ip_pool_in_sda_virtual_network(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add IP Pool in SDA Virtual Network.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- gets_border_device_detail(device_ipaddress, headers=None, **request_parameters)[source]¶
Gets border device detail from SDA Fabric.
- Parameters
device_ipaddress (basestring) – Device IP Address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_port_assignment_for_user_device(device_ip, interface_name, headers=None, **request_parameters)[source]¶
Get Port assignment for user device in SDA Fabric.
- Parameters
device_ip (basestring) – device-ip query parameter.
interface_name (basestring) – interfaceName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_default_authentication_profile(site_name_hierarchy, headers=None, **request_parameters)[source]¶
Get default authentication profile from SDA Fabric.
- Parameters
site_name_hierarchy (basestring) – siteNameHierarchy query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- adds_border_device(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds border device in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_ip_pool_from_sda_virtual_network(ip_pool_name, virtual_network_name, headers=None, **request_parameters)[source]¶
Get IP Pool from SDA Virtual Network.
- Parameters
ip_pool_name (basestring) – ipPoolName query parameter.
virtual_network_name (basestring) – virtualNetworkName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
file¶
- class File[source]¶
Cisco DNA Center File API (version: 1.3.1).
Wraps the DNA Center File API and exposes the API as native Python methods that return native Python objects.
- get_list_of_available_namespaces(headers=None, **request_parameters)[source]¶
Returns list of available namespaces.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_list_of_files(name_space, headers=None, **request_parameters)[source]¶
Returns list of files under a specific namespace.
- Parameters
name_space (basestring) – A listing of fileId’s.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- download_a_file_by_fileid(file_id, dirpath=None, save_file=None, headers=None, **request_parameters)[source]¶
Downloads a file specified by fileId.
- Parameters
file_id (basestring) – File Identification number.
dirpath (basestring) – Directory absolute path. Defaults to os.getcwd().
save_file (bool) – Enable or disable automatic file creation of raw response.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
HTTP Response container. For more information check the urlib3 documentation
- Return type
urllib3.response.HTTPResponse
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
DownloadFailure – If was not able to download the raw
response to a file. –
issues¶
- class Issues[source]¶
Cisco DNA Center Issues API (version: 1.3.1).
Wraps the DNA Center Issues API and exposes the API as native Python methods that return native Python objects.
- get_issue_enrichment_details(headers=None, **request_parameters)[source]¶
Enriches a given network issue context (an issue id or end user’s Mac Address) with details about the issue(s), impacted hosts and suggested actions for remediation.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
network_discovery¶
- class NetworkDiscovery[source]¶
Cisco DNA Center Network Discovery API (version: 1.3.1).
Wraps the DNA Center Network Discovery API and exposes the API as native Python methods that return native Python objects.
- get_count_of_all_discovery_jobs(headers=None, **request_parameters)[source]¶
Returns the count of all available discovery jobs.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_snmp_write_community(comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, writeCommunity=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global SNMP write community.
- Parameters
comments (string) – SNMPv2WriteCommunityDTO’s comments.
credentialType (string) – SNMPv2WriteCommunityDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – SNMPv2WriteCommunityDTO’s description.
id (string) – SNMPv2WriteCommunityDTO’s id.
instanceTenantId (string) – SNMPv2WriteCommunityDTO’s instanceTenantId.
instanceUuid (string) – SNMPv2WriteCommunityDTO’s instanceUuid.
writeCommunity (string) – SNMPv2WriteCommunityDTO’s writeCommunity.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_snmpv3_credentials(authPassword=None, authType=None, comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, privacyPassword=None, privacyType=None, snmpMode=None, username=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global SNMPv3 credential.
- Parameters
authPassword (string) – SNMPv3CredentialDTO’s authPassword.
authType (string) – SNMPv3CredentialDTO’s authType. Available values are ‘SHA’ and ‘MD5’.
comments (string) – SNMPv3CredentialDTO’s comments.
credentialType (string) – SNMPv3CredentialDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – SNMPv3CredentialDTO’s description.
id (string) – SNMPv3CredentialDTO’s id.
instanceTenantId (string) – SNMPv3CredentialDTO’s instanceTenantId.
instanceUuid (string) – SNMPv3CredentialDTO’s instanceUuid.
privacyPassword (string) – SNMPv3CredentialDTO’s privacyPassword.
privacyType (string) – SNMPv3CredentialDTO’s privacyType. Available values are ‘DES’ and ‘AES128’.
snmpMode (string) – SNMPv3CredentialDTO’s snmpMode. Available values are ‘AUTHPRIV’, ‘AUTHNOPRIV’ and ‘NOAUTHNOPRIV’.
username (string) – SNMPv3CredentialDTO’s username.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_network_devices_from_discovery(id, cli_status=None, http_status=None, ip_address=None, netconf_status=None, ping_status=None, snmp_status=None, sort_by=None, sort_order=None, task_id=None, headers=None, **request_parameters)[source]¶
Returns the network devices from a discovery job based on given filters. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
task_id (basestring) – taskId query parameter.
sort_by (basestring) – sortBy query parameter.
sort_order (basestring) – sortOrder query parameter.
ip_address (basestring, list, set, tuple) – ipAddress query parameter.
ping_status (basestring, list, set, tuple) – pingStatus query parameter.
snmp_status (basestring, list, set, tuple) – snmpStatus query parameter.
cli_status (basestring, list, set, tuple) – cliStatus query parameter.
netconf_status (basestring, list, set, tuple) – netconfStatus query parameter.
http_status (basestring, list, set, tuple) – httpStatus query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_snmp_properties(headers=None, **request_parameters)[source]¶
Returns SNMP properties.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discoveries_by_range(records_to_return, start_index, headers=None, **request_parameters)[source]¶
Returns the discovery by specified range.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_discovery_by_id(id, headers=None, **request_parameters)[source]¶
Stops the discovery for the given Discovery ID and removes it. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_snmp_read_community(comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, readCommunity=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global SNMP read community.
- Parameters
comments (string) – SNMPv2ReadCommunityDTO’s comments.
credentialType (string) – SNMPv2ReadCommunityDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – SNMPv2ReadCommunityDTO’s description.
id (string) – SNMPv2ReadCommunityDTO’s id.
instanceTenantId (string) – SNMPv2ReadCommunityDTO’s instanceTenantId.
instanceUuid (string) – SNMPv2ReadCommunityDTO’s instanceUuid.
readCommunity (string) – SNMPv2ReadCommunityDTO’s readCommunity.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_credential_sub_type_by_credential_id(id, headers=None, **request_parameters)[source]¶
Returns the credential sub type for the given Id.
- Parameters
id (basestring) – Global Credential ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- start_discovery(cdpLevel=None, discoveryType=None, enablePasswordList=None, globalCredentialIdList=None, httpReadCredential=None, httpWriteCredential=None, ipAddressList=None, ipFilterList=None, lldpLevel=None, name=None, netconfPort=None, noAddNewDevice=None, parentDiscoveryId=None, passwordList=None, preferredMgmtIPMethod=None, protocolOrder=None, reDiscovery=None, retry=None, snmpAuthPassphrase=None, snmpAuthProtocol=None, snmpMode=None, snmpPrivPassphrase=None, snmpPrivProtocol=None, snmpROCommunity=None, snmpROCommunityDesc=None, snmpRWCommunity=None, snmpRWCommunityDesc=None, snmpUserName=None, snmpVersion=None, timeout=None, updateMgmtIp=None, userNameList=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Initiates discovery with the given parameters.
- Parameters
cdpLevel (number) – InventoryRequest’s cdpLevel.
discoveryType (string) – InventoryRequest’s discoveryType.
enablePasswordList (list) – InventoryRequest’s enablePasswordList (list of string, objects).
globalCredentialIdList (list) – InventoryRequest’s globalCredentialIdList (list of string, objects).
httpReadCredential (object) – InventoryRequest’s httpReadCredential.
httpWriteCredential (object) – InventoryRequest’s httpWriteCredential.
ipAddressList (string) – InventoryRequest’s ipAddressList.
ipFilterList (list) – InventoryRequest’s ipFilterList (list of string, objects).
lldpLevel (number) – InventoryRequest’s lldpLevel.
name (string) – InventoryRequest’s name.
netconfPort (string) – InventoryRequest’s netconfPort.
noAddNewDevice (boolean) – InventoryRequest’s noAddNewDevice.
parentDiscoveryId (string) – InventoryRequest’s parentDiscoveryId.
passwordList (list) – InventoryRequest’s passwordList (list of string, objects).
preferredMgmtIPMethod (string) – InventoryRequest’s preferredMgmtIPMethod.
protocolOrder (string) – InventoryRequest’s protocolOrder.
reDiscovery (boolean) – InventoryRequest’s reDiscovery.
retry (number) – InventoryRequest’s retry.
snmpAuthPassphrase (string) – InventoryRequest’s snmpAuthPassphrase.
snmpAuthProtocol (string) – InventoryRequest’s snmpAuthProtocol.
snmpMode (string) – InventoryRequest’s snmpMode.
snmpPrivPassphrase (string) – InventoryRequest’s snmpPrivPassphrase.
snmpPrivProtocol (string) – InventoryRequest’s snmpPrivProtocol.
snmpROCommunity (string) – InventoryRequest’s snmpROCommunity.
snmpROCommunityDesc (string) – InventoryRequest’s snmpROCommunityDesc.
snmpRWCommunity (string) – InventoryRequest’s snmpRWCommunity.
snmpRWCommunityDesc (string) – InventoryRequest’s snmpRWCommunityDesc.
snmpUserName (string) – InventoryRequest’s snmpUserName.
snmpVersion (string) – InventoryRequest’s snmpVersion.
timeout (number) – InventoryRequest’s timeout.
updateMgmtIp (boolean) – InventoryRequest’s updateMgmtIp.
userNameList (list) – InventoryRequest’s userNameList (list of string, objects).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_global_credentials(global_credential_id, siteUuids=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Update global credential for network devices in site(s).
- Parameters
siteUuids (list) – SitesInfoDTO’s siteUuids (list of strings).
global_credential_id (basestring) – Global credential Uuid.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discovery_by_id(id, headers=None, **request_parameters)[source]¶
Returns discovery by Discovery ID. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_snmp_read_community(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global SNMP read community.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_snmp_write_community(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global SNMP write community.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_http_read_credential(comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, password=None, port=None, secure=None, username=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global HTTP Read credential.
- Parameters
comments (string) – HTTPReadCredentialDTO’s comments.
credentialType (string) – HTTPReadCredentialDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – HTTPReadCredentialDTO’s description.
id (string) – HTTPReadCredentialDTO’s id.
instanceTenantId (string) – HTTPReadCredentialDTO’s instanceTenantId.
instanceUuid (string) – HTTPReadCredentialDTO’s instanceUuid.
password (string) – HTTPReadCredentialDTO’s password.
port (number) – HTTPReadCredentialDTO’s port.
secure (boolean) – HTTPReadCredentialDTO’s secure.
username (string) – HTTPReadCredentialDTO’s username.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- updates_discovery_by_id(attributeInfo=None, cdpLevel=None, deviceIds=None, discoveryCondition=None, discoveryStatus=None, discoveryType=None, enablePasswordList=None, globalCredentialIdList=None, httpReadCredential=None, httpWriteCredential=None, id=None, ipAddressList=None, ipFilterList=None, isAutoCdp=None, lldpLevel=None, name=None, netconfPort=None, numDevices=None, parentDiscoveryId=None, passwordList=None, preferredMgmtIPMethod=None, protocolOrder=None, retryCount=None, snmpAuthPassphrase=None, snmpAuthProtocol=None, snmpMode=None, snmpPrivPassphrase=None, snmpPrivProtocol=None, snmpRoCommunity=None, snmpRoCommunityDesc=None, snmpRwCommunity=None, snmpRwCommunityDesc=None, snmpUserName=None, timeOut=None, updateMgmtIp=None, userNameList=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Stops or starts an existing discovery.
- Parameters
attributeInfo (object) – DiscoveryNIO’s attributeInfo.
cdpLevel (number) – DiscoveryNIO’s cdpLevel.
deviceIds (string) – DiscoveryNIO’s deviceIds.
discoveryCondition (string) – DiscoveryNIO’s discoveryCondition.
discoveryStatus (string) – DiscoveryNIO’s discoveryStatus.
discoveryType (string) – DiscoveryNIO’s discoveryType.
enablePasswordList (string) – DiscoveryNIO’s enablePasswordList.
globalCredentialIdList (list) – DiscoveryNIO’s globalCredentialIdList (list of string, objects).
httpReadCredential (object) – DiscoveryNIO’s httpReadCredential.
httpWriteCredential (object) – DiscoveryNIO’s httpWriteCredential.
id (string) – DiscoveryNIO’s id.
ipAddressList (string) – DiscoveryNIO’s ipAddressList.
ipFilterList (string) – DiscoveryNIO’s ipFilterList.
isAutoCdp (boolean) – DiscoveryNIO’s isAutoCdp.
lldpLevel (number) – DiscoveryNIO’s lldpLevel.
name (string) – DiscoveryNIO’s name.
netconfPort (string) – DiscoveryNIO’s netconfPort.
numDevices (number) – DiscoveryNIO’s numDevices.
parentDiscoveryId (string) – DiscoveryNIO’s parentDiscoveryId.
passwordList (string) – DiscoveryNIO’s passwordList.
preferredMgmtIPMethod (string) – DiscoveryNIO’s preferredMgmtIPMethod.
protocolOrder (string) – DiscoveryNIO’s protocolOrder.
retryCount (number) – DiscoveryNIO’s retryCount.
snmpAuthPassphrase (string) – DiscoveryNIO’s snmpAuthPassphrase.
snmpAuthProtocol (string) – DiscoveryNIO’s snmpAuthProtocol.
snmpMode (string) – DiscoveryNIO’s snmpMode.
snmpPrivPassphrase (string) – DiscoveryNIO’s snmpPrivPassphrase.
snmpPrivProtocol (string) – DiscoveryNIO’s snmpPrivProtocol.
snmpRoCommunity (string) – DiscoveryNIO’s snmpRoCommunity.
snmpRoCommunityDesc (string) – DiscoveryNIO’s snmpRoCommunityDesc.
snmpRwCommunity (string) – DiscoveryNIO’s snmpRwCommunity.
snmpRwCommunityDesc (string) – DiscoveryNIO’s snmpRwCommunityDesc.
snmpUserName (string) – DiscoveryNIO’s snmpUserName.
timeOut (number) – DiscoveryNIO’s timeOut.
updateMgmtIp (boolean) – DiscoveryNIO’s updateMgmtIp.
userNameList (string) – DiscoveryNIO’s userNameList.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_update_snmp_properties(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds SNMP properties.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_cli_credentials(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global CLI credential.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_http_write_credentials(comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, password=None, port=None, secure=None, username=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global HTTP write credentials.
- Parameters
comments (string) – HTTPWriteCredentialDTO’s comments.
credentialType (string) – HTTPWriteCredentialDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – HTTPWriteCredentialDTO’s description.
id (string) – HTTPWriteCredentialDTO’s id.
instanceTenantId (string) – HTTPWriteCredentialDTO’s instanceTenantId.
instanceUuid (string) – HTTPWriteCredentialDTO’s instanceUuid.
password (string) – HTTPWriteCredentialDTO’s password.
port (number) – HTTPWriteCredentialDTO’s port.
secure (boolean) – HTTPWriteCredentialDTO’s secure.
username (string) – HTTPWriteCredentialDTO’s username.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discovery_jobs_by_ip(ip_address, limit=None, name=None, offset=None, headers=None, **request_parameters)[source]¶
Returns the list of discovery jobs for the given IP.
- Parameters
offset (int) – offset query parameter.
limit (int) – limit query parameter.
ip_address (basestring) – ipAddress query parameter.
name (basestring) – name query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_snmpv3_credentials(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global SNMPv3 credentials.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_devices_discovered_by_id(id, task_id=None, headers=None, **request_parameters)[source]¶
Returns the count of network devices discovered in the given discovery. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
task_id (basestring) – taskId query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_all_discovery(headers=None, **request_parameters)[source]¶
Stops all the discoveries and removes them.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_cli_credentials(comments=None, credentialType=None, description=None, enablePassword=None, id=None, instanceTenantId=None, instanceUuid=None, password=None, username=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global CLI credentials.
- Parameters
comments (string) – CLICredentialDTO’s comments.
credentialType (string) – CLICredentialDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – CLICredentialDTO’s description.
enablePassword (string) – CLICredentialDTO’s enablePassword.
id (string) – CLICredentialDTO’s id.
instanceTenantId (string) – CLICredentialDTO’s instanceTenantId.
instanceUuid (string) – CLICredentialDTO’s instanceUuid.
password (string) – CLICredentialDTO’s password.
username (string) – CLICredentialDTO’s username.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_netconf_credentials(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global netconf credentials.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_http_write_credentials(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global HTTP write credentials.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_list_of_discoveries_by_discovery_id(id, ip_address=None, limit=None, offset=None, headers=None, **request_parameters)[source]¶
Returns the list of discovery jobs for the given Discovery ID. The results can be optionally filtered based on IP. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
offset (int) – offset query parameter.
limit (int) – limit query parameter.
ip_address (basestring) – ipAddress query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discovered_devices_by_range(id, records_to_return, start_index, task_id=None, headers=None, **request_parameters)[source]¶
Returns the network devices discovered for the given discovery and for the given range. The maximum number of records that can be retrieved is 500. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
start_index (int) – Start index.
records_to_return (int) – Number of records to return.
task_id (basestring) – taskId query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_http_read_credentials(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds HTTP read credentials.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_netconf_credentials(comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, netconfPort=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global netconf credentials.
- Parameters
comments (string) – NetconfCredentialDTO’s comments.
credentialType (string) – NetconfCredentialDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – NetconfCredentialDTO’s description.
id (string) – NetconfCredentialDTO’s id.
instanceTenantId (string) – NetconfCredentialDTO’s instanceTenantId.
instanceUuid (string) – NetconfCredentialDTO’s instanceUuid.
netconfPort (string) – NetconfCredentialDTO’s netconfPort.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_global_credentials_by_id(global_credential_id, headers=None, **request_parameters)[source]¶
Deletes global credential for the given ID.
- Parameters
global_credential_id (basestring) – ID of global- credential.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_discovery_by_specified_range(records_to_delete, start_index, headers=None, **request_parameters)[source]¶
Stops discovery for the given range and removes them.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discovered_network_devices_by_discovery_id(id, task_id=None, headers=None, **request_parameters)[source]¶
Returns the network devices discovered for the given Discovery ID. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
task_id (basestring) – taskId query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_global_credentials(credential_sub_type, order=None, sort_by=None, headers=None, **request_parameters)[source]¶
Returns global credential for the given credential sub type.
- Parameters
credential_sub_type (basestring) – Credential type as CLI / SNMPV2_READ_COMMUNITY / SNMPV2_WRITE_COMMUNITY / SNMPV3 / HTTP_WRITE / HTTP_READ / NETCONF.
sort_by (basestring) – sortBy query parameter.
order (basestring) – order query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
network_settings¶
- class NetworkSettings[source]¶
Cisco DNA Center Network Settings API (version: 1.3.1).
Wraps the DNA Center Network Settings API and exposes the API as native Python methods that return native Python objects.
- get_device_credential_details(site_id=None, headers=None, **request_parameters)[source]¶
API to get device credential details.
- Parameters
site_id (basestring) – site id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_global_pool(headers=None, **request_parameters)[source]¶
API to get global pool.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_device_credential(id, headers=None, **request_parameters)[source]¶
Delete device credential.
- Parameters
id (basestring) – global credential id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_sp_profile(sp_profile_name, headers=None, **request_parameters)[source]¶
API to delete Service Provider profile (QoS).
- Parameters
sp_profile_name (basestring) – sp profile name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_service_provider_details(headers=None, **request_parameters)[source]¶
API to get service provider details (QoS).
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_global_ip_pool(id, headers=None, **request_parameters)[source]¶
API to delete global IP pool.
- Parameters
id (basestring) – global pool id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
non_fabric_wireless¶
- class NonFabricWireless[source]¶
Cisco DNA Center Non-Fabric Wireless API (version: 1.3.1).
Wraps the DNA Center Non-Fabric Wireless API and exposes the API as native Python methods that return native Python objects.
- retrieve_rf_profiles(rf_profile_name=None, headers=None, **request_parameters)[source]¶
Retrieve all RF profiles.
- Parameters
rf_profile_name (basestring) – rf-profile-name query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_and_provision_ssid(enableFabric=None, flexConnect=None, managedAPLocations=None, ssidDetails=None, ssidType=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates SSID, updates the SSID to the corresponding site profiles and provision it to the devices matching the given sites.
- Parameters
enableFabric (boolean) – enableFabric, property of the request body.
flexConnect (object) – Flex Connect Applicable for non fabric profile, property of the request body.
managedAPLocations (list) – Managed AP Locations (Enter entire Site(s) hierarchy), property of the request body (list of strings).
ssidDetails (object) – SsidDetails, property of the request body.
ssidType (string) – SSID Type, property of the request body. Available values are ‘Guest’ and ‘Enterprise’.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_rf_profiles(rf_profile_name, headers=None, **request_parameters)[source]¶
Delete RF profile(s).
- Parameters
rf_profile_name (basestring) – rf-profile-name path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_wireless_profile(profile_name=None, headers=None, **request_parameters)[source]¶
Gets either one or all the wireless network profiles if no name is provided for network-profile.
- Parameters
profile_name (basestring) – profileName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_wireless_profile(profileDetails=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates the wireless Network Profile with updated details provided. All sites to be present in the network profile should be provided.
- Parameters
profileDetails (object) – Profile Details, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_ssid_and_provision_it_to_devices(managed_aplocations, ssid_name, headers=None, **request_parameters)[source]¶
Removes SSID or WLAN from the network profile, reprovision the device(s) and deletes the SSID or WLAN from DNA Center.
- Parameters
ssid_name (basestring) – ssidName path parameter.
managed_aplocations (basestring) – managedAPLocations path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_wireless_profile(profileDetails=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates Wireless Network Profile on DNAC and associates sites and SSIDs to it.
- Parameters
profileDetails (object) – Profile Details, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_enterprise_ssid(enableBroadcastSSID=None, enableFastLane=None, enableMACFiltering=None, fastTransition=None, name=None, passphrase=None, radioPolicy=None, securityLevel=None, trafficType=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates enterprise SSID.
- Parameters
enableBroadcastSSID (boolean) – enableBroadcastSSID, property of the request body.
enableFastLane (boolean) – enableFastLane, property of the request body.
enableMACFiltering (boolean) – enableMACFiltering, property of the request body.
fastTransition (string) – Fast Transition, property of the request body. Available values are ‘Adaptive’, ‘Enable’ and ‘Disable’.
name (string) – Enter SSID Name, property of the request body. Constraints: maxLength set to 32.
passphrase (string) – Pass Phrase (Only applicable for SSID with PERSONAL security level), property of the request body. Constraints: maxLength set to 63 and minLength set to 8.
radioPolicy (string) – Radio Policy, property of the request body. Available values are ‘Dual band operation (2.4GHz and 5GHz)’, ‘Dual band operation with band select’, ‘5GHz only’ and ‘2.4GHz only’.
securityLevel (string) – Security Level, property of the request body. Available values are ‘WPA2_ENTERPRISE’, ‘WPA2_PERSONAL’ and ‘OPEN’.
trafficType (string) – Traffic Type, property of the request body. Available values are ‘voicedata’ and ‘data’.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_wireless_profile(wireless_profile_name, headers=None, **request_parameters)[source]¶
Delete the Wireless Profile from DNAC whose name is provided.
- Parameters
wireless_profile_name (basestring) – wirelessProfileName path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- provision_update(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates wireless provisioning.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_or_update_rf_profile(channelWidth=None, defaultRfProfile=None, enableBrownField=None, enableCustom=None, enableRadioTypeA=None, enableRadioTypeB=None, name=None, radioTypeAProperties=None, radioTypeBProperties=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Create or Update RF profile.
- Parameters
channelWidth (string) – Channel Width, property of the request body.
defaultRfProfile (boolean) – defaultRfProfile, property of the request body.
enableBrownField (boolean) – enableBrownField, property of the request body.
enableCustom (boolean) – enableCustom, property of the request body.
enableRadioTypeA (boolean) – enableRadioTypeA, property of the request body.
enableRadioTypeB (boolean) – enableRadioTypeB, property of the request body.
name (string) – Name, property of the request body.
radioTypeAProperties (object) – Radio Type AProperties, property of the request body.
radioTypeBProperties (object) – Radio Type BProperties, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- provision(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Provision wireless devices.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_enterprise_ssid(ssid_name, headers=None, **request_parameters)[source]¶
Deletes given enterprise SSID.
- Parameters
ssid_name (basestring) – Enter the SSID name to be deleted.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_enterprise_ssid(ssid_name=None, headers=None, **request_parameters)[source]¶
Gets either one or all the enterprise SSID.
- Parameters
ssid_name (basestring) – Enter the enterprise SSID name that needs to be retrieved. If not entered, all the enterprise SSIDs will be retrieved.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- ap_provision(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Provision wireless Access points.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
path_trace¶
- class PathTrace[source]¶
Cisco DNA Center Path Trace API (version: 1.3.1).
Wraps the DNA Center Path Trace API and exposes the API as native Python methods that return native Python objects.
- deletes_pathtrace_by_id(flow_analysis_id, headers=None, **request_parameters)[source]¶
Deletes a flow analysis request by its id.
- Parameters
flow_analysis_id (basestring) – Flow analysis request id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- retrieves_previous_pathtrace(flow_analysis_id, headers=None, **request_parameters)[source]¶
Returns result of a previously requested flow analysis by its Flow Analysis id.
- Parameters
flow_analysis_id (basestring) – Flow analysis request id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- retrives_all_previous_pathtraces_summary(dest_ip=None, dest_port=None, gt_create_time=None, last_update_time=None, limit=None, lt_create_time=None, offset=None, order=None, periodic_refresh=None, protocol=None, sort_by=None, source_ip=None, source_port=None, status=None, task_id=None, headers=None, **request_parameters)[source]¶
Returns a summary of all flow analyses stored. Results can be filtered by specified parameters.
- Parameters
periodic_refresh (bool) – Is analysis periodically refreshed?.
source_ip (basestring) – Source IP address.
dest_ip (basestring) – Destination IP address.
source_port (basestring) – Source port.
dest_port (basestring) – Destination port.
gt_create_time (basestring) – Analyses requested after this time.
lt_create_time (basestring) – Analyses requested before this time.
protocol (basestring) – protocol query parameter.
status (basestring) – status query parameter.
task_id (basestring) – Task ID.
last_update_time (basestring) – Last update time.
limit (basestring) – Number of resources returned.
offset (basestring) – Start index of resources returned (1-based).
order (basestring) – Order by this field.
sort_by (basestring) – Sort by this field.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- initiate_a_new_pathtrace(controlPath=None, destIP=None, destPort=None, inclusions=None, periodicRefresh=None, protocol=None, sourceIP=None, sourcePort=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Initiates a new flow analysis with periodic refresh and stat collection options. Returns a request id and a task id to get results and follow progress.
- Parameters
controlPath (boolean) – FlowAnalysisRequest’s controlPath.
destIP (string) – FlowAnalysisRequest’s destIP.
destPort (string) – FlowAnalysisRequest’s destPort.
inclusions (list) – FlowAnalysisRequest’s inclusions (list of strings).
periodicRefresh (boolean) – FlowAnalysisRequest’s periodicRefresh.
protocol (string) – FlowAnalysisRequest’s protocol.
sourceIP (string) – FlowAnalysisRequest’s sourceIP.
sourcePort (string) – FlowAnalysisRequest’s sourcePort.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
site_design¶
- class SiteDesign[source]¶
Cisco DNA Center Site Design API (version: 1.3.1).
Wraps the DNA Center Site Design API and exposes the API as native Python methods that return native Python objects.
- provision_nfv(provisioning=None, siteProfile=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Design and Provision single/multi NFV device with given site/area/building/floor .
- Parameters
provisioning (list) – Provisioning, property of the request body (list of objects).
siteProfile (list) – Site Profile, property of the request body (list of objects).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- nfv_provisioning_detail(device_ip=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Checks the provisioning detail of an ENCS device including log information.
- Parameters
device_ip (string) – Device Ip, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_details_by_ip(device_ip, headers=None, **request_parameters)[source]¶
Returns provisioning device information for the specified IP address.
- Parameters
device_ip (basestring) – Device to which the site has to be assigned.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
sites¶
- class Sites[source]¶
Cisco DNA Center Sites API (version: 1.3.1).
Wraps the DNA Center Sites API and exposes the API as native Python methods that return native Python objects.
- get_site(limit=None, name=None, offset=None, site_id=None, type=None, headers=None, **request_parameters)[source]¶
Get site with area/building/floor with specified hierarchy.
- Parameters
name (basestring) – siteNameHierarchy (ex: global/groupName).
site_id (basestring) – site id.
type (basestring) – type (ex: area, building, floor).
offset (basestring) – offset/starting row.
limit (basestring) – Number of sites to be retrieved.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_site(site_id, site=None, type=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Update site area/building/floor with specified hierarchy and new values.
- Parameters
site (object) – Site, property of the request body.
type (string) – Type, property of the request body. Available values are ‘area’, ‘building’ and ‘floor’.
site_id (basestring) – site id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_membership(site_id, headers=None, **request_parameters)[source]¶
Getting the site children details and device details.
- Parameters
site_id (basestring) – site id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_site_health(timestamp=None, headers=None, **request_parameters)[source]¶
Returns Overall Health information for all sites.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_site(site_id, headers=None, **request_parameters)[source]¶
Delete site with area/building/floor by siteId.
- Parameters
site_id (basestring) – site id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- assign_device_to_site(site_id, device=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Assigns list of devices to a site.
- Parameters
device (list) – Device, property of the request body (list of objects).
site_id (basestring) – Site id to which the device is assigned.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_site(site=None, type=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates site with area/building/floor with specified hierarchy.
- Parameters
site (object) – Site, property of the request body.
type (string) – Type, property of the request body. Available values are ‘area’, ‘building’ and ‘floor’.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_site_count(site_id=None, headers=None, **request_parameters)[source]¶
API to get site count .
- Parameters
site_id (basestring) – site id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
software_image_management_swim¶
- class SoftwareImageManagementSwim[source]¶
Cisco DNA Center Software Image Management (SWIM) API (version: 1.3.1).
Wraps the DNA Center Software Image Management (SWIM) API and exposes the API as native Python methods that return native Python objects.
- get_software_image_details(application_type=None, created_time=None, family=None, image_integrity_status=None, image_name=None, image_series=None, image_size_greater_than=None, image_size_lesser_than=None, image_uuid=None, is_cco_latest=None, is_cco_recommended=None, is_tagged_golden=None, limit=None, name=None, offset=None, sort_by=None, sort_order='asc', version=None, headers=None, **request_parameters)[source]¶
Returns software image list based on a filter criteria. For example: “filterbyName = cat3k%”.
- Parameters
image_uuid (basestring) – imageUuid query parameter.
name (basestring) – name query parameter.
family (basestring) – family query parameter.
application_type (basestring) – applicationType query parameter.
image_integrity_status (basestring) – imageIntegrityStatus FAILURE, UNKNOWN, VERIFIED.
version (basestring) – software Image Version.
image_series (basestring) – image Series.
image_name (basestring) – image Name.
is_tagged_golden (bool) – is Tagged Golden.
is_cco_recommended (bool) – is recommended from cisco.com.
is_cco_latest (bool) – is latest from cisco.com.
created_time (int) – time in milliseconds (epoch format).
image_size_greater_than (int) – size in bytes.
image_size_lesser_than (int) – size in bytes.
sort_by (basestring) – sort results by this field.
sort_order (basestring) – sort order ‘asc’ or ‘des’. Default is asc.
limit (int) – limit query parameter.
offset (int) – offset query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- import_local_software_image(multipart_fields, multipart_monitor_callback, is_third_party=None, third_party_application_type=None, third_party_image_family=None, third_party_vendor=None, headers=None, **request_parameters)[source]¶
Fetches a software image from local file system and uploads to DNA Center. Supported software image files extensions are bin, img, tar, smu, pie, aes, iso, ova, tar_gz and qcow2.
The following code gives an example of the multipart_fields.
multipart_fields={'file': ('file.zip', open('file.zip', 'rb')} multipart_fields={'file': ('file.txt', open('file.txt', 'rb'), 'text/plain', {'X-My-Header': 'my-value'})} multipart_fields=[('images', ('foo.png', open('foo.png', 'rb'), 'image/png')), ('images', ('bar.png', open('bar.png', 'rb'), 'image/png'))]
The following example demonstrates how to use multipart_monitor_callback=create_callback to create a progress bar using clint.
from clint.textui.progress import Bar def create_callback(encoder): encoder_len = encoder.len bar = Bar(expected_size=encoder_len, filled_char="=") def callback(monitor): bar.show(monitor.bytes_read) return callback
- Parameters
is_third_party (bool) – Third party Image check.
third_party_vendor (basestring) – Third Party Vendor.
third_party_image_family (basestring) – Third Party image family.
third_party_application_type (basestring) – Third Party Application Type.
multipart_fields (dict) – Fields from which to create a multipart/form-data body.
multipart_monitor_callback (function) – function used to monitor the progress of the upload.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- trigger_software_image_distribution(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Distributes a software image on a given device. Software image must be imported successfully into DNA Center before it can be distributed.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- import_software_image_via_url(schedule_at=None, schedule_desc=None, schedule_origin=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Fetches a software image from remote file system (using URL for HTTP/FTP) and uploads to DNA Center. Supported image files extensions are bin, img, tar, smu, pie, aes, iso, ova, tar_gz and qcow2.
- Parameters
schedule_at (basestring) – Epoch Time (The number of milli-seconds since January 1 1970 UTC) at which the distribution should be scheduled (Optional) .
schedule_desc (basestring) – Custom Description (Optional).
schedule_origin (basestring) – Originator of this call (Optional).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- trigger_software_image_activation(schedule_validate=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Activates a software image on a given device. Software image must be present in the device flash.
- Parameters
schedule_validate (bool) – scheduleValidate, validates data before schedule (Optional).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
tag¶
- class Tag[source]¶
Cisco DNA Center Tag API (version: 1.3.1).
Wraps the DNA Center Tag API and exposes the API as native Python methods that return native Python objects.
- add_members_to_the_tag(id, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds members to the tag specified by id.
- Parameters
id (basestring) – Tag ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_tag(description=None, dynamicRules=None, id=None, instanceTenantId=None, name=None, systemTag=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates tag with specified tag attributes.
- Parameters
description (string) – TagDTO’s description.
dynamicRules (list) – TagDTO’s dynamicRules (list of objects).
id (string) – TagDTO’s id.
instanceTenantId (string) – TagDTO’s instanceTenantId.
name (string) – TagDTO’s name.
systemTag (boolean) – TagDTO’s systemTag.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag_member_count(id, member_type, level='0', member_association_type=None, headers=None, **request_parameters)[source]¶
Returns the number of members in a given tag.
- Parameters
id (basestring) – Tag ID.
member_type (basestring) – memberType query parameter.
member_association_type (basestring) – memberAssociationType query parameter.
level (basestring) – level query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- updates_tag_membership(memberToTags=None, memberType=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates tag membership. As part of the request payload through this API, only the specified members are added / retained to the given input tags. Possible values of memberType attribute in the request payload can be queried by using the /tag/member/type API.
- Parameters
memberToTags (array, object) – TagMemberDTO’s memberToTags.
memberType (string) – TagMemberDTO’s memberType.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_tag(description=None, dynamicRules=None, id=None, instanceTenantId=None, name=None, systemTag=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates a tag specified by id.
- Parameters
description (string) – TagDTO’s description.
dynamicRules (list) – TagDTO’s dynamicRules (list of objects).
id (string) – TagDTO’s id.
instanceTenantId (string) – TagDTO’s instanceTenantId.
name (string) – TagDTO’s name.
systemTag (boolean) – TagDTO’s systemTag.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag_count(attribute_name=None, level=None, name=None, name_space=None, size=None, system_tag=None, headers=None, **request_parameters)[source]¶
Returns tag count.
- Parameters
name (basestring) – name query parameter.
name_space (basestring) – nameSpace query parameter.
attribute_name (basestring) – attributeName query parameter.
level (basestring) – level query parameter.
size (basestring) – size in kilobytes(KB).
system_tag (basestring) – systemTag query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag_by_id(id, headers=None, **request_parameters)[source]¶
Returns tag specified by Id.
- Parameters
id (basestring) – Tag ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- remove_tag_member(id, member_id, headers=None, **request_parameters)[source]¶
Removes Tag member from the tag specified by id.
- Parameters
id (basestring) – Tag ID.
member_id (basestring) – TagMember id to be removed from tag.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag_members_by_id(id, member_type, level='0', limit=None, member_association_type=None, offset=None, headers=None, **request_parameters)[source]¶
Returns tag members specified by id.
- Parameters
id (basestring) – Tag ID.
member_type (basestring) – Entity type of the member. Possible values can be retrieved by using /tag/member/type API.
offset (basestring) – Used for pagination. It indicates the starting row number out of available member records.
limit (basestring) – Used to Number of maximum members to return in the result.
member_association_type (basestring) – Indicates how the member is associated with the tag. Possible values and description. 1) DYNAMIC : The member is associated to the tag through rules. 2) STATIC – The member is associated to the tag manually. 3) MIXED – The member is associated manually and also satisfies the rule defined for the tag.
level (basestring) – level query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag(additional_info_attributes=None, additional_info_name_space=None, field=None, level=None, limit=None, name=None, offset=None, order=None, size=None, sort_by=None, system_tag=None, headers=None, **request_parameters)[source]¶
Returns the tags for given filter criteria.
- Parameters
name (basestring) – Tag name is mandatory when filter operation is used.
additional_info_name_space (basestring) – additionalInfo.nameSpace query parameter.
additional_info_attributes (basestring) – additionalInfo.attributes query parameter.
level (basestring) – level query parameter.
offset (basestring) – offset query parameter.
limit (basestring) – limit query parameter.
size (basestring) – size in kilobytes(KB).
field (basestring) – Available field names are :’name,id,p arentId,type,additionalInfo.nameSpace,ad ditionalInfo.attributes’.
sort_by (basestring) – Only supported attribute is name. SortyBy is mandatory when order is used.
order (basestring) – Available values are asc and des.
system_tag (basestring) – systemTag query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_tag(id, headers=None, **request_parameters)[source]¶
Deletes a tag specified by id.
- Parameters
id (basestring) – Tag ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag_resource_types(headers=None, **request_parameters)[source]¶
Returns list of supported resource types.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
task¶
- class Task[source]¶
Cisco DNA Center Task API (version: 1.3.1).
Wraps the DNA Center Task API and exposes the API as native Python methods that return native Python objects.
- get_task_count(data=None, end_time=None, error_code=None, failure_reason=None, is_error=None, parent_id=None, progress=None, service_type=None, start_time=None, username=None, headers=None, **request_parameters)[source]¶
Returns Task count.
- Parameters
start_time (basestring) – This is the epoch start time from which tasks need to be fetched.
end_time (basestring) – This is the epoch end time upto which audit records need to be fetched.
data (basestring) – Fetch tasks that contains this data.
error_code (basestring) – Fetch tasks that have this error code.
service_type (basestring) – Fetch tasks with this service type.
username (basestring) – Fetch tasks with this username.
progress (basestring) – Fetch tasks that contains this progress.
is_error (basestring) – Fetch tasks ended as success or failure. Valid values: true, false.
failure_reason (basestring) – Fetch tasks that contains this failure reason.
parent_id (basestring) – Fetch tasks that have this parent Id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_task_by_id(task_id, headers=None, **request_parameters)[source]¶
Returns a task by specified id.
- Parameters
task_id (basestring) – UUID of the Task.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tasks(data=None, end_time=None, error_code=None, failure_reason=None, is_error=None, limit=None, offset=None, order=None, parent_id=None, progress=None, service_type=None, sort_by=None, start_time=None, username=None, headers=None, **request_parameters)[source]¶
Returns task(s) based on filter criteria.
- Parameters
start_time (basestring) – This is the epoch start time from which tasks need to be fetched.
end_time (basestring) – This is the epoch end time upto which audit records need to be fetched.
data (basestring) – Fetch tasks that contains this data.
error_code (basestring) – Fetch tasks that have this error code.
service_type (basestring) – Fetch tasks with this service type.
username (basestring) – Fetch tasks with this username.
progress (basestring) – Fetch tasks that contains this progress.
is_error (basestring) – Fetch tasks ended as success or failure. Valid values: true, false.
failure_reason (basestring) – Fetch tasks that contains this failure reason.
parent_id (basestring) – Fetch tasks that have this parent Id.
offset (basestring) – offset query parameter.
limit (basestring) – limit query parameter.
sort_by (basestring) – Sort results by this field.
order (basestring) – Sort order asc or dsc.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_task_tree(task_id, headers=None, **request_parameters)[source]¶
Returns a task with its children tasks by based on their id.
- Parameters
task_id (basestring) – UUID of the Task.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_task_by_operationid(limit, offset, operation_id, headers=None, **request_parameters)[source]¶
Returns root tasks associated with an Operationid.
- Parameters
operation_id (basestring) – operationId path parameter.
offset (int) – Index, minimum value is 0.
limit (int) – The maximum value of {limit} supported is 500. Base 1 indexing for {limit}, minimum value is 1.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
topology¶
- class Topology[source]¶
Cisco DNA Center Topology API (version: 1.3.1).
Wraps the DNA Center Topology API and exposes the API as native Python methods that return native Python objects.
- get_vlan_details(headers=None, **request_parameters)[source]¶
Returns the list of VLAN names.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_site_topology(headers=None, **request_parameters)[source]¶
Returns site topology.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_physical_topology(node_type=None, headers=None, **request_parameters)[source]¶
Returns the raw physical topology by specified criteria of nodeType.
- Parameters
node_type (basestring) – nodeType query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_topology_details(vlan_id, headers=None, **request_parameters)[source]¶
Returns Layer 2 network topology by specified VLAN ID.
- Parameters
vlan_id (basestring) – Vlan Name for e.g Vlan1, Vlan23 etc.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_l3_topology_details(topology_type, headers=None, **request_parameters)[source]¶
Returns the Layer 3 network topology by routing protocol.
- Parameters
topology_type (basestring) – Type of topology(OSPF,ISIS,etc).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_overall_network_health(timestamp=None, headers=None, **request_parameters)[source]¶
Returns Overall Network Health information by Device category (Access, Distribution, Core, Router, Wireless) for any given point of time.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
users¶
- class Users[source]¶
Cisco DNA Center Users API (version: 1.3.1).
Wraps the DNA Center Users API and exposes the API as native Python methods that return native Python objects.
- get_user_enrichment_details(headers=None, **request_parameters)[source]¶
Enriches a given network End User context (a network user-id or end user’s device Mac Address) with details about the user and devices that the user is connected to.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
DNACenterAPI v1.3.3¶
application_policy¶
- class ApplicationPolicy[source]¶
Cisco DNA Center Application Policy API (version: 1.3.3).
Wraps the DNA Center Application Policy API and exposes the API as native Python methods that return native Python objects.
- get_applications_count(headers=None, **request_parameters)[source]¶
Get the number of all existing applications.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- edit_application(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Edit the attributes of an existing application.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_application_set(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Create new custom application-set/s.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_application_set(id, headers=None, **request_parameters)[source]¶
Delete existing application-set by it’s id.
- Parameters
id (basestring) – id query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_applications(limit=500, name=None, offset=1, headers=None, **request_parameters)[source]¶
Get applications by offset/limit or by name.
- Parameters
offset (int) – The offset of the first application to be returned.
limit (int) – The maximum number of applications to be returned.
name (basestring) – Application’s name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_application_sets(limit=500, name=None, offset=1, headers=None, **request_parameters)[source]¶
Get appllication-sets by offset/limit or by name.
- Parameters
offset (int) – offset query parameter.
limit (int) – limit query parameter.
name (basestring) – name query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_application(id, headers=None, **request_parameters)[source]¶
Delete existing application by its id.
- Parameters
id (basestring) – Application’s Id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_application_sets_count(headers=None, **request_parameters)[source]¶
Get the number of existing application-sets .
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_application(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Create new Custom application.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
clients¶
- class Clients[source]¶
Cisco DNA Center Clients API (version: 1.3.3).
Wraps the DNA Center Clients API and exposes the API as native Python methods that return native Python objects.
- get_overall_client_health(timestamp=None, headers=None, **request_parameters)[source]¶
Returns Overall Client Health information by Client type (Wired and Wireless) for any given point of time.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_client_enrichment_details(headers=None, **request_parameters)[source]¶
Enriches a given network End User context (a network user-id or end user’s device Mac Address) with details about the user, the devices that the user is connected to and the assurance issues that the user is impacted by.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_client_detail(mac_address, timestamp=None, headers=None, **request_parameters)[source]¶
Returns detailed Client information retrieved by Mac Address for any given point of time. .
- Parameters
timestamp (basestring, int) – Epoch time(in milliseconds) when the Client health data is required.
mac_address (basestring) – MAC Address of the client.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
command_runner¶
- class CommandRunner[source]¶
Cisco DNA Center Command Runner API (version: 1.3.3).
Wraps the DNA Center Command Runner API and exposes the API as native Python methods that return native Python objects.
- get_all_keywords_of_clis_accepted(headers=None, **request_parameters)[source]¶
Get valid keywords.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- run_read_only_commands_on_devices(commands=None, description=None, deviceUuids=None, name=None, timeout=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Submit request for read-only CLIs.
- Parameters
commands (list) – CommandRunnerDTO’s commands (list of strings).
description (string) – CommandRunnerDTO’s description.
deviceUuids (list) – CommandRunnerDTO’s deviceUuids (list of strings).
name (string) – CommandRunnerDTO’s name.
timeout (number) – CommandRunnerDTO’s timeout.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
configuration_templates¶
- class ConfigurationTemplates[source]¶
Cisco DNA Center Configuration Templates API (version: 1.3.3).
Wraps the DNA Center Configuration Templates API and exposes the API as native Python methods that return native Python objects.
- create_project(createTime=None, description=None, id=None, lastUpdateTime=None, name=None, tags=None, templates=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates a new project.
- Parameters
createTime (number) – ProjectDTO’s createTime.
description (string) – ProjectDTO’s description.
id (string) – ProjectDTO’s id.
lastUpdateTime (number) – ProjectDTO’s lastUpdateTime.
name (string) – ProjectDTO’s name.
tags (list) – ProjectDTO’s tags (list of string, objects).
templates – Part of the JSON serializable Python object to send in the body of the Request.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- gets_the_templates_available(filter_conflicting_templates=None, product_family=None, product_series=None, product_type=None, project_id=None, software_type=None, software_version=None, headers=None, **request_parameters)[source]¶
List the templates available.
- Parameters
project_id (basestring) – projectId query parameter.
software_type (basestring) – softwareType query parameter.
software_version (basestring) – softwareVersion query parameter.
product_family (basestring) – productFamily query parameter.
product_series (basestring) – productSeries query parameter.
product_type (basestring) – productType query parameter.
filter_conflicting_templates (bool) – filterConflictingTemplates query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_projects(name=None, headers=None, **request_parameters)[source]¶
Returns the projects in the system.
- Parameters
name (basestring) – Name of project to be searched.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- version_template(comments=None, templateId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates Versioning for the current contents of the template.
- Parameters
comments (string) – TemplateVersionRequestDTO’s comments.
templateId (string) – TemplateVersionRequestDTO’s templateId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- deploy_template(forcePushTemplate=None, isComposite=None, mainTemplateId=None, memberTemplateDeploymentInfo=None, targetInfo=None, templateId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Deploys a template.
- Parameters
forcePushTemplate (boolean) – TemplateDeploymentInfo’s forcePushTemplate.
isComposite (boolean) – TemplateDeploymentInfo’s isComposite.
mainTemplateId (string) – TemplateDeploymentInfo’s mainTemplateId.
memberTemplateDeploymentInfo (list) – TemplateDeploymentInfo’s memberTemplateDeploymentInfo (list of any objects).
targetInfo (list) – TemplateDeploymentInfo’s targetInfo (list of objects).
templateId (string) – TemplateDeploymentInfo’s templateId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_template(author=None, composite=None, containingTemplates=None, createTime=None, description=None, deviceTypes=None, failurePolicy=None, id=None, lastUpdateTime=None, name=None, parentTemplateId=None, projectId=None, projectName=None, rollbackTemplateContent=None, rollbackTemplateParams=None, softwareType=None, softwareVariant=None, softwareVersion=None, tags=None, templateContent=None, templateParams=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates an existing template.
- Parameters
author (string) – TemplateDTO’s author.
composite (boolean) – TemplateDTO’s composite.
containingTemplates (list) – TemplateDTO’s containingTemplates (list of objects).
createTime (number) – TemplateDTO’s createTime.
description (string) – TemplateDTO’s description.
deviceTypes (list) – TemplateDTO’s deviceTypes (list of objects).
failurePolicy (string) – TemplateDTO’s failurePolicy. Available values are ‘ABORT_ON_ERROR’, ‘CONTINUE_ON_ERROR’, ‘ROLLBACK_ON_ERROR’, ‘ROLLBACK_TARGET_ON_ERROR’ and ‘ABORT_TARGET_ON_ERROR’.
id (string) – TemplateDTO’s id.
lastUpdateTime (number) – TemplateDTO’s lastUpdateTime.
name (string) – TemplateDTO’s name.
parentTemplateId (string) – TemplateDTO’s parentTemplateId.
projectId (string) – TemplateDTO’s projectId.
projectName (string) – TemplateDTO’s projectName.
rollbackTemplateContent (string) – TemplateDTO’s rollbackTemplateContent.
rollbackTemplateParams (list) – TemplateDTO’s rollbackTemplateParams (list of objects).
softwareType (string) – TemplateDTO’s softwareType.
softwareVariant (string) – TemplateDTO’s softwareVariant.
softwareVersion (string) – TemplateDTO’s softwareVersion.
tags (list) – TemplateDTO’s tags (list of string, objects).
templateContent (string) – TemplateDTO’s templateContent.
templateParams (list) – TemplateDTO’s templateParams (list of objects).
version (string) – TemplateDTO’s version.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_template_details(template_id, latest_version=None, headers=None, **request_parameters)[source]¶
Returns details of the specified template.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_project(createTime=None, description=None, id=None, lastUpdateTime=None, name=None, tags=None, templates=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates an existing project.
- Parameters
createTime (number) – ProjectDTO’s createTime.
description (string) – ProjectDTO’s description.
id (string) – ProjectDTO’s id.
lastUpdateTime (number) – ProjectDTO’s lastUpdateTime.
name (string) – ProjectDTO’s name.
tags (list) – ProjectDTO’s tags (list of string, objects).
templates – Part of the JSON serializable Python object to send in the body of the Request.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_template_deployment_status(deployment_id, headers=None, **request_parameters)[source]¶
Returns the status of a deployed template.
- Parameters
deployment_id (basestring) – deploymentId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_template(template_id, headers=None, **request_parameters)[source]¶
Deletes an existing template.
- Parameters
template_id (basestring) – templateId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_template_versions(template_id, headers=None, **request_parameters)[source]¶
Returns the versions of a specified template.
- Parameters
template_id (basestring) – templateId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_project(project_id, headers=None, **request_parameters)[source]¶
Deletes an existing Project.
- Parameters
project_id (basestring) – projectId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- preview_template(params=None, templateId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Previews an existing template.
- Parameters
params (object) – TemplatePreviewRequestDTO’s params.
templateId (string) – TemplatePreviewRequestDTO’s templateId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_template(project_id, author=None, composite=None, containingTemplates=None, createTime=None, description=None, deviceTypes=None, failurePolicy=None, id=None, lastUpdateTime=None, name=None, parentTemplateId=None, projectId=None, projectName=None, rollbackTemplateContent=None, rollbackTemplateParams=None, softwareType=None, softwareVariant=None, softwareVersion=None, tags=None, templateContent=None, templateParams=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates a new template.
- Parameters
author (string) – TemplateDTO’s author.
composite (boolean) – TemplateDTO’s composite.
containingTemplates (list) – TemplateDTO’s containingTemplates (list of objects).
createTime (number) – TemplateDTO’s createTime.
description (string) – TemplateDTO’s description.
deviceTypes (list) – TemplateDTO’s deviceTypes (list of objects).
failurePolicy (string) – TemplateDTO’s failurePolicy. Available values are ‘ABORT_ON_ERROR’, ‘CONTINUE_ON_ERROR’, ‘ROLLBACK_ON_ERROR’, ‘ROLLBACK_TARGET_ON_ERROR’ and ‘ABORT_TARGET_ON_ERROR’.
id (string) – TemplateDTO’s id.
lastUpdateTime (number) – TemplateDTO’s lastUpdateTime.
name (string) – TemplateDTO’s name.
parentTemplateId (string) – TemplateDTO’s parentTemplateId.
projectId (string) – TemplateDTO’s projectId.
projectName (string) – TemplateDTO’s projectName.
rollbackTemplateContent (string) – TemplateDTO’s rollbackTemplateContent.
rollbackTemplateParams (list) – TemplateDTO’s rollbackTemplateParams (list of objects).
softwareType (string) – TemplateDTO’s softwareType.
softwareVariant (string) – TemplateDTO’s softwareVariant.
softwareVersion (string) – TemplateDTO’s softwareVersion.
tags (list) – TemplateDTO’s tags (list of string, objects).
templateContent (string) – TemplateDTO’s templateContent.
templateParams (list) – TemplateDTO’s templateParams (list of objects).
version (string) – TemplateDTO’s version.
project_id (basestring) – projectId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
device_onboarding_pnp¶
- class DeviceOnboardingPnp[source]¶
Cisco DNA Center Device Onboarding (PnP) API (version: 1.3.3).
Wraps the DNA Center Device Onboarding (PnP) API and exposes the API as native Python methods that return native Python objects.
- get_sync_result_for_virtual_account(domain, name, headers=None, **request_parameters)[source]¶
Returns the summary of devices synced from the given smart account & virtual account with PnP.
- Parameters
domain (basestring) – Smart Account Domain.
name (basestring) – Virtual Account Name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- un_claim_device(deviceIdList=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Un-Claims one of more devices with specified workflow.
- Parameters
deviceIdList (list) – UnclaimRequest’s deviceIdList (list of string, objects).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_device(id, _id=None, deviceInfo=None, runSummaryList=None, systemResetWorkflow=None, systemWorkflow=None, tenantId=None, version=None, workflow=None, workflowParameters=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates device details specified by device id in PnP database.
- Parameters
_id (string) – Device’s _id.
deviceInfo (object) – Device’s deviceInfo.
runSummaryList (list) – Device’s runSummaryList (list of objects).
systemResetWorkflow (object) – Device’s systemResetWorkflow.
systemWorkflow (object) – Device’s systemWorkflow.
tenantId (string) – Device’s tenantId.
version (number) – Device’s version.
workflow (object) – Device’s workflow.
workflowParameters (object) – Device’s workflowParameters.
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- import_devices_in_bulk(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add devices to PnP in bulk.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_virtual_account(autoSyncPeriod=None, ccoUser=None, expiry=None, lastSync=None, profile=None, smartAccountId=None, syncResult=None, syncResultStr=None, syncStartTime=None, syncStatus=None, tenantId=None, token=None, virtualAccountId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Registers a Smart Account, Virtual Account and the relevant server profile info with the PnP System & database. The devices present in the registered virtual account are synced with the PnP database as well. The response payload returns the new profile.
- Parameters
autoSyncPeriod (number) – SAVAMapping’s autoSyncPeriod.
ccoUser (string) – SAVAMapping’s ccoUser.
expiry (number) – SAVAMapping’s expiry.
lastSync (number) – SAVAMapping’s lastSync.
profile (object) – SAVAMapping’s profile.
smartAccountId (string) – SAVAMapping’s smartAccountId.
syncResult (object) – SAVAMapping’s syncResult.
syncResultStr (string) – SAVAMapping’s syncResultStr.
syncStartTime (number) – SAVAMapping’s syncStartTime.
syncStatus (string) – SAVAMapping’s syncStatus. Available values are ‘NOT_SYNCED’, ‘SYNCING’, ‘SUCCESS’ and ‘FAILURE’.
tenantId (string) – SAVAMapping’s tenantId.
token (string) – SAVAMapping’s token.
virtualAccountId (string) – SAVAMapping’s virtualAccountId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_workflow(id, _id=None, addToInventory=None, addedOn=None, configId=None, currTaskIdx=None, description=None, endTime=None, execTime=None, imageId=None, instanceType=None, lastupdateOn=None, name=None, startTime=None, state=None, tasks=None, tenantId=None, type=None, useState=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates an existing workflow.
- Parameters
_id (string) – Workflow’s _id.
addToInventory (boolean) – Workflow’s addToInventory.
addedOn (number) – Workflow’s addedOn.
configId (string) – Workflow’s configId.
currTaskIdx (number) – Workflow’s currTaskIdx.
description (string) – Workflow’s description.
endTime (number) – Workflow’s endTime.
execTime (number) – Workflow’s execTime.
imageId (string) – Workflow’s imageId.
instanceType (string) – Workflow’s instanceType. Available values are ‘SystemWorkflow’, ‘UserWorkflow’ and ‘SystemResetWorkflow’.
lastupdateOn (number) – Workflow’s lastupdateOn.
name (string) – Workflow’s name.
startTime (number) – Workflow’s startTime.
state (string) – Workflow’s state.
tasks (list) – Workflow’s tasks (list of objects).
tenantId (string) – Workflow’s tenantId.
type (string) – Workflow’s type.
useState (string) – Workflow’s useState.
version (number) – Workflow’s version.
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- deregister_virtual_account(domain, name, headers=None, **request_parameters)[source]¶
Deregisters the specified smart account & virtual account info and the associated device information from the PnP System & database. The devices associated with the deregistered virtual account are removed from the PnP database as well. The response payload contains the deregistered smart & virtual account information.
- Parameters
domain (basestring) – Smart Account Domain.
name (basestring) – Virtual Account Name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_smart_account_list(headers=None, **request_parameters)[source]¶
Returns the list of Smart Account domains.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- claim_a_device_to_a_site(deviceId=None, siteId=None, type=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Claim a device based on DNA-C Site based design process. Different parameters are required for different device platforms.
- Parameters
deviceId (string) – SiteProvisionRequest’s deviceId.
siteId (string) – SiteProvisionRequest’s siteId.
type (string) – SiteProvisionRequest’s type. Available values are ‘Default’, ‘AccessPoint’, ‘StackSwitch’, ‘Sensor’ and ‘MobilityExpress’.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_pnp_server_profile(autoSyncPeriod=None, ccoUser=None, expiry=None, lastSync=None, profile=None, smartAccountId=None, syncResult=None, syncResultStr=None, syncStartTime=None, syncStatus=None, tenantId=None, token=None, virtualAccountId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates the PnP Server profile in a registered Virtual Account in the PnP database. The response payload returns the updated smart & virtual account info.
- Parameters
autoSyncPeriod (number) – SAVAMapping’s autoSyncPeriod.
ccoUser (string) – SAVAMapping’s ccoUser.
expiry (number) – SAVAMapping’s expiry.
lastSync (number) – SAVAMapping’s lastSync.
profile (object) – SAVAMapping’s profile.
smartAccountId (string) – SAVAMapping’s smartAccountId.
syncResult (object) – SAVAMapping’s syncResult.
syncResultStr (string) – SAVAMapping’s syncResultStr.
syncStartTime (number) – SAVAMapping’s syncStartTime.
syncStatus (string) – SAVAMapping’s syncStatus. Available values are ‘NOT_SYNCED’, ‘SYNCING’, ‘SUCCESS’ and ‘FAILURE’.
tenantId (string) – SAVAMapping’s tenantId.
token (string) – SAVAMapping’s token.
virtualAccountId (string) – SAVAMapping’s virtualAccountId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_pnp_global_settings(headers=None, **request_parameters)[source]¶
Returns global PnP settings of the user.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_workflow_count(name=None, headers=None, **request_parameters)[source]¶
Returns the workflow count.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_virtual_account_list(domain, headers=None, **request_parameters)[source]¶
Returns list of virtual accounts associated with the specified smart account.
- Parameters
domain (basestring) – Smart Account Domain.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_workflow_by_id(id, headers=None, **request_parameters)[source]¶
Returns a workflow specified by id.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_a_workflow(_id=None, addToInventory=None, addedOn=None, configId=None, currTaskIdx=None, description=None, endTime=None, execTime=None, imageId=None, instanceType=None, lastupdateOn=None, name=None, startTime=None, state=None, tasks=None, tenantId=None, type=None, useState=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds a PnP Workflow along with the relevant tasks in the workflow into the PnP database.
- Parameters
_id (string) – Workflow’s _id.
addToInventory (boolean) – Workflow’s addToInventory.
addedOn (number) – Workflow’s addedOn.
configId (string) – Workflow’s configId.
currTaskIdx (number) – Workflow’s currTaskIdx.
description (string) – Workflow’s description.
endTime (number) – Workflow’s endTime.
execTime (number) – Workflow’s execTime.
imageId (string) – Workflow’s imageId.
instanceType (string) – Workflow’s instanceType. Available values are ‘SystemWorkflow’, ‘UserWorkflow’ and ‘SystemResetWorkflow’.
lastupdateOn (number) – Workflow’s lastupdateOn.
name (string) – Workflow’s name.
startTime (number) – Workflow’s startTime.
state (string) – Workflow’s state.
tasks (list) – Workflow’s tasks (list of objects).
tenantId (string) – Workflow’s tenantId.
type (string) – Workflow’s type.
useState (string) – Workflow’s useState.
version (number) – Workflow’s version.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_pnp_global_settings(_id=None, aaaCredentials=None, acceptEula=None, defaultProfile=None, savaMappingList=None, taskTimeOuts=None, tenantId=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates the user’s list of global PnP settings.
- Parameters
_id (string) – Settings’s _id.
aaaCredentials (object) – Settings’s aaaCredentials.
acceptEula (boolean) – Settings’s acceptEula.
defaultProfile (object) – Settings’s defaultProfile.
savaMappingList (list) – Settings’s savaMappingList (list of objects).
taskTimeOuts (object) – Settings’s taskTimeOuts.
tenantId (string) – Settings’s tenantId.
version (number) – Settings’s version.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- reset_device(deviceResetList=None, projectId=None, workflowId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Recovers a device from a Workflow Execution Error state.
- Parameters
deviceResetList (list) – ResetRequest’s deviceResetList (list of objects).
projectId (string) – ResetRequest’s projectId.
workflowId (string) – ResetRequest’s workflowId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- sync_virtual_account_devices(autoSyncPeriod=None, ccoUser=None, expiry=None, lastSync=None, profile=None, smartAccountId=None, syncResult=None, syncResultStr=None, syncStartTime=None, syncStatus=None, tenantId=None, token=None, virtualAccountId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Synchronizes the device info from the given smart account & virtual account with the PnP database. The response payload returns a list of synced devices.
- Parameters
autoSyncPeriod (number) – SAVAMapping’s autoSyncPeriod.
ccoUser (string) – SAVAMapping’s ccoUser.
expiry (number) – SAVAMapping’s expiry.
lastSync (number) – SAVAMapping’s lastSync.
profile (object) – SAVAMapping’s profile.
smartAccountId (string) – SAVAMapping’s smartAccountId.
syncResult (object) – SAVAMapping’s syncResult.
syncResultStr (string) – SAVAMapping’s syncResultStr.
syncStartTime (number) – SAVAMapping’s syncStartTime.
syncStatus (string) – SAVAMapping’s syncStatus. Available values are ‘NOT_SYNCED’, ‘SYNCING’, ‘SUCCESS’ and ‘FAILURE’.
tenantId (string) – SAVAMapping’s tenantId.
token (string) – SAVAMapping’s token.
virtualAccountId (string) – SAVAMapping’s virtualAccountId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_workflow_by_id(id, headers=None, **request_parameters)[source]¶
Deletes a workflow specified by id.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_workflows(limit=None, name=None, offset=None, sort=None, sort_order=None, type=None, headers=None, **request_parameters)[source]¶
Returns the list of workflows based on filter criteria. If a limit is not specified, it will default to return 50 workflows. Pagination and sorting are also supported by this endpoint.
- Parameters
limit (int) – Limits number of results.
offset (int) – Index of first result.
sort (basestring, list, set, tuple) – Comma seperated lost of fields to sort on.
sort_order (basestring) – Sort Order Ascending (asc) or Descending (des).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- preview_config(deviceId=None, siteId=None, type=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Triggers a preview for site-based Day 0 Configuration.
- Parameters
deviceId (string) – SiteProvisionRequest’s deviceId.
siteId (string) – SiteProvisionRequest’s siteId.
type (string) – SiteProvisionRequest’s type. Available values are ‘Default’, ‘AccessPoint’, ‘StackSwitch’, ‘Sensor’ and ‘MobilityExpress’.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_by_id(id, headers=None, **request_parameters)[source]¶
Returns device details specified by device id.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- claim_device(configFileUrl=None, configId=None, deviceClaimList=None, fileServiceId=None, imageId=None, imageUrl=None, populateInventory=None, projectId=None, workflowId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Claims one of more devices with specified workflow.
- Parameters
configFileUrl (string) – ClaimDeviceRequest’s configFileUrl.
configId (string) – ClaimDeviceRequest’s configId.
deviceClaimList (list) – ClaimDeviceRequest’s deviceClaimList (list of objects).
fileServiceId (string) – ClaimDeviceRequest’s fileServiceId.
imageId (string) – ClaimDeviceRequest’s imageId.
imageUrl (string) – ClaimDeviceRequest’s imageUrl.
populateInventory (boolean) – ClaimDeviceRequest’s populateInventory.
projectId (string) – ClaimDeviceRequest’s projectId.
workflowId (string) – ClaimDeviceRequest’s workflowId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_device_by_id_from_pnp(id, headers=None, **request_parameters)[source]¶
Deletes specified device from PnP database.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_list(cm_state=None, last_contact=None, limit=None, name=None, offset=None, onb_state=None, pid=None, project_id=None, project_name=None, serial_number=None, smart_account_id=None, sort=None, sort_order=None, source=None, state=None, virtual_account_id=None, workflow_id=None, workflow_name=None, headers=None, **request_parameters)[source]¶
Returns list of devices based on filter crieteria. If a limit is not specified, it will default to return 50 devices. Pagination and sorting are also supported by this endpoint.
- Parameters
limit (int) – Limits number of results.
offset (int) – Index of first result.
sort (basestring, list, set, tuple) – Comma seperated list of fields to sort on.
sort_order (basestring) – Sort Order Ascending (asc) or Descending (des).
serial_number (basestring, list, set, tuple) – Device Serial Number.
onb_state (basestring, list, set, tuple) – Device Onboarding State.
cm_state (basestring, list, set, tuple) – Device Connection Manager State.
project_id (basestring, list, set, tuple) – Device Project Id.
workflow_id (basestring, list, set, tuple) – Device Workflow Id.
project_name (basestring, list, set, tuple) – Device Project Name.
workflow_name (basestring, list, set, tuple) – Device Workflow Name.
smart_account_id (basestring, list, set, tuple) – Device Smart Account.
virtual_account_id (basestring, list, set, tuple) – Device Virtual Account.
last_contact (bool) – Device Has Contacted lastContact > 0.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_device(_id=None, deviceInfo=None, runSummaryList=None, systemResetWorkflow=None, systemWorkflow=None, tenantId=None, version=None, workflow=None, workflowParameters=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds a device to the PnP database.
- Parameters
_id (string) – Device’s _id.
deviceInfo (object) – Device’s deviceInfo.
runSummaryList (list) – Device’s runSummaryList (list of objects).
systemResetWorkflow (object) – Device’s systemResetWorkflow.
systemWorkflow (object) – Device’s systemWorkflow.
tenantId (string) – Device’s tenantId.
version (number) – Device’s version.
workflow (object) – Device’s workflow.
workflowParameters (object) – Device’s workflowParameters.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_count(cm_state=None, last_contact=None, name=None, onb_state=None, pid=None, project_id=None, project_name=None, serial_number=None, smart_account_id=None, source=None, state=None, virtual_account_id=None, workflow_id=None, workflow_name=None, headers=None, **request_parameters)[source]¶
Returns the device count based on filter criteria. This is useful for pagination.
- Parameters
serial_number (basestring, list, set, tuple) – Device Serial Number.
onb_state (basestring, list, set, tuple) – Device Onboarding State.
cm_state (basestring, list, set, tuple) – Device Connection Manager State.
project_id (basestring, list, set, tuple) – Device Project Id.
workflow_id (basestring, list, set, tuple) – Device Workflow Id.
project_name (basestring, list, set, tuple) – Device Project Name.
workflow_name (basestring, list, set, tuple) – Device Workflow Name.
smart_account_id (basestring, list, set, tuple) – Device Smart Account.
virtual_account_id (basestring, list, set, tuple) – Device Virtual Account.
last_contact (bool) – Device Has Contacted lastContact > 0.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_history(serial_number, sort=None, sort_order=None, headers=None, **request_parameters)[source]¶
Returns history for a specific device. Serial number is a required parameter.
- Parameters
serial_number (basestring) – Device Serial Number.
sort (basestring, list, set, tuple) – Comma seperated list of fields to sort on.
sort_order (basestring) – Sort Order Ascending (asc) or Descending (des).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
devices¶
- class Devices[source]¶
Cisco DNA Center Devices API (version: 1.3.3).
Wraps the DNA Center Devices API and exposes the API as native Python methods that return native Python objects.
- get_module_info_by_id(id, headers=None, **request_parameters)[source]¶
Returns Module info by id.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_list(associated_wlc_ip=None, collection_interval=None, collection_status=None, error_code=None, error_description=None, family=None, hostname=None, id=None, license_name=None, license_status=None, license_type=None, location=None, location_name=None, mac_address=None, management_ip_address=None, module_equpimenttype=None, module_name=None, module_operationstatecode=None, module_partnumber=None, module_servicestate=None, module_vendorequipmenttype=None, not_synced_for_minutes=None, platform_id=None, reachability_status=None, role=None, serial_number=None, series=None, software_type=None, software_version=None, type=None, up_time=None, headers=None, **request_parameters)[source]¶
Returns list of network devices based on filter criteria such as management IP address, mac address, hostname, location name and a wide variety of additional criteria. You can also use the asterisk in any value to conduct a wildcard search. For example, to find all hostnames beginning with myhost in the IP address range 192.25.18.n, issue the following request: GET fqdnoripofdnacenterplatform/dna/intent/api/v1/network- device? hostname=myhost* & managementIpAddress=192.25.18.* For a complete list of parameter names that you can use for filtering this request, see the DNA Center API Reference documentation. Note: If id parameter is provided, it will return the list of network-devices for the given ids and ignores the other request parameters. .
- Parameters
hostname (basestring, list, set, tuple) – hostname query parameter.
management_ip_address (basestring, list, set, tuple) – managementIpAddress query parameter.
mac_address (basestring, list, set, tuple) – macAddress query parameter.
location_name (basestring, list, set, tuple) – locationName query parameter.
serial_number (basestring, list, set, tuple) – serialNumber query parameter.
location (basestring, list, set, tuple) – location query parameter.
family (basestring, list, set, tuple) – family query parameter.
series (basestring, list, set, tuple) – series query parameter.
collection_status (basestring, list, set, tuple) – collectionStatus query parameter.
collection_interval (basestring, list, set, tuple) – collectionInterval query parameter.
not_synced_for_minutes (basestring, list, set, tuple) – notSyncedForMinutes query parameter.
error_code (basestring, list, set, tuple) – errorCode query parameter.
error_description (basestring, list, set, tuple) – errorDescription query parameter.
software_version (basestring, list, set, tuple) – softwareVersion query parameter.
software_type (basestring, list, set, tuple) – softwareType query parameter.
platform_id (basestring, list, set, tuple) – platformId query parameter.
reachability_status (basestring, list, set, tuple) – reachabilityStatus query parameter.
up_time (basestring, list, set, tuple) – upTime query parameter.
associated_wlc_ip (basestring, list, set, tuple) – associatedWlcIp query parameter.
license_name (basestring, list, set, tuple) – license.name query parameter.
license_type (basestring, list, set, tuple) – license.type query parameter.
license_status (basestring, list, set, tuple) – license.status query parameter.
module_name (basestring, list, set, tuple) – module+name query parameter.
module_equpimenttype (basestring, list, set, tuple) – module+equpimenttype query parameter.
module_servicestate (basestring, list, set, tuple) – module+servicestate query parameter.
module_vendorequipmenttype(basestring – tuple): module+vendorequipmenttype query parameter.
list – tuple): module+vendorequipmenttype query parameter.
set – tuple): module+vendorequipmenttype query parameter.
- :paramtuple): module+vendorequipmenttype query
parameter.
- Parameters
module_partnumber (basestring, list, set, tuple) – module+partnumber query parameter.
module_operationstatecode (basestring, list, set, tuple) – module+operationstatecode query parameter.
id (basestring) – Accepts comma separated id’s and return list of network-devices for the given id’s. If invalid or not-found id’s are provided, null entry will be returned in the list.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_device_by_id(id, is_force_delete=None, headers=None, **request_parameters)[source]¶
Deletes the network device for the given Id.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_interface_vlans(id, interface_type=None, headers=None, **request_parameters)[source]¶
Returns Device Interface VLANs.
- Parameters
id (basestring) – id path parameter.
interface_type (basestring) – Vlan assocaited with sub- interface.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_interfaces_by_specified_range(device_id, records_to_return, start_index, headers=None, **request_parameters)[source]¶
Returns the list of interfaces for the device for the specified range.
- Parameters
device_id (basestring) – Device ID.
start_index (int) – Start index.
records_to_return (int) – Number of records to return.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_interface_count(headers=None, **request_parameters)[source]¶
Returns the count of interfaces for all devices.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- sync_devices_using_forcesync(force_sync=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Synchronizes the devices. If forceSync param is false (default) then the sync would run in normal priority thread. If forceSync param is true then the sync would run in high priority thread if available, else the sync will fail. Result can be seen in the child task of each device.
- Parameters
force_sync (bool) – forceSync query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_polling_interval_for_all_devices(headers=None, **request_parameters)[source]¶
Returns polling interval of all devices.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_device(cliTransport=None, computeDevice=None, enablePassword=None, extendedDiscoveryInfo=None, httpPassword=None, httpPort=None, httpSecure=None, httpUserName=None, ipAddress=None, merakiOrgId=None, netconfPort=None, password=None, serialNumber=None, snmpAuthPassphrase=None, snmpAuthProtocol=None, snmpMode=None, snmpPrivPassphrase=None, snmpPrivProtocol=None, snmpROCommunity=None, snmpRWCommunity=None, snmpRetry=None, snmpTimeout=None, snmpUserName=None, snmpVersion=None, type=None, updateMgmtIPaddressList=None, userName=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds the device with given credential.
- Parameters
cliTransport (string) – InventoryDeviceInfo’s cliTransport.
computeDevice (boolean) – InventoryDeviceInfo’s computeDevice.
enablePassword (string) – InventoryDeviceInfo’s enablePassword.
extendedDiscoveryInfo (string) – InventoryDeviceInfo’s extendedDiscoveryInfo.
httpPassword (string) – InventoryDeviceInfo’s httpPassword.
httpPort (string) – InventoryDeviceInfo’s httpPort.
httpSecure (boolean) – InventoryDeviceInfo’s httpSecure.
httpUserName (string) – InventoryDeviceInfo’s httpUserName.
ipAddress (list) – InventoryDeviceInfo’s ipAddress (list of strings).
merakiOrgId (list) – InventoryDeviceInfo’s merakiOrgId (list of strings).
netconfPort (string) – InventoryDeviceInfo’s netconfPort.
password (string) – InventoryDeviceInfo’s password.
serialNumber (string) – InventoryDeviceInfo’s serialNumber.
snmpAuthPassphrase (string) – InventoryDeviceInfo’s snmpAuthPassphrase.
snmpAuthProtocol (string) – InventoryDeviceInfo’s snmpAuthProtocol.
snmpMode (string) – InventoryDeviceInfo’s snmpMode.
snmpPrivPassphrase (string) – InventoryDeviceInfo’s snmpPrivPassphrase.
snmpPrivProtocol (string) – InventoryDeviceInfo’s snmpPrivProtocol.
snmpROCommunity (string) – InventoryDeviceInfo’s snmpROCommunity.
snmpRWCommunity (string) – InventoryDeviceInfo’s snmpRWCommunity.
snmpRetry (number) – InventoryDeviceInfo’s snmpRetry.
snmpTimeout (number) – InventoryDeviceInfo’s snmpTimeout.
snmpUserName (string) – InventoryDeviceInfo’s snmpUserName.
snmpVersion (string) – InventoryDeviceInfo’s snmpVersion.
type (string) – InventoryDeviceInfo’s type. Available values are ‘COMPUTE_DEVICE’, ‘MERAKI_DASHBOARD’, ‘NETWORK_DEVICE’ and ‘NODATACHANGE’.
updateMgmtIPaddressList (list) – InventoryDeviceInfo’s updateMgmtIPaddressList (list of objects).
userName (string) – InventoryDeviceInfo’s userName.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_interface_details(device_id, name, headers=None, **request_parameters)[source]¶
Returns interface by specified device Id and interface name.
- Parameters
device_id (basestring) – Device ID.
name (basestring) – Interface name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_count(headers=None, **request_parameters)[source]¶
Returns the count of network devices based on the filter criteria by management IP address, mac address, hostname and location name.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_interface_count_by_id(device_id, headers=None, **request_parameters)[source]¶
Returns the interface count for the given device.
- Parameters
device_id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_ospf_interfaces(headers=None, **request_parameters)[source]¶
Returns the interfaces that has OSPF enabled.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_polling_interval_by_id(id, headers=None, **request_parameters)[source]¶
Returns polling interval by device id.
- Parameters
id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_summary(id, headers=None, **request_parameters)[source]¶
Returns brief summary of device info such as hostname, management IP address for the given device Id.
- Parameters
id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_organization_list_for_meraki(id, headers=None, **request_parameters)[source]¶
Returns list of organizations for meraki dashboard.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_isis_interfaces(headers=None, **request_parameters)[source]¶
Returns the interfaces that has ISIS enabled.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_config_count(headers=None, **request_parameters)[source]¶
Returns the count of device configs.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_by_id(id, headers=None, **request_parameters)[source]¶
Returns the network device details for the given device ID.
- Parameters
id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_module_count(device_id, name_list=None, operational_state_code_list=None, part_number_list=None, vendor_equipment_type_list=None, headers=None, **request_parameters)[source]¶
Returns Module Count.
- Parameters
device_id (basestring) – deviceId query parameter.
name_list (basestring, list, set, tuple) – nameList query parameter.
vendor_equipment_type_list(basestring – tuple): vendorEquipmentTypeList query parameter.
list – tuple): vendorEquipmentTypeList query parameter.
set – tuple): vendorEquipmentTypeList query parameter.
- :paramtuple): vendorEquipmentTypeList query
parameter.
- Parameters
- :paramtuple): operationalStateCodeList query
parameter.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_functional_capability_by_id(id, headers=None, **request_parameters)[source]¶
Returns functional capability with given Id.
- Parameters
id (basestring) – Functional Capability UUID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_config_by_id(network_device_id, headers=None, **request_parameters)[source]¶
Returns the device config by specified device ID.
- Parameters
network_device_id (basestring) – networkDeviceId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_device_role(id=None, role=None, roleSource=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates the role of the device as access, core, distribution, border router.
- Parameters
id (string) – NetworkDeviceBriefNIO’s id.
role (string) – NetworkDeviceBriefNIO’s role.
roleSource (string) – NetworkDeviceBriefNIO’s roleSource.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_config_for_all_devices(headers=None, **request_parameters)[source]¶
Returns the config for all devices.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_interface_info_by_id(device_id, headers=None, **request_parameters)[source]¶
Returns list of interfaces by specified device.
- Parameters
device_id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- export_device_list(deviceUuids=None, id=None, operationEnum=None, parameters=None, password=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Exports the selected network device to a file.
- Parameters
deviceUuids (list) – ExportDeviceDTO’s deviceUuids (list of strings).
id (string) – ExportDeviceDTO’s id.
operationEnum (string) – ExportDeviceDTO’s operationEnum. Available values are ‘CREDENTIALDETAILS’ and ‘DEVICEDETAILS’.
parameters (list) – ExportDeviceDTO’s parameters (list of strings).
password (string) – ExportDeviceDTO’s password.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- register_device_for_wsa(macaddress=None, serial_number=None, headers=None, **request_parameters)[source]¶
Registers a device for WSA notification.
- Parameters
serial_number (basestring) – Serial number of the device.
macaddress (basestring) – Mac addres of the device.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- sync_devices(cliTransport=None, computeDevice=None, enablePassword=None, extendedDiscoveryInfo=None, httpPassword=None, httpPort=None, httpSecure=None, httpUserName=None, ipAddress=None, merakiOrgId=None, netconfPort=None, password=None, serialNumber=None, snmpAuthPassphrase=None, snmpAuthProtocol=None, snmpMode=None, snmpPrivPassphrase=None, snmpPrivProtocol=None, snmpROCommunity=None, snmpRWCommunity=None, snmpRetry=None, snmpTimeout=None, snmpUserName=None, snmpVersion=None, type=None, updateMgmtIPaddressList=None, userName=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Sync the devices provided as input.
- Parameters
cliTransport (string) – InventoryDeviceInfo’s cliTransport.
computeDevice (boolean) – InventoryDeviceInfo’s computeDevice.
enablePassword (string) – InventoryDeviceInfo’s enablePassword.
extendedDiscoveryInfo (string) – InventoryDeviceInfo’s extendedDiscoveryInfo.
httpPassword (string) – InventoryDeviceInfo’s httpPassword.
httpPort (string) – InventoryDeviceInfo’s httpPort.
httpSecure (boolean) – InventoryDeviceInfo’s httpSecure.
httpUserName (string) – InventoryDeviceInfo’s httpUserName.
ipAddress (list) – InventoryDeviceInfo’s ipAddress (list of strings).
merakiOrgId (list) – InventoryDeviceInfo’s merakiOrgId (list of strings).
netconfPort (string) – InventoryDeviceInfo’s netconfPort.
password (string) – InventoryDeviceInfo’s password.
serialNumber (string) – InventoryDeviceInfo’s serialNumber.
snmpAuthPassphrase (string) – InventoryDeviceInfo’s snmpAuthPassphrase.
snmpAuthProtocol (string) – InventoryDeviceInfo’s snmpAuthProtocol.
snmpMode (string) – InventoryDeviceInfo’s snmpMode.
snmpPrivPassphrase (string) – InventoryDeviceInfo’s snmpPrivPassphrase.
snmpPrivProtocol (string) – InventoryDeviceInfo’s snmpPrivProtocol.
snmpROCommunity (string) – InventoryDeviceInfo’s snmpROCommunity.
snmpRWCommunity (string) – InventoryDeviceInfo’s snmpRWCommunity.
snmpRetry (number) – InventoryDeviceInfo’s snmpRetry.
snmpTimeout (number) – InventoryDeviceInfo’s snmpTimeout.
snmpUserName (string) – InventoryDeviceInfo’s snmpUserName.
snmpVersion (string) – InventoryDeviceInfo’s snmpVersion.
type (string) – InventoryDeviceInfo’s type. Available values are ‘COMPUTE_DEVICE’, ‘MERAKI_DASHBOARD’, ‘NETWORK_DEVICE’ and ‘NODATACHANGE’.
updateMgmtIPaddressList (list) – InventoryDeviceInfo’s updateMgmtIPaddressList (list of objects).
userName (string) – InventoryDeviceInfo’s userName.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_interface_by_id(id, headers=None, **request_parameters)[source]¶
Returns the interface for the given interface ID.
- Parameters
id (basestring) – Interface ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_modules(device_id, limit=None, name_list=None, offset=None, operational_state_code_list=None, part_number_list=None, vendor_equipment_type_list=None, headers=None, **request_parameters)[source]¶
Returns modules by specified device id.
- Parameters
device_id (basestring) – deviceId query parameter.
limit (basestring) – limit query parameter.
offset (basestring) – offset query parameter.
name_list (basestring, list, set, tuple) – nameList query parameter.
vendor_equipment_type_list(basestring – tuple): vendorEquipmentTypeList query parameter.
list – tuple): vendorEquipmentTypeList query parameter.
set – tuple): vendorEquipmentTypeList query parameter.
- :paramtuple): vendorEquipmentTypeList query
parameter.
- Parameters
- :paramtuple): operationalStateCodeList query
parameter.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_functional_capability_for_devices(device_id, function_name=None, headers=None, **request_parameters)[source]¶
Returns the functional-capability for given devices.
- Parameters
device_id (basestring) – Accepts comma separated deviceid’s and return list of functional-capabilities for the given id’s. If invalid or not-found id’s are provided, null entry will be returned in the list.
function_name (basestring, list, set, tuple) – functionName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_by_serial_number(serial_number, headers=None, **request_parameters)[source]¶
Returns the network device with given serial number.
- Parameters
serial_number (basestring) – Device serial number.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_interface_by_ip(ip_address, headers=None, **request_parameters)[source]¶
Returns list of interfaces by specified IP address.
- Parameters
ip_address (basestring) – IP address of the interface.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_network_device_by_ip(ip_address, headers=None, **request_parameters)[source]¶
Returns the network device by specified IP address.
- Parameters
ip_address (basestring) – Device IP address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_all_interfaces(limit=500, offset=1, headers=None, **request_parameters)[source]¶
Returns all available interfaces. This endpoint can return a maximum of 500 interfaces.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_network_device_by_pagination_range(records_to_return, start_index, headers=None, **request_parameters)[source]¶
Returns the list of network devices for the given pagination range.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_wireless_lan_controller_details_by_id(id, headers=None, **request_parameters)[source]¶
Returns the wireless lan controller info with given device ID.
- Parameters
id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- retrieves_all_network_devices(associated_wlc_ip=None, collection_interval=None, collection_status=None, error_code=None, family=None, hostname=None, limit=None, mac_address=None, management_ip_address=None, offset=None, platform_id=None, reachability_failure_reason=None, reachability_status=None, role=None, role_source=None, serial_number=None, series=None, software_type=None, software_version=None, type=None, up_time=None, vrf_name=None, headers=None, **request_parameters)[source]¶
Gets the list of first 500 network devices sorted lexicographically based on host name. It can be filtered using management IP address, mac address, hostname and location name. If id param is provided, it will be returning the list of network-devices for the given id’s and other request params will be ignored. In case of autocomplete request, returns the list of specified attributes.
- Parameters
vrf_name (basestring) – vrfName query parameter.
management_ip_address (basestring) – managementIpAddress query parameter.
hostname (basestring) – hostname query parameter.
mac_address (basestring) – macAddress query parameter.
family (basestring) – family query parameter.
collection_status (basestring) – collectionStatus query parameter.
collection_interval (basestring) – collectionInterval query parameter.
software_version (basestring) – softwareVersion query parameter.
software_type (basestring) – softwareType query parameter.
reachability_status (basestring) – reachabilityStatus query parameter.
reachability_failure_reason (basestring) – reachabilityFailureReason query parameter.
error_code (basestring) – errorCode query parameter.
platform_id (basestring) – platformId query parameter.
series (basestring) – series query parameter.
type (basestring) – type query parameter.
serial_number (basestring) – serialNumber query parameter.
up_time (basestring) – upTime query parameter.
role (basestring) – role query parameter.
role_source (basestring) – roleSource query parameter.
associated_wlc_ip (basestring) – associatedWlcIp query parameter.
offset (basestring) – offset query parameter.
limit (basestring) – limit query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_detail(identifier, search_by, timestamp=None, headers=None, **request_parameters)[source]¶
Returns detailed Network Device information retrieved by Mac Address, Device Name or UUID for any given point of time. .
- Parameters
timestamp (basestring, int) – Epoch time(in milliseconds) when the device data is required.
search_by (basestring) – MAC Address or Device Name value or UUID of the network device.
identifier (basestring) – One of keywords : macAddress or uuid or nwDeviceName.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_enrichment_details(headers=None, **request_parameters)[source]¶
Enriches a given network device context (device id or device Mac Address or device management IP address) with details about the device and neighbor topology.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
discovery¶
- class Discovery[source]¶
Cisco DNA Center Discovery API (version: 1.3.3).
Wraps the DNA Center Discovery API and exposes the API as native Python methods that return native Python objects.
- get_count_of_all_discovery_jobs(headers=None, **request_parameters)[source]¶
Returns the count of all available discovery jobs.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_netconf_credentials(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global netconf credentials.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_snmp_write_community(comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, writeCommunity=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global SNMP write community.
- Parameters
comments (string) – SNMPv2WriteCommunityDTO’s comments.
credentialType (string) – SNMPv2WriteCommunityDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – SNMPv2WriteCommunityDTO’s description.
id (string) – SNMPv2WriteCommunityDTO’s id.
instanceTenantId (string) – SNMPv2WriteCommunityDTO’s instanceTenantId.
instanceUuid (string) – SNMPv2WriteCommunityDTO’s instanceUuid.
writeCommunity (string) – SNMPv2WriteCommunityDTO’s writeCommunity.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_snmpv3_credentials(authPassword=None, authType=None, comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, privacyPassword=None, privacyType=None, snmpMode=None, username=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global SNMPv3 credential.
- Parameters
authPassword (string) – SNMPv3CredentialDTO’s authPassword.
authType (string) – SNMPv3CredentialDTO’s authType. Available values are ‘SHA’ and ‘MD5’.
comments (string) – SNMPv3CredentialDTO’s comments.
credentialType (string) – SNMPv3CredentialDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – SNMPv3CredentialDTO’s description.
id (string) – SNMPv3CredentialDTO’s id.
instanceTenantId (string) – SNMPv3CredentialDTO’s instanceTenantId.
instanceUuid (string) – SNMPv3CredentialDTO’s instanceUuid.
privacyPassword (string) – SNMPv3CredentialDTO’s privacyPassword.
privacyType (string) – SNMPv3CredentialDTO’s privacyType. Available values are ‘DES’ and ‘AES128’.
snmpMode (string) – SNMPv3CredentialDTO’s snmpMode. Available values are ‘AUTHPRIV’, ‘AUTHNOPRIV’ and ‘NOAUTHNOPRIV’.
username (string) – SNMPv3CredentialDTO’s username.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discoveries_by_range(records_to_return, start_index, headers=None, **request_parameters)[source]¶
Returns the discovery by specified range.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_network_devices_from_discovery(id, cli_status=None, http_status=None, ip_address=None, netconf_status=None, ping_status=None, snmp_status=None, sort_by=None, sort_order=None, task_id=None, headers=None, **request_parameters)[source]¶
Returns the network devices from a discovery job based on given filters. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
task_id (basestring) – taskId query parameter.
sort_by (basestring) – sortBy query parameter.
sort_order (basestring) – sortOrder query parameter.
ip_address (basestring, list, set, tuple) – ipAddress query parameter.
ping_status (basestring, list, set, tuple) – pingStatus query parameter.
snmp_status (basestring, list, set, tuple) – snmpStatus query parameter.
cli_status (basestring, list, set, tuple) – cliStatus query parameter.
netconf_status (basestring, list, set, tuple) – netconfStatus query parameter.
http_status (basestring, list, set, tuple) – httpStatus query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_snmp_properties(headers=None, **request_parameters)[source]¶
Returns SNMP properties.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_discovery_by_id(id, headers=None, **request_parameters)[source]¶
Stops the discovery for the given Discovery ID and removes it. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_snmp_read_community(comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, readCommunity=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global SNMP read community.
- Parameters
comments (string) – SNMPv2ReadCommunityDTO’s comments.
credentialType (string) – SNMPv2ReadCommunityDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – SNMPv2ReadCommunityDTO’s description.
id (string) – SNMPv2ReadCommunityDTO’s id.
instanceTenantId (string) – SNMPv2ReadCommunityDTO’s instanceTenantId.
instanceUuid (string) – SNMPv2ReadCommunityDTO’s instanceUuid.
readCommunity (string) – SNMPv2ReadCommunityDTO’s readCommunity.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_http_write_credentials(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global HTTP write credentials.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_credential_sub_type_by_credential_id(id, headers=None, **request_parameters)[source]¶
Returns the credential sub type for the given Id.
- Parameters
id (basestring) – Global Credential ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- start_discovery(cdpLevel=None, discoveryType=None, enablePasswordList=None, globalCredentialIdList=None, httpReadCredential=None, httpWriteCredential=None, ipAddressList=None, ipFilterList=None, lldpLevel=None, name=None, netconfPort=None, noAddNewDevice=None, parentDiscoveryId=None, passwordList=None, preferredMgmtIPMethod=None, protocolOrder=None, reDiscovery=None, retry=None, snmpAuthPassphrase=None, snmpAuthProtocol=None, snmpMode=None, snmpPrivPassphrase=None, snmpPrivProtocol=None, snmpROCommunity=None, snmpROCommunityDesc=None, snmpRWCommunity=None, snmpRWCommunityDesc=None, snmpUserName=None, snmpVersion=None, timeout=None, updateMgmtIp=None, userNameList=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Initiates discovery with the given parameters.
- Parameters
cdpLevel (number) – InventoryRequest’s cdpLevel.
discoveryType (string) – InventoryRequest’s discoveryType.
enablePasswordList (list) – InventoryRequest’s enablePasswordList (list of string, objects).
globalCredentialIdList (list) – InventoryRequest’s globalCredentialIdList (list of string, objects).
httpReadCredential (object) – InventoryRequest’s httpReadCredential.
httpWriteCredential (object) – InventoryRequest’s httpWriteCredential.
ipAddressList (string) – InventoryRequest’s ipAddressList.
ipFilterList (list) – InventoryRequest’s ipFilterList (list of string, objects).
lldpLevel (number) – InventoryRequest’s lldpLevel.
name (string) – InventoryRequest’s name.
netconfPort (string) – InventoryRequest’s netconfPort.
noAddNewDevice (boolean) – InventoryRequest’s noAddNewDevice.
parentDiscoveryId (string) – InventoryRequest’s parentDiscoveryId.
passwordList (list) – InventoryRequest’s passwordList (list of string, objects).
preferredMgmtIPMethod (string) – InventoryRequest’s preferredMgmtIPMethod.
protocolOrder (string) – InventoryRequest’s protocolOrder.
reDiscovery (boolean) – InventoryRequest’s reDiscovery.
retry (number) – InventoryRequest’s retry.
snmpAuthPassphrase (string) – InventoryRequest’s snmpAuthPassphrase.
snmpAuthProtocol (string) – InventoryRequest’s snmpAuthProtocol.
snmpMode (string) – InventoryRequest’s snmpMode.
snmpPrivPassphrase (string) – InventoryRequest’s snmpPrivPassphrase.
snmpPrivProtocol (string) – InventoryRequest’s snmpPrivProtocol.
snmpROCommunity (string) – InventoryRequest’s snmpROCommunity.
snmpROCommunityDesc (string) – InventoryRequest’s snmpROCommunityDesc.
snmpRWCommunity (string) – InventoryRequest’s snmpRWCommunity.
snmpRWCommunityDesc (string) – InventoryRequest’s snmpRWCommunityDesc.
snmpUserName (string) – InventoryRequest’s snmpUserName.
snmpVersion (string) – InventoryRequest’s snmpVersion.
timeout (number) – InventoryRequest’s timeout.
updateMgmtIp (boolean) – InventoryRequest’s updateMgmtIp.
userNameList (list) – InventoryRequest’s userNameList (list of string, objects).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_global_credentials(global_credential_id, siteUuids=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Update global credential for network devices in site(s).
- Parameters
siteUuids (list) – SitesInfoDTO’s siteUuids (list of strings).
global_credential_id (basestring) – Global credential Uuid.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_snmp_write_community(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global SNMP write community.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_snmp_read_community(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global SNMP read community.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discovery_by_id(id, headers=None, **request_parameters)[source]¶
Returns discovery by Discovery ID. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_http_read_credential(comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, password=None, port=None, secure=None, username=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global HTTP Read credential.
- Parameters
comments (string) – HTTPReadCredentialDTO’s comments.
credentialType (string) – HTTPReadCredentialDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – HTTPReadCredentialDTO’s description.
id (string) – HTTPReadCredentialDTO’s id.
instanceTenantId (string) – HTTPReadCredentialDTO’s instanceTenantId.
instanceUuid (string) – HTTPReadCredentialDTO’s instanceUuid.
password (string) – HTTPReadCredentialDTO’s password.
port (number) – HTTPReadCredentialDTO’s port.
secure (boolean) – HTTPReadCredentialDTO’s secure.
username (string) – HTTPReadCredentialDTO’s username.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_list_of_discoveries_by_discovery_id(id, ip_address=None, limit=None, offset=None, headers=None, **request_parameters)[source]¶
Returns the list of discovery jobs for the given Discovery ID. The results can be optionally filtered based on IP. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
offset (int) – offset query parameter.
limit (int) – limit query parameter.
ip_address (basestring) – ipAddress query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- updates_discovery_by_id(attributeInfo=None, cdpLevel=None, deviceIds=None, discoveryCondition=None, discoveryStatus=None, discoveryType=None, enablePasswordList=None, globalCredentialIdList=None, httpReadCredential=None, httpWriteCredential=None, id=None, ipAddressList=None, ipFilterList=None, isAutoCdp=None, lldpLevel=None, name=None, netconfPort=None, numDevices=None, parentDiscoveryId=None, passwordList=None, preferredMgmtIPMethod=None, protocolOrder=None, retryCount=None, snmpAuthPassphrase=None, snmpAuthProtocol=None, snmpMode=None, snmpPrivPassphrase=None, snmpPrivProtocol=None, snmpRoCommunity=None, snmpRoCommunityDesc=None, snmpRwCommunity=None, snmpRwCommunityDesc=None, snmpUserName=None, timeOut=None, updateMgmtIp=None, userNameList=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Stops or starts an existing discovery.
- Parameters
attributeInfo (object) – DiscoveryNIO’s attributeInfo.
cdpLevel (number) – DiscoveryNIO’s cdpLevel.
deviceIds (string) – DiscoveryNIO’s deviceIds.
discoveryCondition (string) – DiscoveryNIO’s discoveryCondition.
discoveryStatus (string) – DiscoveryNIO’s discoveryStatus.
discoveryType (string) – DiscoveryNIO’s discoveryType.
enablePasswordList (string) – DiscoveryNIO’s enablePasswordList.
globalCredentialIdList (list) – DiscoveryNIO’s globalCredentialIdList (list of string, objects).
httpReadCredential (object) – DiscoveryNIO’s httpReadCredential.
httpWriteCredential (object) – DiscoveryNIO’s httpWriteCredential.
id (string) – DiscoveryNIO’s id.
ipAddressList (string) – DiscoveryNIO’s ipAddressList.
ipFilterList (string) – DiscoveryNIO’s ipFilterList.
isAutoCdp (boolean) – DiscoveryNIO’s isAutoCdp.
lldpLevel (number) – DiscoveryNIO’s lldpLevel.
name (string) – DiscoveryNIO’s name.
netconfPort (string) – DiscoveryNIO’s netconfPort.
numDevices (number) – DiscoveryNIO’s numDevices.
parentDiscoveryId (string) – DiscoveryNIO’s parentDiscoveryId.
passwordList (string) – DiscoveryNIO’s passwordList.
preferredMgmtIPMethod (string) – DiscoveryNIO’s preferredMgmtIPMethod.
protocolOrder (string) – DiscoveryNIO’s protocolOrder.
retryCount (number) – DiscoveryNIO’s retryCount.
snmpAuthPassphrase (string) – DiscoveryNIO’s snmpAuthPassphrase.
snmpAuthProtocol (string) – DiscoveryNIO’s snmpAuthProtocol.
snmpMode (string) – DiscoveryNIO’s snmpMode.
snmpPrivPassphrase (string) – DiscoveryNIO’s snmpPrivPassphrase.
snmpPrivProtocol (string) – DiscoveryNIO’s snmpPrivProtocol.
snmpRoCommunity (string) – DiscoveryNIO’s snmpRoCommunity.
snmpRoCommunityDesc (string) – DiscoveryNIO’s snmpRoCommunityDesc.
snmpRwCommunity (string) – DiscoveryNIO’s snmpRwCommunity.
snmpRwCommunityDesc (string) – DiscoveryNIO’s snmpRwCommunityDesc.
snmpUserName (string) – DiscoveryNIO’s snmpUserName.
timeOut (number) – DiscoveryNIO’s timeOut.
updateMgmtIp (boolean) – DiscoveryNIO’s updateMgmtIp.
userNameList (string) – DiscoveryNIO’s userNameList.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_cli_credentials(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global CLI credential.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discovered_devices_by_range(id, records_to_return, start_index, task_id=None, headers=None, **request_parameters)[source]¶
Returns the network devices discovered for the given discovery and for the given range. The maximum number of records that can be retrieved is 500. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
start_index (int) – Start index.
records_to_return (int) – Number of records to return.
task_id (basestring) – taskId query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discovery_jobs_by_ip(ip_address, limit=None, name=None, offset=None, headers=None, **request_parameters)[source]¶
Returns the list of discovery jobs for the given IP.
- Parameters
offset (int) – offset query parameter.
limit (int) – limit query parameter.
ip_address (basestring) – ipAddress query parameter.
name (basestring) – name query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_update_snmp_properties(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds SNMP properties.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_snmpv3_credentials(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global SNMPv3 credentials.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_http_write_credentials(comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, password=None, port=None, secure=None, username=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global HTTP write credentials.
- Parameters
comments (string) – HTTPWriteCredentialDTO’s comments.
credentialType (string) – HTTPWriteCredentialDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – HTTPWriteCredentialDTO’s description.
id (string) – HTTPWriteCredentialDTO’s id.
instanceTenantId (string) – HTTPWriteCredentialDTO’s instanceTenantId.
instanceUuid (string) – HTTPWriteCredentialDTO’s instanceUuid.
password (string) – HTTPWriteCredentialDTO’s password.
port (number) – HTTPWriteCredentialDTO’s port.
secure (boolean) – HTTPWriteCredentialDTO’s secure.
username (string) – HTTPWriteCredentialDTO’s username.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_http_read_credentials(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds HTTP read credentials.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_netconf_credentials(comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, netconfPort=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global netconf credentials.
- Parameters
comments (string) – NetconfCredentialDTO’s comments.
credentialType (string) – NetconfCredentialDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – NetconfCredentialDTO’s description.
id (string) – NetconfCredentialDTO’s id.
instanceTenantId (string) – NetconfCredentialDTO’s instanceTenantId.
instanceUuid (string) – NetconfCredentialDTO’s instanceUuid.
netconfPort (string) – NetconfCredentialDTO’s netconfPort.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_discovery_by_specified_range(records_to_delete, start_index, headers=None, **request_parameters)[source]¶
Stops discovery for the given range and removes them.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_devices_discovered_by_id(id, task_id=None, headers=None, **request_parameters)[source]¶
Returns the count of network devices discovered in the given discovery. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
task_id (basestring) – taskId query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_all_discovery(headers=None, **request_parameters)[source]¶
Stops all the discoveries and removes them.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_global_credentials_by_id(global_credential_id, headers=None, **request_parameters)[source]¶
Deletes global credential for the given ID.
- Parameters
global_credential_id (basestring) – ID of global- credential.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discovered_network_devices_by_discovery_id(id, task_id=None, headers=None, **request_parameters)[source]¶
Returns the network devices discovered for the given Discovery ID. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
task_id (basestring) – taskId query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_global_credentials(credential_sub_type, order=None, sort_by=None, headers=None, **request_parameters)[source]¶
Returns global credential for the given credential sub type.
- Parameters
credential_sub_type (basestring) – Credential type as CLI / SNMPV2_READ_COMMUNITY / SNMPV2_WRITE_COMMUNITY / SNMPV3 / HTTP_WRITE / HTTP_READ / NETCONF.
sort_by (basestring) – sortBy query parameter.
order (basestring) – order query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_cli_credentials(comments=None, credentialType=None, description=None, enablePassword=None, id=None, instanceTenantId=None, instanceUuid=None, password=None, username=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global CLI credentials.
- Parameters
comments (string) – CLICredentialDTO’s comments.
credentialType (string) – CLICredentialDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – CLICredentialDTO’s description.
enablePassword (string) – CLICredentialDTO’s enablePassword.
id (string) – CLICredentialDTO’s id.
instanceTenantId (string) – CLICredentialDTO’s instanceTenantId.
instanceUuid (string) – CLICredentialDTO’s instanceUuid.
password (string) – CLICredentialDTO’s password.
username (string) – CLICredentialDTO’s username.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
event_management¶
- class EventManagement[source]¶
Cisco DNA Center Event Management API (version: 1.3.3).
Wraps the DNA Center Event Management API and exposes the API as native Python methods that return native Python objects.
- count_of_event_subscriptions(event_ids, headers=None, **request_parameters)[source]¶
Returns the Count of EventSubscriptions.
- Parameters
event_ids (basestring) – List of subscriptions related to the respective eventIds.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_events(tags, event_id=' ', limit=10, offset=None, order=None, sort_by=None, headers=None, **request_parameters)[source]¶
Gets the list of registered Events with provided eventIds or tags as mandatory.
- Parameters
event_id (basestring) – The registered EventId should be provided.
tags (basestring) – The registered Tags should be provided.
offset (int) – The number of Registries to offset in the resultset whose default value 0.
limit (int) – The number of Registries to limit in the resultset whose default value 10.
sort_by (basestring) – SortBy field name.
order (basestring) – order query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_event_subscriptions(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Subscribe SubscriptionEndpoint to list of registered events.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_event_subscriptions(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Update SubscriptionEndpoint to list of registered events.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- count_of_events(tags, event_id=None, headers=None, **request_parameters)[source]¶
Get the count of registered events with provided eventIds or tags as mandatory.
- Parameters
event_id (basestring) – The registered EventId should be provided.
tags (basestring) – The registered Tags should be provided.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- count_of_notifications(category=None, domain=None, end_time=None, event_ids=None, severity=None, source=None, start_time=None, sub_domain=None, type=None, headers=None, **request_parameters)[source]¶
Get the Count of Published Notifications.
- Parameters
event_ids (basestring) – The registered EventIds should be provided.
start_time (basestring) – StartTime .
end_time (basestring) – endTime .
category (basestring) – category .
type (basestring) – type .
severity (basestring) – severity .
domain (basestring) – domain .
sub_domain (basestring) – subDomain .
source (basestring) – source .
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_event_subscriptions(subscriptions, headers=None, **request_parameters)[source]¶
Delete EventSubscriptions.
- Parameters
subscriptions (basestring) – List of EventSubscriptionId’s for removal.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_event_subscriptions(event_ids=None, limit=10, offset=None, order=None, sort_by=None, headers=None, **request_parameters)[source]¶
Gets the list of Subscriptions’s based on provided offset and limit.
- Parameters
event_ids (basestring) – List of subscriptions related to the respective eventIds.
offset (int) – The number of Subscriptions’s to offset in the resultset whose default value 0.
limit (int) – The number of Subscriptions’s to limit in the resultset whose default value 10.
sort_by (basestring) – SortBy field name.
order (basestring) – order query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_status_api_for_events(execution_id, headers=None, **request_parameters)[source]¶
Get the Status of events API calls with provided executionId as mandatory path parameter.
- Parameters
execution_id (basestring) – Execution ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_notifications(category=None, domain=None, end_time=None, event_ids=None, limit=20, offset=None, order=None, severity=None, sort_by=None, source=None, start_time=None, sub_domain=None, type=None, headers=None, **request_parameters)[source]¶
Get the list of Published Notifications.
- Parameters
event_ids (basestring) – The registered EventIds should be provided.
start_time (basestring) – StartTime .
end_time (basestring) – endTime .
category (basestring) – category .
type (basestring) – type .
severity (basestring) – severity .
domain (basestring) – domain .
sub_domain (basestring) – subDomain .
source (basestring) – source .
offset (int) – Offset whose default value 0.
limit (int) – Limit whose default value 10.
sort_by (basestring) – SortBy field name.
order (basestring) – order query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
file¶
- class File[source]¶
Cisco DNA Center File API (version: 1.3.3).
Wraps the DNA Center File API and exposes the API as native Python methods that return native Python objects.
- get_list_of_available_namespaces(headers=None, **request_parameters)[source]¶
Returns list of available namespaces.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_list_of_files(name_space, headers=None, **request_parameters)[source]¶
Returns list of files under a specific namespace.
- Parameters
name_space (basestring) – A listing of fileId’s.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- download_a_file_by_fileid(file_id, dirpath=None, save_file=None, headers=None, **request_parameters)[source]¶
Downloads a file specified by fileId.
- Parameters
file_id (basestring) – File Identification number.
dirpath (basestring) – Directory absolute path. Defaults to os.getcwd().
save_file (bool) – Enable or disable automatic file creation of raw response.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
HTTP Response container. For more information check the urlib3 documentation
- Return type
urllib3.response.HTTPResponse
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
DownloadFailure – If was not able to download the raw
response to a file. –
issues¶
- class Issues[source]¶
Cisco DNA Center Issues API (version: 1.3.3).
Wraps the DNA Center Issues API and exposes the API as native Python methods that return native Python objects.
- get_issue_enrichment_details(headers=None, **request_parameters)[source]¶
Enriches a given network issue context (an issue id or end user’s Mac Address) with details about the issue(s), impacted hosts and suggested actions for remediation.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
network_settings¶
- class NetworkSettings[source]¶
Cisco DNA Center Network Settings API (version: 1.3.3).
Wraps the DNA Center Network Settings API and exposes the API as native Python methods that return native Python objects.
- update_global_pool(settings=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to update global pool.
- Parameters
settings (object) – Settings, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_device_credential(id, headers=None, **request_parameters)[source]¶
Delete device credential.
- Parameters
id (basestring) – global credential id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- assign_credential_to_site(site_id, cliId=None, httpRead=None, httpWrite=None, snmpV2ReadId=None, snmpV2WriteId=None, snmpV3Id=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Assign Device Credential To Site .
- Parameters
cliId (string) – Cli Id, property of the request body.
httpRead (string) – Http Read, property of the request body.
httpWrite (string) – Http Write, property of the request body.
snmpV2ReadId (string) – Snmp V2 Read Id, property of the request body.
snmpV2WriteId (string) – Snmp V2 Write Id, property of the request body.
snmpV3Id (string) – Snmp V3 Id, property of the request body.
site_id (basestring) – site id to assign credential.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_network(site_id=None, headers=None, **request_parameters)[source]¶
API to get DHCP and DNS center server details.
- Parameters
site_id (basestring) – Site id to get the network settings associated with the site.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_sp_profile(sp_profile_name, headers=None, **request_parameters)[source]¶
API to delete Service Provider profile (QoS).
- Parameters
sp_profile_name (basestring) – sp profile name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_sp_profile(settings=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to update SP profile.
- Parameters
settings (object) – Settings, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_global_ip_pool(id, headers=None, **request_parameters)[source]¶
API to delete global IP pool.
- Parameters
id (basestring) – global pool id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_device_credentials(settings=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to update device credentials.
- Parameters
settings (object) – Settings, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_network(site_id, settings=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to update network for DHCP and DNS center server settings.
- Parameters
settings (object) – Settings, property of the request body.
site_id (basestring) – Site id to update the network settings which is associated with the site.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_service_provider_details(headers=None, **request_parameters)[source]¶
API to get service provider details (QoS).
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_credential_details(site_id=None, headers=None, **request_parameters)[source]¶
API to get device credential details.
- Parameters
site_id (basestring) – Site id to retrieve the credential details associated with the site.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_sp_profile(settings=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to create service provider profile(QOS).
- Parameters
settings (object) – settings, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_global_pool(limit=None, offset=None, headers=None, **request_parameters)[source]¶
API to get global pool.
- Parameters
offset (basestring) – offset/starting row.
limit (basestring) – No of Global Pools to be retrieved.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_network(site_id, settings=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to create a network for DHCP and DNS center server settings.
- Parameters
settings (object) – Settings, property of the request body.
site_id (basestring) – Site id to which site details to associate with the network settings.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_device_credentials(settings=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to create device credentials.
- Parameters
settings (object) – Settings, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_global_pool(settings=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to create global pool.
- Parameters
settings (object) – Settings, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
path_trace¶
- class PathTrace[source]¶
Cisco DNA Center Path Trace API (version: 1.3.3).
Wraps the DNA Center Path Trace API and exposes the API as native Python methods that return native Python objects.
- retrives_all_previous_pathtraces_summary(dest_ip=None, dest_port=None, gt_create_time=None, last_update_time=None, limit=None, lt_create_time=None, offset=None, order=None, periodic_refresh=None, protocol=None, sort_by=None, source_ip=None, source_port=None, status=None, task_id=None, headers=None, **request_parameters)[source]¶
Returns a summary of all flow analyses stored. Results can be filtered by specified parameters.
- Parameters
periodic_refresh (bool) – Is analysis periodically refreshed?.
source_ip (basestring) – Source IP address.
dest_ip (basestring) – Destination IP address.
source_port (basestring) – Source port.
dest_port (basestring) – Destination port.
gt_create_time (basestring) – Analyses requested after this time.
lt_create_time (basestring) – Analyses requested before this time.
protocol (basestring) – protocol query parameter.
status (basestring) – status query parameter.
task_id (basestring) – Task ID.
last_update_time (basestring) – Last update time.
limit (basestring) – Number of resources returned.
offset (basestring) – Start index of resources returned (1-based).
order (basestring) – Order by this field.
sort_by (basestring) – Sort by this field.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- deletes_pathtrace_by_id(flow_analysis_id, headers=None, **request_parameters)[source]¶
Deletes a flow analysis request by its id.
- Parameters
flow_analysis_id (basestring) – Flow analysis request id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- retrieves_previous_pathtrace(flow_analysis_id, headers=None, **request_parameters)[source]¶
Returns result of a previously requested flow analysis by its Flow Analysis id.
- Parameters
flow_analysis_id (basestring) – Flow analysis request id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- initiate_a_new_pathtrace(controlPath=None, destIP=None, destPort=None, inclusions=None, periodicRefresh=None, protocol=None, sourceIP=None, sourcePort=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Initiates a new flow analysis with periodic refresh and stat collection options. Returns a request id and a task id to get results and follow progress.
- Parameters
controlPath (boolean) – FlowAnalysisRequest’s controlPath.
destIP (string) – FlowAnalysisRequest’s destIP.
destPort (string) – FlowAnalysisRequest’s destPort.
inclusions (list) – FlowAnalysisRequest’s inclusions (list of strings).
periodicRefresh (boolean) – FlowAnalysisRequest’s periodicRefresh.
protocol (string) – FlowAnalysisRequest’s protocol.
sourceIP (string) – FlowAnalysisRequest’s sourceIP.
sourcePort (string) – FlowAnalysisRequest’s sourcePort.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
sda¶
- class Sda[source]¶
Cisco DNA Center SDA API (version: 1.3.3).
Wraps the DNA Center SDA API and exposes the API as native Python methods that return native Python objects.
- delete_port_assignment_for_access_point(device_ip, interface_name, headers=None, **request_parameters)[source]¶
Delete Port assignment for access point in SDA Fabric.
- Parameters
device_ip (basestring) – device-ip query parameter.
interface_name (basestring) – interfaceName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_sda_fabric_info(fabric_name, headers=None, **request_parameters)[source]¶
Get SDA Fabric Info.
- Parameters
fabric_name (basestring) – Fabric Name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_vn(site_name_hierarchy, virtual_network_name, headers=None, **request_parameters)[source]¶
Get virtual network (VN) from SDA Fabric.
- Parameters
virtual_network_name (basestring) – virtualNetworkName query parameter.
site_name_hierarchy (basestring) – siteNameHierarchy query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_info(device_ipaddress, headers=None, **request_parameters)[source]¶
Get device info from SDA Fabric.
- Parameters
device_ipaddress (basestring) – Device IP Address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_ip_pool_in_sda_virtual_network(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add IP Pool in SDA Virtual Network.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_edge_device(device_ipaddress, headers=None, **request_parameters)[source]¶
Delete edge device from SDA Fabric.
- Parameters
device_ipaddress (basestring) – Device IP Address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_default_authentication_profile(site_name_hierarchy, headers=None, **request_parameters)[source]¶
Add default authentication profile in SDA Fabric.
- Parameters
site_name_hierarchy (basestring) – siteNameHierarchy query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_port_assignment_for_access_point(device_ip, interface_name, headers=None, **request_parameters)[source]¶
Get Port assignment for access point in SDA Fabric.
- Parameters
device_ip (basestring) – device-ip query parameter.
interface_name (basestring) – interfaceName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_site(site_name_hierarchy, headers=None, **request_parameters)[source]¶
Delete Site from SDA Fabric.
- Parameters
site_name_hierarchy (basestring) – Site Name Hierarchy.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_vn(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add virtual network (VN) in SDA Fabric .
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_ip_pool_from_sda_virtual_network(ip_pool_name, virtual_network_name, headers=None, **request_parameters)[source]¶
Delete IP Pool from SDA Virtual Network.
- Parameters
ip_pool_name (basestring) – ipPoolName query parameter.
virtual_network_name (basestring) – virtualNetworkName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_fabric(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_edge_device(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add edge device in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_site(site_name_hierarchy, headers=None, **request_parameters)[source]¶
Get Site info from SDA Fabric.
- Parameters
site_name_hierarchy (basestring) – Site Name Hierarchy.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_edge_device(device_ipaddress, headers=None, **request_parameters)[source]¶
Get edge device from SDA Fabric.
- Parameters
device_ipaddress (basestring) – Device IP Address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_default_authentication_profile(site_name_hierarchy, headers=None, **request_parameters)[source]¶
Get default authentication profile from SDA Fabric.
- Parameters
site_name_hierarchy (basestring) – siteNameHierarchy query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_port_assignment_for_user_device(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add Port assignment for user device in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- gets_border_device_detail(device_ipaddress, headers=None, **request_parameters)[source]¶
Gets border device detail from SDA Fabric.
- Parameters
device_ipaddress (basestring) – Device IP Address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_default_authentication_profile(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Update default authentication profile in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_control_plane_device(device_ipaddress, headers=None, **request_parameters)[source]¶
Get control plane device from SDA Fabric.
- Parameters
device_ipaddress (basestring) – Device IP Address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_port_assignment_for_user_device(device_ip, interface_name, headers=None, **request_parameters)[source]¶
Get Port assignment for user device in SDA Fabric.
- Parameters
device_ip (basestring) – device-ip query parameter.
interface_name (basestring) – interfaceName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- adds_border_device(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds border device in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_vn(site_name_hierarchy, virtual_network_name, headers=None, **request_parameters)[source]¶
Delete virtual network (VN) from SDA Fabric .
- Parameters
virtual_network_name (basestring) – virtualNetworkName query parameter.
site_name_hierarchy (basestring) – siteNameHierarchy query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_port_assignment_for_user_device(device_ip, interface_name, headers=None, **request_parameters)[source]¶
Delete Port assignment for user device in SDA Fabric.
- Parameters
device_ip (basestring) – device-ip query parameter.
interface_name (basestring) – interfaceName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_port_assignment_for_access_point(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add Port assignment for access point in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_default_authentication_profile(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add default authentication profile in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_sda_fabric(fabric_name, headers=None, **request_parameters)[source]¶
Delete SDA Fabric.
- Parameters
fabric_name (basestring) – Fabric Name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- deletes_border_device(device_ipaddress, headers=None, **request_parameters)[source]¶
Deletes border device from SDA Fabric.
- Parameters
device_ipaddress (basestring) – Device IP Address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_control_plane_device(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add control plane device in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_control_plane_device(device_ipaddress, headers=None, **request_parameters)[source]¶
Delete control plane device in SDA Fabric.
- Parameters
device_ipaddress (basestring) – Device IP Address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_site(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add Site in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_ip_pool_from_sda_virtual_network(ip_pool_name, virtual_network_name, headers=None, **request_parameters)[source]¶
Get IP Pool from SDA Virtual Network.
- Parameters
ip_pool_name (basestring) – ipPoolName query parameter.
virtual_network_name (basestring) – virtualNetworkName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
site_design¶
- class SiteDesign[source]¶
Cisco DNA Center Site Design API (version: 1.3.3).
Wraps the DNA Center Site Design API and exposes the API as native Python methods that return native Python objects.
- nfv_provisioning_detail(device_ip=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Checks the provisioning detail of an ENCS device including log information.
- Parameters
device_ip (string) – Device Ip, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- provision_nfv(provisioning=None, siteProfile=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Design and Provision single/multi NFV device with given site/area/building/floor .
- Parameters
provisioning (list) – Provisioning, property of the request body (list of objects).
siteProfile (list) – Site Profile, property of the request body (list of objects).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_details_by_ip(device_ip, headers=None, **request_parameters)[source]¶
Returns provisioning device information for the specified IP address.
- Parameters
device_ip (basestring) – Device to which the provisioning detail has to be retrieved.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
sites¶
- class Sites[source]¶
Cisco DNA Center Sites API (version: 1.3.3).
Wraps the DNA Center Sites API and exposes the API as native Python methods that return native Python objects.
- assign_device_to_site(site_id, device=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Assigns list of devices to a site.
- Parameters
device (list) – Device, property of the request body (list of objects).
site_id (basestring) – Site id to which site the device to assign.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_site_health(timestamp=None, headers=None, **request_parameters)[source]¶
Returns Overall Health information for all sites.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_site(site=None, type=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates site with area/building/floor with specified hierarchy.
- Parameters
site (object) – Site, property of the request body.
type (string) – Type, property of the request body. Available values are ‘area’, ‘building’ and ‘floor’.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_site(limit=None, name=None, offset=None, site_id=None, type=None, headers=None, **request_parameters)[source]¶
Get site with area/building/floor with specified hierarchy.
- Parameters
name (basestring) – siteNameHierarchy (ex: global/groupName).
site_id (basestring) – Site id to which site details to retrieve.
type (basestring) – type (ex: area, building, floor).
offset (basestring) – offset/starting row.
limit (basestring) – Number of sites to be retrieved.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_site_count(site_id=None, headers=None, **request_parameters)[source]¶
API to get site count .
- Parameters
site_id (basestring) – Site id to retrieve site count.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_site(site_id, headers=None, **request_parameters)[source]¶
Delete site with area/building/floor by siteId.
- Parameters
site_id (basestring) – Site id to which site details to be deleted.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_site(site_id, site=None, type=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Update site area/building/floor with specified hierarchy and new values.
- Parameters
site (object) – Site, property of the request body.
type (string) – Type, property of the request body. Available values are ‘area’, ‘building’ and ‘floor’.
site_id (basestring) – Site id to which site details to be updated.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_membership(site_id, headers=None, **request_parameters)[source]¶
Getting the site children details and device details.
- Parameters
site_id (basestring) – Site id to retrieve device associated with the site.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
software_image_management_swim¶
- class SoftwareImageManagementSwim[source]¶
Cisco DNA Center Software Image Management (SWIM) API (version: 1.3.3).
Wraps the DNA Center Software Image Management (SWIM) API and exposes the API as native Python methods that return native Python objects.
- get_software_image_details(application_type=None, created_time=None, family=None, image_integrity_status=None, image_name=None, image_series=None, image_size_greater_than=None, image_size_lesser_than=None, image_uuid=None, is_cco_latest=None, is_cco_recommended=None, is_tagged_golden=None, limit=None, name=None, offset=None, sort_by=None, sort_order='asc', version=None, headers=None, **request_parameters)[source]¶
Returns software image list based on a filter criteria. For example: “filterbyName = cat3k%”.
- Parameters
image_uuid (basestring) – imageUuid query parameter.
name (basestring) – name query parameter.
family (basestring) – family query parameter.
application_type (basestring) – applicationType query parameter.
image_integrity_status (basestring) – imageIntegrityStatus FAILURE, UNKNOWN, VERIFIED.
version (basestring) – software Image Version.
image_series (basestring) – image Series.
image_name (basestring) – image Name.
is_tagged_golden (bool) – is Tagged Golden.
is_cco_recommended (bool) – is recommended from cisco.com.
is_cco_latest (bool) – is latest from cisco.com.
created_time (int) – time in milliseconds (epoch format).
image_size_greater_than (int) – size in bytes.
image_size_lesser_than (int) – size in bytes.
sort_by (basestring) – sort results by this field.
sort_order (basestring) – sort order ‘asc’ or ‘des’. Default is asc.
limit (int) – limit query parameter.
offset (int) – offset query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- import_local_software_image(multipart_fields, multipart_monitor_callback, is_third_party=None, third_party_application_type=None, third_party_image_family=None, third_party_vendor=None, headers=None, **request_parameters)[source]¶
Fetches a software image from local file system and uploads to DNA Center. Supported software image files extensions are bin, img, tar, smu, pie, aes, iso, ova, tar_gz and qcow2.
The following code gives an example of the multipart_fields.
multipart_fields={'file': ('file.zip', open('file.zip', 'rb')} multipart_fields={'file': ('file.txt', open('file.txt', 'rb'), 'text/plain', {'X-My-Header': 'my-value'})} multipart_fields=[('images', ('foo.png', open('foo.png', 'rb'), 'image/png')), ('images', ('bar.png', open('bar.png', 'rb'), 'image/png'))]
The following example demonstrates how to use multipart_monitor_callback=create_callback to create a progress bar using clint.
from clint.textui.progress import Bar def create_callback(encoder): encoder_len = encoder.len bar = Bar(expected_size=encoder_len, filled_char="=") def callback(monitor): bar.show(monitor.bytes_read) return callback
- Parameters
is_third_party (bool) – Third party Image check.
third_party_vendor (basestring) – Third Party Vendor.
third_party_image_family (basestring) – Third Party image family.
third_party_application_type (basestring) – Third Party Application Type.
multipart_fields (dict) – Fields from which to create a multipart/form-data body.
multipart_monitor_callback (function) – function used to monitor the progress of the upload.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- trigger_software_image_distribution(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Distributes a software image on a given device. Software image must be imported successfully into DNA Center before it can be distributed.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- import_software_image_via_url(schedule_at=None, schedule_desc=None, schedule_origin=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Fetches a software image from remote file system (using URL for HTTP/FTP) and uploads to DNA Center. Supported image files extensions are bin, img, tar, smu, pie, aes, iso, ova, tar_gz and qcow2.
- Parameters
schedule_at (basestring) – Epoch Time (The number of milli-seconds since January 1 1970 UTC) at which the distribution should be scheduled (Optional) .
schedule_desc (basestring) – Custom Description (Optional).
schedule_origin (basestring) – Originator of this call (Optional).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- trigger_software_image_activation(schedule_validate=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Activates a software image on a given device. Software image must be present in the device flash.
- Parameters
schedule_validate (bool) – scheduleValidate, validates data before schedule (Optional).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
tag¶
- class Tag[source]¶
Cisco DNA Center Tag API (version: 1.3.3).
Wraps the DNA Center Tag API and exposes the API as native Python methods that return native Python objects.
- add_members_to_the_tag(id, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds members to the tag specified by id.
- Parameters
id (basestring) – Tag ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_tag(description=None, dynamicRules=None, id=None, instanceTenantId=None, name=None, systemTag=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates tag with specified tag attributes.
- Parameters
description (string) – TagDTO’s description.
dynamicRules (list) – TagDTO’s dynamicRules (list of objects).
id (string) – TagDTO’s id.
instanceTenantId (string) – TagDTO’s instanceTenantId.
name (string) – TagDTO’s name.
systemTag (boolean) – TagDTO’s systemTag.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag_member_count(id, member_type, level='0', member_association_type=None, headers=None, **request_parameters)[source]¶
Returns the number of members in a given tag.
- Parameters
id (basestring) – Tag ID.
member_type (basestring) – memberType query parameter.
member_association_type (basestring) – memberAssociationType query parameter.
level (basestring) – level query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_tag(id, headers=None, **request_parameters)[source]¶
Deletes a tag specified by id.
- Parameters
id (basestring) – Tag ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- updates_tag_membership(memberToTags=None, memberType=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates tag membership. As part of the request payload through this API, only the specified members are added / retained to the given input tags. Possible values of memberType attribute in the request payload can be queried by using the /tag/member/type API.
- Parameters
memberToTags (array, object) – TagMemberDTO’s memberToTags.
memberType (string) – TagMemberDTO’s memberType.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag_resource_types(headers=None, **request_parameters)[source]¶
Returns list of supported resource types.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_tag(description=None, dynamicRules=None, id=None, instanceTenantId=None, name=None, systemTag=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates a tag specified by id.
- Parameters
description (string) – TagDTO’s description.
dynamicRules (list) – TagDTO’s dynamicRules (list of objects).
id (string) – TagDTO’s id.
instanceTenantId (string) – TagDTO’s instanceTenantId.
name (string) – TagDTO’s name.
systemTag (boolean) – TagDTO’s systemTag.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag_count(attribute_name=None, level=None, name=None, name_space=None, size=None, system_tag=None, headers=None, **request_parameters)[source]¶
Returns tag count.
- Parameters
name (basestring) – name query parameter.
name_space (basestring) – nameSpace query parameter.
attribute_name (basestring) – attributeName query parameter.
level (basestring) – level query parameter.
size (basestring) – size in kilobytes(KB).
system_tag (basestring) – systemTag query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag_by_id(id, headers=None, **request_parameters)[source]¶
Returns tag specified by Id.
- Parameters
id (basestring) – Tag ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- remove_tag_member(id, member_id, headers=None, **request_parameters)[source]¶
Removes Tag member from the tag specified by id.
- Parameters
id (basestring) – Tag ID.
member_id (basestring) – TagMember id to be removed from tag.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag(additional_info_attributes=None, additional_info_name_space=None, field=None, level=None, limit=None, name=None, offset=None, order=None, size=None, sort_by=None, system_tag=None, headers=None, **request_parameters)[source]¶
Returns the tags for given filter criteria.
- Parameters
name (basestring) – Tag name is mandatory when filter operation is used.
additional_info_name_space (basestring) – additionalInfo.nameSpace query parameter.
additional_info_attributes (basestring) – additionalInfo.attributes query parameter.
level (basestring) – level query parameter.
offset (basestring) – offset query parameter.
limit (basestring) – limit query parameter.
size (basestring) – size in kilobytes(KB).
field (basestring) – Available field names are :’name,id,p arentId,type,additionalInfo.nameSpace,ad ditionalInfo.attributes’.
sort_by (basestring) – Only supported attribute is name. SortyBy is mandatory when order is used.
order (basestring) – Available values are asc and des.
system_tag (basestring) – systemTag query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag_members_by_id(id, member_type, level='0', limit=None, member_association_type=None, offset=None, headers=None, **request_parameters)[source]¶
Returns tag members specified by id.
- Parameters
id (basestring) – Tag ID.
member_type (basestring) – Entity type of the member. Possible values can be retrieved by using /tag/member/type API.
offset (basestring) – Used for pagination. It indicates the starting row number out of available member records.
limit (basestring) – Used to Number of maximum members to return in the result.
member_association_type (basestring) – Indicates how the member is associated with the tag. Possible values and description. 1) DYNAMIC : The member is associated to the tag through rules. 2) STATIC – The member is associated to the tag manually. 3) MIXED – The member is associated manually and also satisfies the rule defined for the tag.
level (basestring) – level query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
task¶
- class Task[source]¶
Cisco DNA Center Task API (version: 1.3.3).
Wraps the DNA Center Task API and exposes the API as native Python methods that return native Python objects.
- get_task_count(data=None, end_time=None, error_code=None, failure_reason=None, is_error=None, parent_id=None, progress=None, service_type=None, start_time=None, username=None, headers=None, **request_parameters)[source]¶
Returns Task count.
- Parameters
start_time (basestring) – This is the epoch start time from which tasks need to be fetched.
end_time (basestring) – This is the epoch end time upto which audit records need to be fetched.
data (basestring) – Fetch tasks that contains this data.
error_code (basestring) – Fetch tasks that have this error code.
service_type (basestring) – Fetch tasks with this service type.
username (basestring) – Fetch tasks with this username.
progress (basestring) – Fetch tasks that contains this progress.
is_error (basestring) – Fetch tasks ended as success or failure. Valid values: true, false.
failure_reason (basestring) – Fetch tasks that contains this failure reason.
parent_id (basestring) – Fetch tasks that have this parent Id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_task_by_id(task_id, headers=None, **request_parameters)[source]¶
Returns a task by specified id.
- Parameters
task_id (basestring) – UUID of the Task.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_task_by_operationid(limit, offset, operation_id, headers=None, **request_parameters)[source]¶
Returns root tasks associated with an Operationid.
- Parameters
operation_id (basestring) – operationId path parameter.
offset (int) – Index, minimum value is 0.
limit (int) – The maximum value of {limit} supported is 500. Base 1 indexing for {limit}, minimum value is 1.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_task_tree(task_id, headers=None, **request_parameters)[source]¶
Returns a task with its children tasks by based on their id.
- Parameters
task_id (basestring) – UUID of the Task.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tasks(data=None, end_time=None, error_code=None, failure_reason=None, is_error=None, limit=None, offset=None, order=None, parent_id=None, progress=None, service_type=None, sort_by=None, start_time=None, username=None, headers=None, **request_parameters)[source]¶
Returns task(s) based on filter criteria.
- Parameters
start_time (basestring) – This is the epoch start time from which tasks need to be fetched.
end_time (basestring) – This is the epoch end time upto which audit records need to be fetched.
data (basestring) – Fetch tasks that contains this data.
error_code (basestring) – Fetch tasks that have this error code.
service_type (basestring) – Fetch tasks with this service type.
username (basestring) – Fetch tasks with this username.
progress (basestring) – Fetch tasks that contains this progress.
is_error (basestring) – Fetch tasks ended as success or failure. Valid values: true, false.
failure_reason (basestring) – Fetch tasks that contains this failure reason.
parent_id (basestring) – Fetch tasks that have this parent Id.
offset (basestring) – offset query parameter.
limit (basestring) – limit query parameter.
sort_by (basestring) – Sort results by this field.
order (basestring) – Sort order asc or dsc.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
topology¶
- class Topology[source]¶
Cisco DNA Center Topology API (version: 1.3.3).
Wraps the DNA Center Topology API and exposes the API as native Python methods that return native Python objects.
- get_vlan_details(headers=None, **request_parameters)[source]¶
Returns the list of VLAN names.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_site_topology(headers=None, **request_parameters)[source]¶
Returns site topology.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_physical_topology(node_type=None, headers=None, **request_parameters)[source]¶
Returns the raw physical topology by specified criteria of nodeType.
- Parameters
node_type (basestring) – nodeType query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_topology_details(vlan_id, headers=None, **request_parameters)[source]¶
Returns Layer 2 network topology by specified VLAN ID.
- Parameters
vlan_id (basestring) – Vlan Name for e.g Vlan1, Vlan23 etc.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_l3_topology_details(topology_type, headers=None, **request_parameters)[source]¶
Returns the Layer 3 network topology by routing protocol.
- Parameters
topology_type (basestring) – Type of topology(OSPF,ISIS,etc).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_overall_network_health(timestamp=None, headers=None, **request_parameters)[source]¶
Returns Overall Network Health information by Device category (Access, Distribution, Core, Router, Wireless) for any given point of time.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
users¶
- class Users[source]¶
Cisco DNA Center Users API (version: 1.3.3).
Wraps the DNA Center Users API and exposes the API as native Python methods that return native Python objects.
- get_user_enrichment_details(headers=None, **request_parameters)[source]¶
Enriches a given network End User context (a network user-id or end user’s device Mac Address) with details about the user and devices that the user is connected to.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
wireless¶
- class Wireless[source]¶
Cisco DNA Center Wireless API (version: 1.3.3).
Wraps the DNA Center Wireless API and exposes the API as native Python methods that return native Python objects.
- retrieve_rf_profiles(rf_profile_name=None, headers=None, **request_parameters)[source]¶
Retrieve all RF profiles.
- Parameters
rf_profile_name (basestring) – rf-profile-name query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_and_provision_ssid(enableFabric=None, flexConnect=None, managedAPLocations=None, ssidDetails=None, ssidType=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates SSID, updates the SSID to the corresponding site profiles and provision it to the devices matching the given sites.
- Parameters
enableFabric (boolean) – enableFabric, property of the request body.
flexConnect (object) – Flex Connect Applicable for non fabric profile, property of the request body.
managedAPLocations (list) – Managed AP Locations (Enter entire Site(s) hierarchy), property of the request body (list of strings).
ssidDetails (object) – SsidDetails, property of the request body.
ssidType (string) – SSID Type, property of the request body. Available values are ‘Guest’ and ‘Enterprise’.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_rf_profiles(rf_profile_name, headers=None, **request_parameters)[source]¶
Delete RF profile(s).
- Parameters
rf_profile_name (basestring) – rf-profile-name path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_wireless_profile(profileDetails=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates Wireless Network Profile on DNAC and associates sites and SSIDs to it.
- Parameters
profileDetails (object) – Profile Details, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- provision_update(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates wireless provisioning.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_enterprise_ssid(enableBroadcastSSID=None, enableFastLane=None, enableMACFiltering=None, fastTransition=None, name=None, passphrase=None, radioPolicy=None, securityLevel=None, trafficType=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates enterprise SSID.
- Parameters
enableBroadcastSSID (boolean) – enableBroadcastSSID, property of the request body.
enableFastLane (boolean) – enableFastLane, property of the request body.
enableMACFiltering (boolean) – enableMACFiltering, property of the request body.
fastTransition (string) – Fast Transition, property of the request body. Available values are ‘Adaptive’, ‘Enable’ and ‘Disable’.
name (string) – Enter SSID Name, property of the request body. Constraints: maxLength set to 32.
passphrase (string) – Pass Phrase (Only applicable for SSID with PERSONAL security level), property of the request body. Constraints: maxLength set to 63 and minLength set to 8.
radioPolicy (string) – Radio Policy, property of the request body. Available values are ‘Dual band operation (2.4GHz and 5GHz)’, ‘Dual band operation with band select’, ‘5GHz only’ and ‘2.4GHz only’.
securityLevel (string) – Security Level, property of the request body. Available values are ‘WPA2_ENTERPRISE’, ‘WPA2_PERSONAL’ and ‘OPEN’.
trafficType (string) – Traffic Type, property of the request body. Available values are ‘voicedata’ and ‘data’.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_wireless_profile(profile_name=None, headers=None, **request_parameters)[source]¶
Gets either one or all the wireless network profiles if no name is provided for network-profile.
- Parameters
profile_name (basestring) – profileName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_or_update_rf_profile(channelWidth=None, defaultRfProfile=None, enableBrownField=None, enableCustom=None, enableRadioTypeA=None, enableRadioTypeB=None, name=None, radioTypeAProperties=None, radioTypeBProperties=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Create or Update RF profile.
- Parameters
channelWidth (string) – Channel Width, property of the request body.
defaultRfProfile (boolean) – defaultRfProfile, property of the request body.
enableBrownField (boolean) – enableBrownField, property of the request body.
enableCustom (boolean) – enableCustom, property of the request body.
enableRadioTypeA (boolean) – enableRadioTypeA, property of the request body.
enableRadioTypeB (boolean) – enableRadioTypeB, property of the request body.
name (string) – Name, property of the request body.
radioTypeAProperties (object) – Radio Type AProperties, property of the request body.
radioTypeBProperties (object) – Radio Type BProperties, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_enterprise_ssid(ssid_name, headers=None, **request_parameters)[source]¶
Deletes given enterprise SSID.
- Parameters
ssid_name (basestring) – Enter the SSID name to be deleted.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_enterprise_ssid(ssid_name=None, headers=None, **request_parameters)[source]¶
Gets either one or all the enterprise SSID.
- Parameters
ssid_name (basestring) – Enter the enterprise SSID name that needs to be retrieved. If not entered, all the enterprise SSIDs will be retrieved.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- provision(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Provision wireless devices.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_wireless_profile(profileDetails=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates the wireless Network Profile with updated details provided. All sites to be present in the network profile should be provided.
- Parameters
profileDetails (object) – Profile Details, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- ap_provision(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Provision wireless Access points.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_wireless_profile(wireless_profile_name, headers=None, **request_parameters)[source]¶
Delete the Wireless Profile from DNAC whose name is provided.
- Parameters
wireless_profile_name (basestring) – wirelessProfileName path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_ssid_and_provision_it_to_devices(managed_aplocations, ssid_name, headers=None, **request_parameters)[source]¶
Removes SSID or WLAN from the network profile, reprovision the device(s) and deletes the SSID or WLAN from DNA Center.
- Parameters
ssid_name (basestring) – ssidName path parameter.
managed_aplocations (basestring) – managedAPLocations path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
DNACenterAPI v2.1.1¶
application_policy¶
- class ApplicationPolicy[source]¶
Cisco DNA Center Application Policy API (version: 2.1.1).
Wraps the DNA Center Application Policy API and exposes the API as native Python methods that return native Python objects.
- get_applications_count(headers=None, **request_parameters)[source]¶
Get the number of all existing applications.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_application_set(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Create new custom application-set/s.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- edit_application(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Edit the attributes of an existing application.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_application_set(id, headers=None, **request_parameters)[source]¶
Delete existing application-set by it’s id.
- Parameters
id (basestring) – id query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_applications(limit=500, name=None, offset=1, headers=None, **request_parameters)[source]¶
Get applications by offset/limit or by name.
- Parameters
offset (int) – The offset of the first application to be returned.
limit (int) – The maximum number of applications to be returned.
name (basestring) – Application’s name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_application_sets_count(headers=None, **request_parameters)[source]¶
Get the number of existing application-sets .
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_application_sets(limit=500, name=None, offset=1, headers=None, **request_parameters)[source]¶
Get appllication-sets by offset/limit or by name.
- Parameters
offset (int) – offset query parameter.
limit (int) – limit query parameter.
name (basestring) – name query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_application(id, headers=None, **request_parameters)[source]¶
Delete existing application by its id.
- Parameters
id (basestring) – Application’s Id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_application(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Create new Custom application.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
clients¶
- class Clients[source]¶
Cisco DNA Center Clients API (version: 2.1.1).
Wraps the DNA Center Clients API and exposes the API as native Python methods that return native Python objects.
- get_overall_client_health(timestamp=None, headers=None, **request_parameters)[source]¶
Returns Overall Client Health information by Client type (Wired and Wireless) for any given point of time.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_client_enrichment_details(headers=None, **request_parameters)[source]¶
Enriches a given network End User context (a network user-id or end user’s device Mac Address) with details about the user, the devices that the user is connected to and the assurance issues that the user is impacted by.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_client_detail(mac_address, timestamp=None, headers=None, **request_parameters)[source]¶
Returns detailed Client information retrieved by Mac Address for any given point of time. .
- Parameters
timestamp (basestring, int) – Epoch time(in milliseconds) when the Client health data is required.
mac_address (basestring) – MAC Address of the client.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
command_runner¶
- class CommandRunner[source]¶
Cisco DNA Center Command Runner API (version: 2.1.1).
Wraps the DNA Center Command Runner API and exposes the API as native Python methods that return native Python objects.
- get_all_keywords_of_clis_accepted(headers=None, **request_parameters)[source]¶
Get valid keywords.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- run_read_only_commands_on_devices(commands=None, description=None, deviceUuids=None, name=None, timeout=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Submit request for read-only CLIs.
- Parameters
commands (list) – CommandRunnerDTO’s commands (list of strings).
description (string) – CommandRunnerDTO’s description.
deviceUuids (list) – CommandRunnerDTO’s deviceUuids (list of strings).
name (string) – CommandRunnerDTO’s name.
timeout (number) – CommandRunnerDTO’s timeout.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
configuration_templates¶
- class ConfigurationTemplates[source]¶
Cisco DNA Center Configuration Templates API (version: 2.1.1).
Wraps the DNA Center Configuration Templates API and exposes the API as native Python methods that return native Python objects.
- gets_the_templates_available(filter_conflicting_templates=None, product_family=None, product_series=None, product_type=None, project_id=None, software_type=None, software_version=None, headers=None, **request_parameters)[source]¶
List the templates available.
- Parameters
project_id (basestring) – projectId query parameter.
software_type (basestring) – softwareType query parameter.
software_version (basestring) – softwareVersion query parameter.
product_family (basestring) – productFamily query parameter.
product_series (basestring) – productSeries query parameter.
product_type (basestring) – productType query parameter.
filter_conflicting_templates (bool) – filterConflictingTemplates query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_project(createTime=None, description=None, id=None, lastUpdateTime=None, name=None, tags=None, templates=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates a new project.
- Parameters
createTime (number) – ProjectDTO’s createTime.
description (string) – ProjectDTO’s description.
id (string) – ProjectDTO’s id.
lastUpdateTime (number) – ProjectDTO’s lastUpdateTime.
name (string) – ProjectDTO’s name.
tags (list) – ProjectDTO’s tags (list of string, objects).
templates – Part of the JSON serializable Python object to send in the body of the Request.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_projects(name=None, headers=None, **request_parameters)[source]¶
Returns the projects in the system.
- Parameters
name (basestring) – Name of project to be searched.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- deploy_template(forcePushTemplate=None, isComposite=None, mainTemplateId=None, memberTemplateDeploymentInfo=None, targetInfo=None, templateId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Deploys a template.
- Parameters
forcePushTemplate (boolean) – TemplateDeploymentInfo’s forcePushTemplate.
isComposite (boolean) – TemplateDeploymentInfo’s isComposite.
mainTemplateId (string) – TemplateDeploymentInfo’s mainTemplateId.
memberTemplateDeploymentInfo (list) – TemplateDeploymentInfo’s memberTemplateDeploymentInfo (list of any objects).
targetInfo (list) – TemplateDeploymentInfo’s targetInfo (list of objects).
templateId (string) – TemplateDeploymentInfo’s templateId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- version_template(comments=None, templateId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates Versioning for the current contents of the template.
- Parameters
comments (string) – TemplateVersionRequestDTO’s comments.
templateId (string) – TemplateVersionRequestDTO’s templateId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_template(author=None, composite=None, containingTemplates=None, createTime=None, description=None, deviceTypes=None, failurePolicy=None, id=None, lastUpdateTime=None, name=None, parentTemplateId=None, projectId=None, projectName=None, rollbackTemplateContent=None, rollbackTemplateParams=None, softwareType=None, softwareVariant=None, softwareVersion=None, tags=None, templateContent=None, templateParams=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates an existing template.
- Parameters
author (string) – TemplateDTO’s author.
composite (boolean) – TemplateDTO’s composite.
containingTemplates (list) – TemplateDTO’s containingTemplates (list of objects).
createTime (number) – TemplateDTO’s createTime.
description (string) – TemplateDTO’s description.
deviceTypes (list) – TemplateDTO’s deviceTypes (list of objects).
failurePolicy (string) – TemplateDTO’s failurePolicy. Available values are ‘ABORT_ON_ERROR’, ‘CONTINUE_ON_ERROR’, ‘ROLLBACK_ON_ERROR’, ‘ROLLBACK_TARGET_ON_ERROR’ and ‘ABORT_TARGET_ON_ERROR’.
id (string) – TemplateDTO’s id.
lastUpdateTime (number) – TemplateDTO’s lastUpdateTime.
name (string) – TemplateDTO’s name.
parentTemplateId (string) – TemplateDTO’s parentTemplateId.
projectId (string) – TemplateDTO’s projectId.
projectName (string) – TemplateDTO’s projectName.
rollbackTemplateContent (string) – TemplateDTO’s rollbackTemplateContent.
rollbackTemplateParams (list) – TemplateDTO’s rollbackTemplateParams (list of objects).
softwareType (string) – TemplateDTO’s softwareType.
softwareVariant (string) – TemplateDTO’s softwareVariant.
softwareVersion (string) – TemplateDTO’s softwareVersion.
tags (list) – TemplateDTO’s tags (list of string, objects).
templateContent (string) – TemplateDTO’s templateContent.
templateParams (list) – TemplateDTO’s templateParams (list of objects).
version (string) – TemplateDTO’s version.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_template_details(template_id, latest_version=None, headers=None, **request_parameters)[source]¶
Returns details of the specified template.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_project(createTime=None, description=None, id=None, lastUpdateTime=None, name=None, tags=None, templates=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates an existing project.
- Parameters
createTime (number) – ProjectDTO’s createTime.
description (string) – ProjectDTO’s description.
id (string) – ProjectDTO’s id.
lastUpdateTime (number) – ProjectDTO’s lastUpdateTime.
name (string) – ProjectDTO’s name.
tags (list) – ProjectDTO’s tags (list of string, objects).
templates – Part of the JSON serializable Python object to send in the body of the Request.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_template_deployment_status(deployment_id, headers=None, **request_parameters)[source]¶
Returns the status of a deployed template.
- Parameters
deployment_id (basestring) – deploymentId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_template(template_id, headers=None, **request_parameters)[source]¶
Deletes an existing template.
- Parameters
template_id (basestring) – templateId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_template_versions(template_id, headers=None, **request_parameters)[source]¶
Returns the versions of a specified template.
- Parameters
template_id (basestring) – templateId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_project(project_id, headers=None, **request_parameters)[source]¶
Deletes an existing Project.
- Parameters
project_id (basestring) – projectId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- preview_template(params=None, templateId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Previews an existing template.
- Parameters
params (object) – TemplatePreviewRequestDTO’s params.
templateId (string) – TemplatePreviewRequestDTO’s templateId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_template(project_id, author=None, composite=None, containingTemplates=None, createTime=None, description=None, deviceTypes=None, failurePolicy=None, id=None, lastUpdateTime=None, name=None, parentTemplateId=None, projectId=None, projectName=None, rollbackTemplateContent=None, rollbackTemplateParams=None, softwareType=None, softwareVariant=None, softwareVersion=None, tags=None, templateContent=None, templateParams=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates a new template.
- Parameters
author (string) – TemplateDTO’s author.
composite (boolean) – TemplateDTO’s composite.
containingTemplates (list) – TemplateDTO’s containingTemplates (list of objects).
createTime (number) – TemplateDTO’s createTime.
description (string) – TemplateDTO’s description.
deviceTypes (list) – TemplateDTO’s deviceTypes (list of objects).
failurePolicy (string) – TemplateDTO’s failurePolicy. Available values are ‘ABORT_ON_ERROR’, ‘CONTINUE_ON_ERROR’, ‘ROLLBACK_ON_ERROR’, ‘ROLLBACK_TARGET_ON_ERROR’ and ‘ABORT_TARGET_ON_ERROR’.
id (string) – TemplateDTO’s id.
lastUpdateTime (number) – TemplateDTO’s lastUpdateTime.
name (string) – TemplateDTO’s name.
parentTemplateId (string) – TemplateDTO’s parentTemplateId.
projectId (string) – TemplateDTO’s projectId.
projectName (string) – TemplateDTO’s projectName.
rollbackTemplateContent (string) – TemplateDTO’s rollbackTemplateContent.
rollbackTemplateParams (list) – TemplateDTO’s rollbackTemplateParams (list of objects).
softwareType (string) – TemplateDTO’s softwareType.
softwareVariant (string) – TemplateDTO’s softwareVariant.
softwareVersion (string) – TemplateDTO’s softwareVersion.
tags (list) – TemplateDTO’s tags (list of string, objects).
templateContent (string) – TemplateDTO’s templateContent.
templateParams (list) – TemplateDTO’s templateParams (list of objects).
version (string) – TemplateDTO’s version.
project_id (basestring) – projectId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
device_onboarding_pnp¶
- class DeviceOnboardingPnp[source]¶
Cisco DNA Center Device Onboarding (PnP) API (version: 2.1.1).
Wraps the DNA Center Device Onboarding (PnP) API and exposes the API as native Python methods that return native Python objects.
- un_claim_device(deviceIdList=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Un-Claims one of more devices with specified workflow.
- Parameters
deviceIdList (list) – UnclaimRequest’s deviceIdList (list of string, objects).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_sync_result_for_virtual_account(domain, name, headers=None, **request_parameters)[source]¶
Returns the summary of devices synced from the given smart account & virtual account with PnP.
- Parameters
domain (basestring) – Smart Account Domain.
name (basestring) – Virtual Account Name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_device(id, _id=None, deviceInfo=None, runSummaryList=None, systemResetWorkflow=None, systemWorkflow=None, tenantId=None, version=None, workflow=None, workflowParameters=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates device details specified by device id in PnP database.
- Parameters
_id (string) – Device’s _id.
deviceInfo (object) – Device’s deviceInfo.
runSummaryList (list) – Device’s runSummaryList (list of objects).
systemResetWorkflow (object) – Device’s systemResetWorkflow.
systemWorkflow (object) – Device’s systemWorkflow.
tenantId (string) – Device’s tenantId.
version (number) – Device’s version.
workflow (object) – Device’s workflow.
workflowParameters (object) – Device’s workflowParameters.
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_virtual_account(autoSyncPeriod=None, ccoUser=None, expiry=None, lastSync=None, profile=None, smartAccountId=None, syncResult=None, syncResultStr=None, syncStartTime=None, syncStatus=None, tenantId=None, token=None, virtualAccountId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Registers a Smart Account, Virtual Account and the relevant server profile info with the PnP System & database. The devices present in the registered virtual account are synced with the PnP database as well. The response payload returns the new profile.
- Parameters
autoSyncPeriod (number) – SAVAMapping’s autoSyncPeriod.
ccoUser (string) – SAVAMapping’s ccoUser.
expiry (number) – SAVAMapping’s expiry.
lastSync (number) – SAVAMapping’s lastSync.
profile (object) – SAVAMapping’s profile.
smartAccountId (string) – SAVAMapping’s smartAccountId.
syncResult (object) – SAVAMapping’s syncResult.
syncResultStr (string) – SAVAMapping’s syncResultStr.
syncStartTime (number) – SAVAMapping’s syncStartTime.
syncStatus (string) – SAVAMapping’s syncStatus. Available values are ‘NOT_SYNCED’, ‘SYNCING’, ‘SUCCESS’ and ‘FAILURE’.
tenantId (string) – SAVAMapping’s tenantId.
token (string) – SAVAMapping’s token.
virtualAccountId (string) – SAVAMapping’s virtualAccountId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- import_devices_in_bulk(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add devices to PnP in bulk.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- deregister_virtual_account(domain, name, headers=None, **request_parameters)[source]¶
Deregisters the specified smart account & virtual account info and the associated device information from the PnP System & database. The devices associated with the deregistered virtual account are removed from the PnP database as well. The response payload contains the deregistered smart & virtual account information.
- Parameters
domain (basestring) – Smart Account Domain.
name (basestring) – Virtual Account Name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_workflow(id, _id=None, addToInventory=None, addedOn=None, configId=None, currTaskIdx=None, description=None, endTime=None, execTime=None, imageId=None, instanceType=None, lastupdateOn=None, name=None, startTime=None, state=None, tasks=None, tenantId=None, type=None, useState=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates an existing workflow.
- Parameters
_id (string) – Workflow’s _id.
addToInventory (boolean) – Workflow’s addToInventory.
addedOn (number) – Workflow’s addedOn.
configId (string) – Workflow’s configId.
currTaskIdx (number) – Workflow’s currTaskIdx.
description (string) – Workflow’s description.
endTime (number) – Workflow’s endTime.
execTime (number) – Workflow’s execTime.
imageId (string) – Workflow’s imageId.
instanceType (string) – Workflow’s instanceType. Available values are ‘SystemWorkflow’, ‘UserWorkflow’ and ‘SystemResetWorkflow’.
lastupdateOn (number) – Workflow’s lastupdateOn.
name (string) – Workflow’s name.
startTime (number) – Workflow’s startTime.
state (string) – Workflow’s state.
tasks (list) – Workflow’s tasks (list of objects).
tenantId (string) – Workflow’s tenantId.
type (string) – Workflow’s type.
useState (string) – Workflow’s useState.
version (number) – Workflow’s version.
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_smart_account_list(headers=None, **request_parameters)[source]¶
Returns the list of Smart Account domains.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- claim_a_device_to_a_site(deviceId=None, siteId=None, type=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Claim a device based on DNA-C Site based design process. Different parameters are required for different device platforms.
- Parameters
deviceId (string) – SiteProvisionRequest’s deviceId.
siteId (string) – SiteProvisionRequest’s siteId.
type (string) – SiteProvisionRequest’s type. Available values are ‘Default’, ‘AccessPoint’, ‘StackSwitch’, ‘Sensor’ and ‘MobilityExpress’.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_pnp_global_settings(headers=None, **request_parameters)[source]¶
Returns global PnP settings of the user.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_virtual_account_list(domain, headers=None, **request_parameters)[source]¶
Returns list of virtual accounts associated with the specified smart account.
- Parameters
domain (basestring) – Smart Account Domain.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_pnp_server_profile(autoSyncPeriod=None, ccoUser=None, expiry=None, lastSync=None, profile=None, smartAccountId=None, syncResult=None, syncResultStr=None, syncStartTime=None, syncStatus=None, tenantId=None, token=None, virtualAccountId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates the PnP Server profile in a registered Virtual Account in the PnP database. The response payload returns the updated smart & virtual account info.
- Parameters
autoSyncPeriod (number) – SAVAMapping’s autoSyncPeriod.
ccoUser (string) – SAVAMapping’s ccoUser.
expiry (number) – SAVAMapping’s expiry.
lastSync (number) – SAVAMapping’s lastSync.
profile (object) – SAVAMapping’s profile.
smartAccountId (string) – SAVAMapping’s smartAccountId.
syncResult (object) – SAVAMapping’s syncResult.
syncResultStr (string) – SAVAMapping’s syncResultStr.
syncStartTime (number) – SAVAMapping’s syncStartTime.
syncStatus (string) – SAVAMapping’s syncStatus. Available values are ‘NOT_SYNCED’, ‘SYNCING’, ‘SUCCESS’ and ‘FAILURE’.
tenantId (string) – SAVAMapping’s tenantId.
token (string) – SAVAMapping’s token.
virtualAccountId (string) – SAVAMapping’s virtualAccountId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_workflow_count(name=None, headers=None, **request_parameters)[source]¶
Returns the workflow count.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_workflow_by_id(id, headers=None, **request_parameters)[source]¶
Returns a workflow specified by id.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_pnp_global_settings(_id=None, aaaCredentials=None, acceptEula=None, defaultProfile=None, savaMappingList=None, taskTimeOuts=None, tenantId=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates the user’s list of global PnP settings.
- Parameters
_id (string) – Settings’s _id.
aaaCredentials (object) – Settings’s aaaCredentials.
acceptEula (boolean) – Settings’s acceptEula.
defaultProfile (object) – Settings’s defaultProfile.
savaMappingList (list) – Settings’s savaMappingList (list of objects).
taskTimeOuts (object) – Settings’s taskTimeOuts.
tenantId (string) – Settings’s tenantId.
version (number) – Settings’s version.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_a_workflow(_id=None, addToInventory=None, addedOn=None, configId=None, currTaskIdx=None, description=None, endTime=None, execTime=None, imageId=None, instanceType=None, lastupdateOn=None, name=None, startTime=None, state=None, tasks=None, tenantId=None, type=None, useState=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds a PnP Workflow along with the relevant tasks in the workflow into the PnP database.
- Parameters
_id (string) – Workflow’s _id.
addToInventory (boolean) – Workflow’s addToInventory.
addedOn (number) – Workflow’s addedOn.
configId (string) – Workflow’s configId.
currTaskIdx (number) – Workflow’s currTaskIdx.
description (string) – Workflow’s description.
endTime (number) – Workflow’s endTime.
execTime (number) – Workflow’s execTime.
imageId (string) – Workflow’s imageId.
instanceType (string) – Workflow’s instanceType. Available values are ‘SystemWorkflow’, ‘UserWorkflow’ and ‘SystemResetWorkflow’.
lastupdateOn (number) – Workflow’s lastupdateOn.
name (string) – Workflow’s name.
startTime (number) – Workflow’s startTime.
state (string) – Workflow’s state.
tasks (list) – Workflow’s tasks (list of objects).
tenantId (string) – Workflow’s tenantId.
type (string) – Workflow’s type.
useState (string) – Workflow’s useState.
version (number) – Workflow’s version.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_workflows(limit=None, name=None, offset=None, sort=None, sort_order=None, type=None, headers=None, **request_parameters)[source]¶
Returns the list of workflows based on filter criteria. If a limit is not specified, it will default to return 50 workflows. Pagination and sorting are also supported by this endpoint.
- Parameters
limit (int) – Limits number of results.
offset (int) – Index of first result.
sort (basestring, list, set, tuple) – Comma seperated lost of fields to sort on.
sort_order (basestring) – Sort Order Ascending (asc) or Descending (des).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- reset_device(deviceResetList=None, projectId=None, workflowId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Recovers a device from a Workflow Execution Error state.
- Parameters
deviceResetList (list) – ResetRequest’s deviceResetList (list of objects).
projectId (string) – ResetRequest’s projectId.
workflowId (string) – ResetRequest’s workflowId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_workflow_by_id(id, headers=None, **request_parameters)[source]¶
Deletes a workflow specified by id.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_by_id(id, headers=None, **request_parameters)[source]¶
Returns device details specified by device id.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- sync_virtual_account_devices(autoSyncPeriod=None, ccoUser=None, expiry=None, lastSync=None, profile=None, smartAccountId=None, syncResult=None, syncResultStr=None, syncStartTime=None, syncStatus=None, tenantId=None, token=None, virtualAccountId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Synchronizes the device info from the given smart account & virtual account with the PnP database. The response payload returns a list of synced devices.
- Parameters
autoSyncPeriod (number) – SAVAMapping’s autoSyncPeriod.
ccoUser (string) – SAVAMapping’s ccoUser.
expiry (number) – SAVAMapping’s expiry.
lastSync (number) – SAVAMapping’s lastSync.
profile (object) – SAVAMapping’s profile.
smartAccountId (string) – SAVAMapping’s smartAccountId.
syncResult (object) – SAVAMapping’s syncResult.
syncResultStr (string) – SAVAMapping’s syncResultStr.
syncStartTime (number) – SAVAMapping’s syncStartTime.
syncStatus (string) – SAVAMapping’s syncStatus. Available values are ‘NOT_SYNCED’, ‘SYNCING’, ‘SUCCESS’ and ‘FAILURE’.
tenantId (string) – SAVAMapping’s tenantId.
token (string) – SAVAMapping’s token.
virtualAccountId (string) – SAVAMapping’s virtualAccountId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_count(cm_state=None, last_contact=None, name=None, onb_state=None, pid=None, project_id=None, project_name=None, serial_number=None, smart_account_id=None, source=None, state=None, virtual_account_id=None, workflow_id=None, workflow_name=None, headers=None, **request_parameters)[source]¶
Returns the device count based on filter criteria. This is useful for pagination.
- Parameters
serial_number (basestring, list, set, tuple) – Device Serial Number.
onb_state (basestring, list, set, tuple) – Device Onboarding State.
cm_state (basestring, list, set, tuple) – Device Connection Manager State.
project_id (basestring, list, set, tuple) – Device Project Id.
workflow_id (basestring, list, set, tuple) – Device Workflow Id.
project_name (basestring, list, set, tuple) – Device Project Name.
workflow_name (basestring, list, set, tuple) – Device Workflow Name.
smart_account_id (basestring, list, set, tuple) – Device Smart Account.
virtual_account_id (basestring, list, set, tuple) – Device Virtual Account.
last_contact (bool) – Device Has Contacted lastContact > 0.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_device_by_id_from_pnp(id, headers=None, **request_parameters)[source]¶
Deletes specified device from PnP database.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- preview_config(deviceId=None, siteId=None, type=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Triggers a preview for site-based Day 0 Configuration.
- Parameters
deviceId (string) – SiteProvisionRequest’s deviceId.
siteId (string) – SiteProvisionRequest’s siteId.
type (string) – SiteProvisionRequest’s type. Available values are ‘Default’, ‘AccessPoint’, ‘StackSwitch’, ‘Sensor’ and ‘MobilityExpress’.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_history(serial_number, sort=None, sort_order=None, headers=None, **request_parameters)[source]¶
Returns history for a specific device. Serial number is a required parameter.
- Parameters
serial_number (basestring) – Device Serial Number.
sort (basestring, list, set, tuple) – Comma seperated list of fields to sort on.
sort_order (basestring) – Sort Order Ascending (asc) or Descending (des).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- claim_device(configFileUrl=None, configId=None, deviceClaimList=None, fileServiceId=None, imageId=None, imageUrl=None, populateInventory=None, projectId=None, workflowId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Claims one of more devices with specified workflow.
- Parameters
configFileUrl (string) – ClaimDeviceRequest’s configFileUrl.
configId (string) – ClaimDeviceRequest’s configId.
deviceClaimList (list) – ClaimDeviceRequest’s deviceClaimList (list of objects).
fileServiceId (string) – ClaimDeviceRequest’s fileServiceId.
imageId (string) – ClaimDeviceRequest’s imageId.
imageUrl (string) – ClaimDeviceRequest’s imageUrl.
populateInventory (boolean) – ClaimDeviceRequest’s populateInventory.
projectId (string) – ClaimDeviceRequest’s projectId.
workflowId (string) – ClaimDeviceRequest’s workflowId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_device(_id=None, deviceInfo=None, runSummaryList=None, systemResetWorkflow=None, systemWorkflow=None, tenantId=None, version=None, workflow=None, workflowParameters=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds a device to the PnP database.
- Parameters
_id (string) – Device’s _id.
deviceInfo (object) – Device’s deviceInfo.
runSummaryList (list) – Device’s runSummaryList (list of objects).
systemResetWorkflow (object) – Device’s systemResetWorkflow.
systemWorkflow (object) – Device’s systemWorkflow.
tenantId (string) – Device’s tenantId.
version (number) – Device’s version.
workflow (object) – Device’s workflow.
workflowParameters (object) – Device’s workflowParameters.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_list(cm_state=None, last_contact=None, limit=None, name=None, offset=None, onb_state=None, pid=None, project_id=None, project_name=None, serial_number=None, smart_account_id=None, sort=None, sort_order=None, source=None, state=None, virtual_account_id=None, workflow_id=None, workflow_name=None, headers=None, **request_parameters)[source]¶
Returns list of devices based on filter crieteria. If a limit is not specified, it will default to return 50 devices. Pagination and sorting are also supported by this endpoint.
- Parameters
limit (int) – Limits number of results.
offset (int) – Index of first result.
sort (basestring, list, set, tuple) – Comma seperated list of fields to sort on.
sort_order (basestring) – Sort Order Ascending (asc) or Descending (des).
serial_number (basestring, list, set, tuple) – Device Serial Number.
onb_state (basestring, list, set, tuple) – Device Onboarding State.
cm_state (basestring, list, set, tuple) – Device Connection Manager State.
project_id (basestring, list, set, tuple) – Device Project Id.
workflow_id (basestring, list, set, tuple) – Device Workflow Id.
project_name (basestring, list, set, tuple) – Device Project Name.
workflow_name (basestring, list, set, tuple) – Device Workflow Name.
smart_account_id (basestring, list, set, tuple) – Device Smart Account.
virtual_account_id (basestring, list, set, tuple) – Device Virtual Account.
last_contact (bool) – Device Has Contacted lastContact > 0.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
device_replacement¶
- class DeviceReplacement[source]¶
Cisco DNA Center Device Replacement API (version: 2.1.1).
Wraps the DNA Center Device Replacement API and exposes the API as native Python methods that return native Python objects.
- deploy_device_replacement_workflow(faultyDeviceSerialNumber=None, replacementDeviceSerialNumber=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to trigger RMA workflow that will replace faulty device with replacement device with same configuration and images.
- Parameters
faultyDeviceSerialNumber (string) – DeviceReplacementWorkflowDTO’s faultyDeviceSerialNumber.
replacementDeviceSerialNumber (string) – DeviceReplacementWorkflowDTO’s replacementDeviceSerialNumber.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- unmark_device_for_replacement(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
UnMarks device for replacement.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- mark_device_for_replacement(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Marks device for replacement.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- return_replacement_devices_with_details(family=None, faulty_device_name=None, faulty_device_platform=None, faulty_device_serial_number=None, limit=None, offset=None, replacement_device_platform=None, replacement_device_serial_number=None, replacement_status=None, sort_by=None, sort_order=None, headers=None, **request_parameters)[source]¶
Get list of replacement devices with replacement details and it can filter replacement devices based on Faulty Device Name,Faulty Device Platform, Replacement Device Platform, Faulty Device Serial Number,Replacement Device Serial Number, Device Replacement status, Product Family.
- Parameters
faulty_device_name (basestring) – Faulty Device Name.
faulty_device_platform (basestring) – Faulty Device Platform.
replacement_device_platform (basestring) – Replacement Device Platform.
faulty_device_serial_number (basestring) – Faulty Device Serial Number.
replacement_device_serial_number (basestring) – Replacement Device Serial Number.
replacement_status (basestring, list, set, tuple) – Device Replacement status [READY-FOR- REPLACEMENT, REPLACEMENT-IN-PROGRESS, REPLACEMENT-SCHEDULED, REPLACED, ERROR, NETWORK_READINESS_REQUESTED, NETWORK_READINESS_FAILED].
family (basestring, list, set, tuple) – List of families[Routers, Switches and Hubs, AP].
sort_by (basestring) – SortBy this field. SortBy is mandatory when order is used.
sort_order (basestring) – Order on displayName[ASC,DESC].
offset (int) – offset query parameter.
limit (int) – limit query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- return_replacement_devices_count(replacement_status=None, headers=None, **request_parameters)[source]¶
Get replacement devices count.
- Parameters
replacement_status (basestring, list, set, tuple) – Device Replacement status list[READY-FOR- REPLACEMENT, REPLACEMENT-IN-PROGRESS, REPLACEMENT-SCHEDULED, REPLACED, ERROR].
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
devices¶
- class Devices[source]¶
Cisco DNA Center Devices API (version: 2.1.1).
Wraps the DNA Center Devices API and exposes the API as native Python methods that return native Python objects.
- get_module_info_by_id(id, headers=None, **request_parameters)[source]¶
Returns Module info by id.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_list(associated_wlc_ip=None, collection_interval=None, collection_status=None, error_code=None, error_description=None, family=None, hostname=None, id=None, license_name=None, license_status=None, license_type=None, location=None, location_name=None, mac_address=None, management_ip_address=None, module_equpimenttype=None, module_name=None, module_operationstatecode=None, module_partnumber=None, module_servicestate=None, module_vendorequipmenttype=None, not_synced_for_minutes=None, platform_id=None, reachability_status=None, role=None, serial_number=None, series=None, software_type=None, software_version=None, type=None, up_time=None, headers=None, **request_parameters)[source]¶
Returns list of network devices based on filter criteria such as management IP address, mac address, hostname, location name and a wide variety of additional criteria. You can also use the asterisk in any value to conduct a wildcard search. For example, to find all hostnames beginning with myhost in the IP address range 192.25.18.n, issue the following request: GET fqdnoripofdnacenterplatform/dna/intent/api/v1/network- device? hostname=myhost* & managementIpAddress=192.25.18.* For a complete list of parameter names that you can use for filtering this request, see the DNA Center API Reference documentation. Note: If id parameter is provided, it will return the list of network-devices for the given ids and ignores the other request parameters. .
- Parameters
hostname (basestring, list, set, tuple) – hostname query parameter.
management_ip_address (basestring, list, set, tuple) – managementIpAddress query parameter.
mac_address (basestring, list, set, tuple) – macAddress query parameter.
location_name (basestring, list, set, tuple) – locationName query parameter.
serial_number (basestring, list, set, tuple) – serialNumber query parameter.
location (basestring, list, set, tuple) – location query parameter.
family (basestring, list, set, tuple) – family query parameter.
series (basestring, list, set, tuple) – series query parameter.
collection_status (basestring, list, set, tuple) – collectionStatus query parameter.
collection_interval (basestring, list, set, tuple) – collectionInterval query parameter.
not_synced_for_minutes (basestring, list, set, tuple) – notSyncedForMinutes query parameter.
error_code (basestring, list, set, tuple) – errorCode query parameter.
error_description (basestring, list, set, tuple) – errorDescription query parameter.
software_version (basestring, list, set, tuple) – softwareVersion query parameter.
software_type (basestring, list, set, tuple) – softwareType query parameter.
platform_id (basestring, list, set, tuple) – platformId query parameter.
reachability_status (basestring, list, set, tuple) – reachabilityStatus query parameter.
up_time (basestring, list, set, tuple) – upTime query parameter.
associated_wlc_ip (basestring, list, set, tuple) – associatedWlcIp query parameter.
license_name (basestring, list, set, tuple) – license.name query parameter.
license_type (basestring, list, set, tuple) – license.type query parameter.
license_status (basestring, list, set, tuple) – license.status query parameter.
module_name (basestring, list, set, tuple) – module+name query parameter.
module_equpimenttype (basestring, list, set, tuple) – module+equpimenttype query parameter.
module_servicestate (basestring, list, set, tuple) – module+servicestate query parameter.
module_vendorequipmenttype(basestring – tuple): module+vendorequipmenttype query parameter.
list – tuple): module+vendorequipmenttype query parameter.
set – tuple): module+vendorequipmenttype query parameter.
- :paramtuple): module+vendorequipmenttype query
parameter.
- Parameters
module_partnumber (basestring, list, set, tuple) – module+partnumber query parameter.
module_operationstatecode (basestring, list, set, tuple) – module+operationstatecode query parameter.
id (basestring) – Accepts comma separated id’s and return list of network-devices for the given id’s. If invalid or not-found id’s are provided, null entry will be returned in the list.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_interface_vlans(id, interface_type=None, headers=None, **request_parameters)[source]¶
Returns Device Interface VLANs.
- Parameters
id (basestring) – id path parameter.
interface_type (basestring) – Vlan assocaited with sub- interface.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_device_by_id(id, is_force_delete=None, headers=None, **request_parameters)[source]¶
Deletes the network device for the given Id.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_interfaces_by_specified_range(device_id, records_to_return, start_index, headers=None, **request_parameters)[source]¶
Returns the list of interfaces for the device for the specified range.
- Parameters
device_id (basestring) – Device ID.
start_index (int) – Start index.
records_to_return (int) – Number of records to return.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_polling_interval_for_all_devices(headers=None, **request_parameters)[source]¶
Returns polling interval of all devices.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- sync_devices_using_forcesync(force_sync=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Synchronizes the devices. If forceSync param is false (default) then the sync would run in normal priority thread. If forceSync param is true then the sync would run in high priority thread if available, else the sync will fail. Result can be seen in the child task of each device.
- Parameters
force_sync (bool) – forceSync query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_interface_count(headers=None, **request_parameters)[source]¶
Returns the count of interfaces for all devices.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_device(cliTransport=None, computeDevice=None, enablePassword=None, extendedDiscoveryInfo=None, httpPassword=None, httpPort=None, httpSecure=None, httpUserName=None, ipAddress=None, merakiOrgId=None, netconfPort=None, password=None, serialNumber=None, snmpAuthPassphrase=None, snmpAuthProtocol=None, snmpMode=None, snmpPrivPassphrase=None, snmpPrivProtocol=None, snmpROCommunity=None, snmpRWCommunity=None, snmpRetry=None, snmpTimeout=None, snmpUserName=None, snmpVersion=None, type=None, updateMgmtIPaddressList=None, userName=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds the device with given credential.
- Parameters
cliTransport (string) – InventoryDeviceInfo’s cliTransport.
computeDevice (boolean) – InventoryDeviceInfo’s computeDevice.
enablePassword (string) – InventoryDeviceInfo’s enablePassword.
extendedDiscoveryInfo (string) – InventoryDeviceInfo’s extendedDiscoveryInfo.
httpPassword (string) – InventoryDeviceInfo’s httpPassword.
httpPort (string) – InventoryDeviceInfo’s httpPort.
httpSecure (boolean) – InventoryDeviceInfo’s httpSecure.
httpUserName (string) – InventoryDeviceInfo’s httpUserName.
ipAddress (list) – InventoryDeviceInfo’s ipAddress (list of strings).
merakiOrgId (list) – InventoryDeviceInfo’s merakiOrgId (list of strings).
netconfPort (string) – InventoryDeviceInfo’s netconfPort.
password (string) – InventoryDeviceInfo’s password.
serialNumber (string) – InventoryDeviceInfo’s serialNumber.
snmpAuthPassphrase (string) – InventoryDeviceInfo’s snmpAuthPassphrase.
snmpAuthProtocol (string) – InventoryDeviceInfo’s snmpAuthProtocol.
snmpMode (string) – InventoryDeviceInfo’s snmpMode.
snmpPrivPassphrase (string) – InventoryDeviceInfo’s snmpPrivPassphrase.
snmpPrivProtocol (string) – InventoryDeviceInfo’s snmpPrivProtocol.
snmpROCommunity (string) – InventoryDeviceInfo’s snmpROCommunity.
snmpRWCommunity (string) – InventoryDeviceInfo’s snmpRWCommunity.
snmpRetry (number) – InventoryDeviceInfo’s snmpRetry.
snmpTimeout (number) – InventoryDeviceInfo’s snmpTimeout.
snmpUserName (string) – InventoryDeviceInfo’s snmpUserName.
snmpVersion (string) – InventoryDeviceInfo’s snmpVersion.
type (string) – InventoryDeviceInfo’s type. Available values are ‘COMPUTE_DEVICE’, ‘MERAKI_DASHBOARD’, ‘NETWORK_DEVICE’ and ‘NODATACHANGE’.
updateMgmtIPaddressList (list) – InventoryDeviceInfo’s updateMgmtIPaddressList (list of objects).
userName (string) – InventoryDeviceInfo’s userName.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_interface_details(device_id, name, headers=None, **request_parameters)[source]¶
Returns interface by specified device Id and interface name.
- Parameters
device_id (basestring) – Device ID.
name (basestring) – Interface name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_ospf_interfaces(headers=None, **request_parameters)[source]¶
Returns the interfaces that has OSPF enabled.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_interface_count_by_id(device_id, headers=None, **request_parameters)[source]¶
Returns the interface count for the given device.
- Parameters
device_id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_count(headers=None, **request_parameters)[source]¶
Returns the count of network devices based on the filter criteria by management IP address, mac address, hostname and location name.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_functional_capability_by_id(id, headers=None, **request_parameters)[source]¶
Returns functional capability with given Id.
- Parameters
id (basestring) – Functional Capability UUID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_config_by_id(network_device_id, headers=None, **request_parameters)[source]¶
Returns the device config by specified device ID.
- Parameters
network_device_id (basestring) – networkDeviceId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_polling_interval_by_id(id, headers=None, **request_parameters)[source]¶
Returns polling interval by device id.
- Parameters
id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_organization_list_for_meraki(id, headers=None, **request_parameters)[source]¶
Returns list of organizations for meraki dashboard.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_config_count(headers=None, **request_parameters)[source]¶
Returns the count of device configs.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_summary(id, headers=None, **request_parameters)[source]¶
Returns brief summary of device info such as hostname, management IP address for the given device Id.
- Parameters
id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_module_count(device_id, name_list=None, operational_state_code_list=None, part_number_list=None, vendor_equipment_type_list=None, headers=None, **request_parameters)[source]¶
Returns Module Count.
- Parameters
device_id (basestring) – deviceId query parameter.
name_list (basestring, list, set, tuple) – nameList query parameter.
vendor_equipment_type_list(basestring – tuple): vendorEquipmentTypeList query parameter.
list – tuple): vendorEquipmentTypeList query parameter.
set – tuple): vendorEquipmentTypeList query parameter.
- :paramtuple): vendorEquipmentTypeList query
parameter.
- Parameters
- :paramtuple): operationalStateCodeList query
parameter.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_isis_interfaces(headers=None, **request_parameters)[source]¶
Returns the interfaces that has ISIS enabled.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_by_id(id, headers=None, **request_parameters)[source]¶
Returns the network device details for the given device ID.
- Parameters
id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- sync_devices(cliTransport=None, computeDevice=None, enablePassword=None, extendedDiscoveryInfo=None, httpPassword=None, httpPort=None, httpSecure=None, httpUserName=None, ipAddress=None, merakiOrgId=None, netconfPort=None, password=None, serialNumber=None, snmpAuthPassphrase=None, snmpAuthProtocol=None, snmpMode=None, snmpPrivPassphrase=None, snmpPrivProtocol=None, snmpROCommunity=None, snmpRWCommunity=None, snmpRetry=None, snmpTimeout=None, snmpUserName=None, snmpVersion=None, type=None, updateMgmtIPaddressList=None, userName=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Sync the devices provided as input.
- Parameters
cliTransport (string) – InventoryDeviceInfo’s cliTransport.
computeDevice (boolean) – InventoryDeviceInfo’s computeDevice.
enablePassword (string) – InventoryDeviceInfo’s enablePassword.
extendedDiscoveryInfo (string) – InventoryDeviceInfo’s extendedDiscoveryInfo.
httpPassword (string) – InventoryDeviceInfo’s httpPassword.
httpPort (string) – InventoryDeviceInfo’s httpPort.
httpSecure (boolean) – InventoryDeviceInfo’s httpSecure.
httpUserName (string) – InventoryDeviceInfo’s httpUserName.
ipAddress (list) – InventoryDeviceInfo’s ipAddress (list of strings).
merakiOrgId (list) – InventoryDeviceInfo’s merakiOrgId (list of strings).
netconfPort (string) – InventoryDeviceInfo’s netconfPort.
password (string) – InventoryDeviceInfo’s password.
serialNumber (string) – InventoryDeviceInfo’s serialNumber.
snmpAuthPassphrase (string) – InventoryDeviceInfo’s snmpAuthPassphrase.
snmpAuthProtocol (string) – InventoryDeviceInfo’s snmpAuthProtocol.
snmpMode (string) – InventoryDeviceInfo’s snmpMode.
snmpPrivPassphrase (string) – InventoryDeviceInfo’s snmpPrivPassphrase.
snmpPrivProtocol (string) – InventoryDeviceInfo’s snmpPrivProtocol.
snmpROCommunity (string) – InventoryDeviceInfo’s snmpROCommunity.
snmpRWCommunity (string) – InventoryDeviceInfo’s snmpRWCommunity.
snmpRetry (number) – InventoryDeviceInfo’s snmpRetry.
snmpTimeout (number) – InventoryDeviceInfo’s snmpTimeout.
snmpUserName (string) – InventoryDeviceInfo’s snmpUserName.
snmpVersion (string) – InventoryDeviceInfo’s snmpVersion.
type (string) – InventoryDeviceInfo’s type. Available values are ‘COMPUTE_DEVICE’, ‘MERAKI_DASHBOARD’, ‘NETWORK_DEVICE’ and ‘NODATACHANGE’.
updateMgmtIPaddressList (list) – InventoryDeviceInfo’s updateMgmtIPaddressList (list of objects).
userName (string) – InventoryDeviceInfo’s userName.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_config_for_all_devices(headers=None, **request_parameters)[source]¶
Returns the config for all devices.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_interface_by_id(id, headers=None, **request_parameters)[source]¶
Returns the interface for the given interface ID.
- Parameters
id (basestring) – Interface ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_device_role(id=None, role=None, roleSource=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates the role of the device as access, core, distribution, border router.
- Parameters
id (string) – NetworkDeviceBriefNIO’s id.
role (string) – NetworkDeviceBriefNIO’s role.
roleSource (string) – NetworkDeviceBriefNIO’s roleSource.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_functional_capability_for_devices(device_id, function_name=None, headers=None, **request_parameters)[source]¶
Returns the functional-capability for given devices.
- Parameters
device_id (basestring) – Accepts comma separated deviceid’s and return list of functional-capabilities for the given id’s. If invalid or not-found id’s are provided, null entry will be returned in the list.
function_name (basestring, list, set, tuple) – functionName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_interface_by_ip(ip_address, headers=None, **request_parameters)[source]¶
Returns list of interfaces by specified IP address.
- Parameters
ip_address (basestring) – IP address of the interface.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_network_device_by_ip(ip_address, headers=None, **request_parameters)[source]¶
Returns the network device by specified IP address.
- Parameters
ip_address (basestring) – Device IP address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_interface_info_by_id(device_id, headers=None, **request_parameters)[source]¶
Returns list of interfaces by specified device.
- Parameters
device_id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- export_device_list(deviceUuids=None, id=None, operationEnum=None, parameters=None, password=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Exports the selected network device to a file.
- Parameters
deviceUuids (list) – ExportDeviceDTO’s deviceUuids (list of strings).
id (string) – ExportDeviceDTO’s id.
operationEnum (string) – ExportDeviceDTO’s operationEnum. Available values are ‘CREDENTIALDETAILS’ and ‘DEVICEDETAILS’.
parameters (list) – ExportDeviceDTO’s parameters (list of strings).
password (string) – ExportDeviceDTO’s password.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- register_device_for_wsa(macaddress=None, serial_number=None, headers=None, **request_parameters)[source]¶
Registers a device for WSA notification.
- Parameters
serial_number (basestring) – Serial number of the device.
macaddress (basestring) – Mac addres of the device.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_by_serial_number(serial_number, headers=None, **request_parameters)[source]¶
Returns the network device with given serial number.
- Parameters
serial_number (basestring) – Device serial number.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_modules(device_id, limit=None, name_list=None, offset=None, operational_state_code_list=None, part_number_list=None, vendor_equipment_type_list=None, headers=None, **request_parameters)[source]¶
Returns modules by specified device id.
- Parameters
device_id (basestring) – deviceId query parameter.
limit (basestring) – limit query parameter.
offset (basestring) – offset query parameter.
name_list (basestring, list, set, tuple) – nameList query parameter.
vendor_equipment_type_list(basestring – tuple): vendorEquipmentTypeList query parameter.
list – tuple): vendorEquipmentTypeList query parameter.
set – tuple): vendorEquipmentTypeList query parameter.
- :paramtuple): vendorEquipmentTypeList query
parameter.
- Parameters
- :paramtuple): operationalStateCodeList query
parameter.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_network_device_by_pagination_range(records_to_return, start_index, headers=None, **request_parameters)[source]¶
Returns the list of network devices for the given pagination range.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- retrieves_all_network_devices(associated_wlc_ip=None, collection_interval=None, collection_status=None, error_code=None, family=None, hostname=None, limit=None, mac_address=None, management_ip_address=None, offset=None, platform_id=None, reachability_failure_reason=None, reachability_status=None, role=None, role_source=None, serial_number=None, series=None, software_type=None, software_version=None, type=None, up_time=None, vrf_name=None, headers=None, **request_parameters)[source]¶
Gets the list of first 500 network devices sorted lexicographically based on host name. It can be filtered using management IP address, mac address, hostname and location name. If id param is provided, it will be returning the list of network-devices for the given id’s and other request params will be ignored. In case of autocomplete request, returns the list of specified attributes.
- Parameters
vrf_name (basestring) – vrfName query parameter.
management_ip_address (basestring) – managementIpAddress query parameter.
hostname (basestring) – hostname query parameter.
mac_address (basestring) – macAddress query parameter.
family (basestring) – family query parameter.
collection_status (basestring) – collectionStatus query parameter.
collection_interval (basestring) – collectionInterval query parameter.
software_version (basestring) – softwareVersion query parameter.
software_type (basestring) – softwareType query parameter.
reachability_status (basestring) – reachabilityStatus query parameter.
reachability_failure_reason (basestring) – reachabilityFailureReason query parameter.
error_code (basestring) – errorCode query parameter.
platform_id (basestring) – platformId query parameter.
series (basestring) – series query parameter.
type (basestring) – type query parameter.
serial_number (basestring) – serialNumber query parameter.
up_time (basestring) – upTime query parameter.
role (basestring) – role query parameter.
role_source (basestring) – roleSource query parameter.
associated_wlc_ip (basestring) – associatedWlcIp query parameter.
offset (basestring) – offset query parameter.
limit (basestring) – limit query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_wireless_lan_controller_details_by_id(id, headers=None, **request_parameters)[source]¶
Returns the wireless lan controller info with given device ID.
- Parameters
id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_all_interfaces(limit=500, offset=1, headers=None, **request_parameters)[source]¶
Returns all available interfaces. This endpoint can return a maximum of 500 interfaces.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_detail(identifier, search_by, timestamp=None, headers=None, **request_parameters)[source]¶
Returns detailed Network Device information retrieved by Mac Address, Device Name or UUID for any given point of time. .
- Parameters
timestamp (basestring, int) – Epoch time(in milliseconds) when the device data is required.
search_by (basestring) – MAC Address or Device Name value or UUID of the network device.
identifier (basestring) – One of keywords : macAddress or uuid or nwDeviceName.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_enrichment_details(headers=None, **request_parameters)[source]¶
Enriches a given network device context (device id or device Mac Address or device management IP address) with details about the device and neighbor topology.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
discovery¶
- class Discovery[source]¶
Cisco DNA Center Discovery API (version: 2.1.1).
Wraps the DNA Center Discovery API and exposes the API as native Python methods that return native Python objects.
- get_count_of_all_discovery_jobs(headers=None, **request_parameters)[source]¶
Returns the count of all available discovery jobs.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_netconf_credentials(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global netconf credentials.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_snmp_write_community(comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, writeCommunity=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global SNMP write community.
- Parameters
comments (string) – SNMPv2WriteCommunityDTO’s comments.
credentialType (string) – SNMPv2WriteCommunityDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – SNMPv2WriteCommunityDTO’s description.
id (string) – SNMPv2WriteCommunityDTO’s id.
instanceTenantId (string) – SNMPv2WriteCommunityDTO’s instanceTenantId.
instanceUuid (string) – SNMPv2WriteCommunityDTO’s instanceUuid.
writeCommunity (string) – SNMPv2WriteCommunityDTO’s writeCommunity.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_snmpv3_credentials(authPassword=None, authType=None, comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, privacyPassword=None, privacyType=None, snmpMode=None, username=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global SNMPv3 credential.
- Parameters
authPassword (string) – SNMPv3CredentialDTO’s authPassword.
authType (string) – SNMPv3CredentialDTO’s authType. Available values are ‘SHA’ and ‘MD5’.
comments (string) – SNMPv3CredentialDTO’s comments.
credentialType (string) – SNMPv3CredentialDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – SNMPv3CredentialDTO’s description.
id (string) – SNMPv3CredentialDTO’s id.
instanceTenantId (string) – SNMPv3CredentialDTO’s instanceTenantId.
instanceUuid (string) – SNMPv3CredentialDTO’s instanceUuid.
privacyPassword (string) – SNMPv3CredentialDTO’s privacyPassword.
privacyType (string) – SNMPv3CredentialDTO’s privacyType. Available values are ‘DES’ and ‘AES128’.
snmpMode (string) – SNMPv3CredentialDTO’s snmpMode. Available values are ‘AUTHPRIV’, ‘AUTHNOPRIV’ and ‘NOAUTHNOPRIV’.
username (string) – SNMPv3CredentialDTO’s username.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discoveries_by_range(records_to_return, start_index, headers=None, **request_parameters)[source]¶
Returns the discovery by specified range.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_network_devices_from_discovery(id, cli_status=None, http_status=None, ip_address=None, netconf_status=None, ping_status=None, snmp_status=None, sort_by=None, sort_order=None, task_id=None, headers=None, **request_parameters)[source]¶
Returns the network devices from a discovery job based on given filters. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
task_id (basestring) – taskId query parameter.
sort_by (basestring) – sortBy query parameter.
sort_order (basestring) – sortOrder query parameter.
ip_address (basestring, list, set, tuple) – ipAddress query parameter.
ping_status (basestring, list, set, tuple) – pingStatus query parameter.
snmp_status (basestring, list, set, tuple) – snmpStatus query parameter.
cli_status (basestring, list, set, tuple) – cliStatus query parameter.
netconf_status (basestring, list, set, tuple) – netconfStatus query parameter.
http_status (basestring, list, set, tuple) – httpStatus query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_snmp_properties(headers=None, **request_parameters)[source]¶
Returns SNMP properties.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_snmp_read_community(comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, readCommunity=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global SNMP read community.
- Parameters
comments (string) – SNMPv2ReadCommunityDTO’s comments.
credentialType (string) – SNMPv2ReadCommunityDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – SNMPv2ReadCommunityDTO’s description.
id (string) – SNMPv2ReadCommunityDTO’s id.
instanceTenantId (string) – SNMPv2ReadCommunityDTO’s instanceTenantId.
instanceUuid (string) – SNMPv2ReadCommunityDTO’s instanceUuid.
readCommunity (string) – SNMPv2ReadCommunityDTO’s readCommunity.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_http_write_credentials(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global HTTP write credentials.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_discovery_by_id(id, headers=None, **request_parameters)[source]¶
Stops the discovery for the given Discovery ID and removes it. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- start_discovery(cdpLevel=None, discoveryType=None, enablePasswordList=None, globalCredentialIdList=None, httpReadCredential=None, httpWriteCredential=None, ipAddressList=None, ipFilterList=None, lldpLevel=None, name=None, netconfPort=None, noAddNewDevice=None, parentDiscoveryId=None, passwordList=None, preferredMgmtIPMethod=None, protocolOrder=None, reDiscovery=None, retry=None, snmpAuthPassphrase=None, snmpAuthProtocol=None, snmpMode=None, snmpPrivPassphrase=None, snmpPrivProtocol=None, snmpROCommunity=None, snmpROCommunityDesc=None, snmpRWCommunity=None, snmpRWCommunityDesc=None, snmpUserName=None, snmpVersion=None, timeout=None, updateMgmtIp=None, userNameList=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Initiates discovery with the given parameters.
- Parameters
cdpLevel (number) – InventoryRequest’s cdpLevel.
discoveryType (string) – InventoryRequest’s discoveryType.
enablePasswordList (list) – InventoryRequest’s enablePasswordList (list of string, objects).
globalCredentialIdList (list) – InventoryRequest’s globalCredentialIdList (list of string, objects).
httpReadCredential (object) – InventoryRequest’s httpReadCredential.
httpWriteCredential (object) – InventoryRequest’s httpWriteCredential.
ipAddressList (string) – InventoryRequest’s ipAddressList.
ipFilterList (list) – InventoryRequest’s ipFilterList (list of string, objects).
lldpLevel (number) – InventoryRequest’s lldpLevel.
name (string) – InventoryRequest’s name.
netconfPort (string) – InventoryRequest’s netconfPort.
noAddNewDevice (boolean) – InventoryRequest’s noAddNewDevice.
parentDiscoveryId (string) – InventoryRequest’s parentDiscoveryId.
passwordList (list) – InventoryRequest’s passwordList (list of string, objects).
preferredMgmtIPMethod (string) – InventoryRequest’s preferredMgmtIPMethod.
protocolOrder (string) – InventoryRequest’s protocolOrder.
reDiscovery (boolean) – InventoryRequest’s reDiscovery.
retry (number) – InventoryRequest’s retry.
snmpAuthPassphrase (string) – InventoryRequest’s snmpAuthPassphrase.
snmpAuthProtocol (string) – InventoryRequest’s snmpAuthProtocol.
snmpMode (string) – InventoryRequest’s snmpMode.
snmpPrivPassphrase (string) – InventoryRequest’s snmpPrivPassphrase.
snmpPrivProtocol (string) – InventoryRequest’s snmpPrivProtocol.
snmpROCommunity (string) – InventoryRequest’s snmpROCommunity.
snmpROCommunityDesc (string) – InventoryRequest’s snmpROCommunityDesc.
snmpRWCommunity (string) – InventoryRequest’s snmpRWCommunity.
snmpRWCommunityDesc (string) – InventoryRequest’s snmpRWCommunityDesc.
snmpUserName (string) – InventoryRequest’s snmpUserName.
snmpVersion (string) – InventoryRequest’s snmpVersion.
timeout (number) – InventoryRequest’s timeout.
updateMgmtIp (boolean) – InventoryRequest’s updateMgmtIp.
userNameList (list) – InventoryRequest’s userNameList (list of string, objects).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_credential_sub_type_by_credential_id(id, headers=None, **request_parameters)[source]¶
Returns the credential sub type for the given Id.
- Parameters
id (basestring) – Global Credential ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_snmp_write_community(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global SNMP write community.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discovery_by_id(id, headers=None, **request_parameters)[source]¶
Returns discovery by Discovery ID. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_global_credentials(global_credential_id, siteUuids=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Update global credential for network devices in site(s).
- Parameters
siteUuids (list) – SitesInfoDTO’s siteUuids (list of strings).
global_credential_id (basestring) – Global credential Uuid.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_snmp_read_community(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global SNMP read community.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_snmpv3_credentials(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global SNMPv3 credentials.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_http_read_credential(comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, password=None, port=None, secure=None, username=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global HTTP Read credential.
- Parameters
comments (string) – HTTPReadCredentialDTO’s comments.
credentialType (string) – HTTPReadCredentialDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – HTTPReadCredentialDTO’s description.
id (string) – HTTPReadCredentialDTO’s id.
instanceTenantId (string) – HTTPReadCredentialDTO’s instanceTenantId.
instanceUuid (string) – HTTPReadCredentialDTO’s instanceUuid.
password (string) – HTTPReadCredentialDTO’s password.
port (number) – HTTPReadCredentialDTO’s port.
secure (boolean) – HTTPReadCredentialDTO’s secure.
username (string) – HTTPReadCredentialDTO’s username.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_list_of_discoveries_by_discovery_id(id, ip_address=None, limit=None, offset=None, headers=None, **request_parameters)[source]¶
Returns the list of discovery jobs for the given Discovery ID. The results can be optionally filtered based on IP. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
offset (int) – offset query parameter.
limit (int) – limit query parameter.
ip_address (basestring) – ipAddress query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_cli_credentials(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global CLI credential.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_update_snmp_properties(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds SNMP properties.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_devices_discovered_by_id(id, task_id=None, headers=None, **request_parameters)[source]¶
Returns the count of network devices discovered in the given discovery. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
task_id (basestring) – taskId query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- updates_discovery_by_id(attributeInfo=None, cdpLevel=None, deviceIds=None, discoveryCondition=None, discoveryStatus=None, discoveryType=None, enablePasswordList=None, globalCredentialIdList=None, httpReadCredential=None, httpWriteCredential=None, id=None, ipAddressList=None, ipFilterList=None, isAutoCdp=None, lldpLevel=None, name=None, netconfPort=None, numDevices=None, parentDiscoveryId=None, passwordList=None, preferredMgmtIPMethod=None, protocolOrder=None, retryCount=None, snmpAuthPassphrase=None, snmpAuthProtocol=None, snmpMode=None, snmpPrivPassphrase=None, snmpPrivProtocol=None, snmpRoCommunity=None, snmpRoCommunityDesc=None, snmpRwCommunity=None, snmpRwCommunityDesc=None, snmpUserName=None, timeOut=None, updateMgmtIp=None, userNameList=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Stops or starts an existing discovery.
- Parameters
attributeInfo (object) – DiscoveryNIO’s attributeInfo.
cdpLevel (number) – DiscoveryNIO’s cdpLevel.
deviceIds (string) – DiscoveryNIO’s deviceIds.
discoveryCondition (string) – DiscoveryNIO’s discoveryCondition.
discoveryStatus (string) – DiscoveryNIO’s discoveryStatus.
discoveryType (string) – DiscoveryNIO’s discoveryType.
enablePasswordList (string) – DiscoveryNIO’s enablePasswordList.
globalCredentialIdList (list) – DiscoveryNIO’s globalCredentialIdList (list of string, objects).
httpReadCredential (object) – DiscoveryNIO’s httpReadCredential.
httpWriteCredential (object) – DiscoveryNIO’s httpWriteCredential.
id (string) – DiscoveryNIO’s id.
ipAddressList (string) – DiscoveryNIO’s ipAddressList.
ipFilterList (string) – DiscoveryNIO’s ipFilterList.
isAutoCdp (boolean) – DiscoveryNIO’s isAutoCdp.
lldpLevel (number) – DiscoveryNIO’s lldpLevel.
name (string) – DiscoveryNIO’s name.
netconfPort (string) – DiscoveryNIO’s netconfPort.
numDevices (number) – DiscoveryNIO’s numDevices.
parentDiscoveryId (string) – DiscoveryNIO’s parentDiscoveryId.
passwordList (string) – DiscoveryNIO’s passwordList.
preferredMgmtIPMethod (string) – DiscoveryNIO’s preferredMgmtIPMethod.
protocolOrder (string) – DiscoveryNIO’s protocolOrder.
retryCount (number) – DiscoveryNIO’s retryCount.
snmpAuthPassphrase (string) – DiscoveryNIO’s snmpAuthPassphrase.
snmpAuthProtocol (string) – DiscoveryNIO’s snmpAuthProtocol.
snmpMode (string) – DiscoveryNIO’s snmpMode.
snmpPrivPassphrase (string) – DiscoveryNIO’s snmpPrivPassphrase.
snmpPrivProtocol (string) – DiscoveryNIO’s snmpPrivProtocol.
snmpRoCommunity (string) – DiscoveryNIO’s snmpRoCommunity.
snmpRoCommunityDesc (string) – DiscoveryNIO’s snmpRoCommunityDesc.
snmpRwCommunity (string) – DiscoveryNIO’s snmpRwCommunity.
snmpRwCommunityDesc (string) – DiscoveryNIO’s snmpRwCommunityDesc.
snmpUserName (string) – DiscoveryNIO’s snmpUserName.
timeOut (number) – DiscoveryNIO’s timeOut.
updateMgmtIp (boolean) – DiscoveryNIO’s updateMgmtIp.
userNameList (string) – DiscoveryNIO’s userNameList.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discovery_jobs_by_ip(ip_address, limit=None, name=None, offset=None, headers=None, **request_parameters)[source]¶
Returns the list of discovery jobs for the given IP.
- Parameters
offset (int) – offset query parameter.
limit (int) – limit query parameter.
ip_address (basestring) – ipAddress query parameter.
name (basestring) – name query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discovered_devices_by_range(id, records_to_return, start_index, task_id=None, headers=None, **request_parameters)[source]¶
Returns the network devices discovered for the given discovery and for the given range. The maximum number of records that can be retrieved is 500. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
start_index (int) – Start index.
records_to_return (int) – Number of records to return.
task_id (basestring) – taskId query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_http_read_credentials(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds HTTP read credentials.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_http_write_credentials(comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, password=None, port=None, secure=None, username=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global HTTP write credentials.
- Parameters
comments (string) – HTTPWriteCredentialDTO’s comments.
credentialType (string) – HTTPWriteCredentialDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – HTTPWriteCredentialDTO’s description.
id (string) – HTTPWriteCredentialDTO’s id.
instanceTenantId (string) – HTTPWriteCredentialDTO’s instanceTenantId.
instanceUuid (string) – HTTPWriteCredentialDTO’s instanceUuid.
password (string) – HTTPWriteCredentialDTO’s password.
port (number) – HTTPWriteCredentialDTO’s port.
secure (boolean) – HTTPWriteCredentialDTO’s secure.
username (string) – HTTPWriteCredentialDTO’s username.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_netconf_credentials(comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, netconfPort=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global netconf credentials.
- Parameters
comments (string) – NetconfCredentialDTO’s comments.
credentialType (string) – NetconfCredentialDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – NetconfCredentialDTO’s description.
id (string) – NetconfCredentialDTO’s id.
instanceTenantId (string) – NetconfCredentialDTO’s instanceTenantId.
instanceUuid (string) – NetconfCredentialDTO’s instanceUuid.
netconfPort (string) – NetconfCredentialDTO’s netconfPort.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_all_discovery(headers=None, **request_parameters)[source]¶
Stops all the discoveries and removes them.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_discovery_by_specified_range(records_to_delete, start_index, headers=None, **request_parameters)[source]¶
Stops discovery for the given range and removes them.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_global_credentials_by_id(global_credential_id, headers=None, **request_parameters)[source]¶
Deletes global credential for the given ID.
- Parameters
global_credential_id (basestring) – ID of global- credential.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_cli_credentials(comments=None, credentialType=None, description=None, enablePassword=None, id=None, instanceTenantId=None, instanceUuid=None, password=None, username=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global CLI credentials.
- Parameters
comments (string) – CLICredentialDTO’s comments.
credentialType (string) – CLICredentialDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – CLICredentialDTO’s description.
enablePassword (string) – CLICredentialDTO’s enablePassword.
id (string) – CLICredentialDTO’s id.
instanceTenantId (string) – CLICredentialDTO’s instanceTenantId.
instanceUuid (string) – CLICredentialDTO’s instanceUuid.
password (string) – CLICredentialDTO’s password.
username (string) – CLICredentialDTO’s username.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discovered_network_devices_by_discovery_id(id, task_id=None, headers=None, **request_parameters)[source]¶
Returns the network devices discovered for the given Discovery ID. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
task_id (basestring) – taskId query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_global_credentials(credential_sub_type, order=None, sort_by=None, headers=None, **request_parameters)[source]¶
Returns global credential for the given credential sub type.
- Parameters
credential_sub_type (basestring) – Credential type as CLI / SNMPV2_READ_COMMUNITY / SNMPV2_WRITE_COMMUNITY / SNMPV3 / HTTP_WRITE / HTTP_READ / NETCONF.
sort_by (basestring) – sortBy query parameter.
order (basestring) – order query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
event_management¶
- class EventManagement[source]¶
Cisco DNA Center Event Management API (version: 2.1.1).
Wraps the DNA Center Event Management API and exposes the API as native Python methods that return native Python objects.
- count_of_event_subscriptions(event_ids, headers=None, **request_parameters)[source]¶
Returns the Count of EventSubscriptions.
- Parameters
event_ids (basestring) – List of subscriptions related to the respective eventIds.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_events(tags, event_id=' ', limit=10, offset=None, order=None, sort_by=None, headers=None, **request_parameters)[source]¶
Gets the list of registered Events with provided eventIds or tags as mandatory.
- Parameters
event_id (basestring) – The registered EventId should be provided.
tags (basestring) – The registered Tags should be provided.
offset (int) – The number of Registries to offset in the resultset whose default value 0.
limit (int) – The number of Registries to limit in the resultset whose default value 10.
sort_by (basestring) – SortBy field name.
order (basestring) – order query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_event_subscriptions(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Update SubscriptionEndpoint to list of registered events.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- count_of_events(tags, event_id=None, headers=None, **request_parameters)[source]¶
Get the count of registered events with provided eventIds or tags as mandatory.
- Parameters
event_id (basestring) – The registered EventId should be provided.
tags (basestring) – The registered Tags should be provided.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_event_subscriptions(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Subscribe SubscriptionEndpoint to list of registered events.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_event_subscriptions(subscriptions, headers=None, **request_parameters)[source]¶
Delete EventSubscriptions.
- Parameters
subscriptions (basestring) – List of EventSubscriptionId’s for removal.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- count_of_notifications(category=None, domain=None, end_time=None, event_ids=None, severity=None, source=None, start_time=None, sub_domain=None, type=None, headers=None, **request_parameters)[source]¶
Get the Count of Published Notifications.
- Parameters
event_ids (basestring) – The registered EventIds should be provided.
start_time (basestring) – StartTime .
end_time (basestring) – endTime .
category (basestring) – category .
type (basestring) – type .
severity (basestring) – severity .
domain (basestring) – domain .
sub_domain (basestring) – subDomain .
source (basestring) – source .
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_event_subscriptions(event_ids=None, limit=10, offset=None, order=None, sort_by=None, headers=None, **request_parameters)[source]¶
Gets the list of Subscriptions’s based on provided offset and limit.
- Parameters
event_ids (basestring) – List of subscriptions related to the respective eventIds.
offset (int) – The number of Subscriptions’s to offset in the resultset whose default value 0.
limit (int) – The number of Subscriptions’s to limit in the resultset whose default value 10.
sort_by (basestring) – SortBy field name.
order (basestring) – order query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_status_api_for_events(execution_id, headers=None, **request_parameters)[source]¶
Get the Status of events API calls with provided executionId as mandatory path parameter.
- Parameters
execution_id (basestring) – Execution ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_notifications(category=None, domain=None, end_time=None, event_ids=None, limit=20, offset=None, order=None, severity=None, sort_by=None, source=None, start_time=None, sub_domain=None, type=None, headers=None, **request_parameters)[source]¶
Get the list of Published Notifications.
- Parameters
event_ids (basestring) – The registered EventIds should be provided.
start_time (basestring) – StartTime .
end_time (basestring) – endTime .
category (basestring) – category .
type (basestring) – type .
severity (basestring) – severity .
domain (basestring) – domain .
sub_domain (basestring) – subDomain .
source (basestring) – source .
offset (int) – Offset whose default value 0.
limit (int) – Limit whose default value 10.
sort_by (basestring) – SortBy field name.
order (basestring) – order query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
file¶
- class File[source]¶
Cisco DNA Center File API (version: 2.1.1).
Wraps the DNA Center File API and exposes the API as native Python methods that return native Python objects.
- get_list_of_available_namespaces(headers=None, **request_parameters)[source]¶
Returns list of available namespaces.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_list_of_files(name_space, headers=None, **request_parameters)[source]¶
Returns list of files under a specific namespace.
- Parameters
name_space (basestring) – A listing of fileId’s.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- download_a_file_by_fileid(file_id, dirpath=None, save_file=None, headers=None, **request_parameters)[source]¶
Downloads a file specified by fileId.
- Parameters
file_id (basestring) – File Identification number.
dirpath (basestring) – Directory absolute path. Defaults to os.getcwd().
save_file (bool) – Enable or disable automatic file creation of raw response.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
HTTP Response container. For more information check the urlib3 documentation
- Return type
urllib3.response.HTTPResponse
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
DownloadFailure – If was not able to download the raw
response to a file. –
itsm¶
- class Itsm[source]¶
Cisco DNA Center ITSM API (version: 2.1.1).
Wraps the DNA Center ITSM API and exposes the API as native Python methods that return native Python objects.
- get_failed_itsm_events(instance_id=None, headers=None, **request_parameters)[source]¶
Used to retrieve the list of integration events that failed to create tickets in ITSM.
- Parameters
instance_id (basestring) – Instance Id of the failed event as in the Runtime Dashboard.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- retry_integration_events(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Allows retry of multiple failed ITSM event instances. The retry request payload can be given as a list of strings: [“instance1”,”instance2”,”instance3”,..] A minimum of one instance Id is mandatory. The list of failed event instance Ids can be retrieved using the ‘Get Failed ITSM Events’ API in the ‘instanceId’ attribute.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
issues¶
- class Issues[source]¶
Cisco DNA Center Issues API (version: 2.1.1).
Wraps the DNA Center Issues API and exposes the API as native Python methods that return native Python objects.
- get_issue_enrichment_details(headers=None, **request_parameters)[source]¶
Enriches a given network issue context (an issue id or end user’s Mac Address) with details about the issue(s), impacted hosts and suggested actions for remediation.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
network_settings¶
- class NetworkSettings[source]¶
Cisco DNA Center Network Settings API (version: 2.1.1).
Wraps the DNA Center Network Settings API and exposes the API as native Python methods that return native Python objects.
- update_global_pool(settings=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to update global pool.
- Parameters
settings (object) – Settings, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_network(site_id=None, headers=None, **request_parameters)[source]¶
API to get DHCP and DNS center server details.
- Parameters
site_id (basestring) – Site id to get the network settings associated with the site.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_sp_profile(sp_profile_name, headers=None, **request_parameters)[source]¶
API to delete Service Provider profile (QoS).
- Parameters
sp_profile_name (basestring) – sp profile name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_global_ip_pool(id, headers=None, **request_parameters)[source]¶
API to delete global IP pool.
- Parameters
id (basestring) – global pool id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_sp_profile(settings=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to update SP profile.
- Parameters
settings (object) – Settings, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_device_credential(id, headers=None, **request_parameters)[source]¶
Delete device credential.
- Parameters
id (basestring) – global credential id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- assign_credential_to_site(site_id, cliId=None, httpRead=None, httpWrite=None, snmpV2ReadId=None, snmpV2WriteId=None, snmpV3Id=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Assign Device Credential To Site .
- Parameters
cliId (string) – Cli Id, property of the request body.
httpRead (string) – Http Read, property of the request body.
httpWrite (string) – Http Write, property of the request body.
snmpV2ReadId (string) – Snmp V2 Read Id, property of the request body.
snmpV2WriteId (string) – Snmp V2 Write Id, property of the request body.
snmpV3Id (string) – Snmp V3 Id, property of the request body.
site_id (basestring) – site id to assign credential.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_network(site_id, settings=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to update network for DHCP and DNS center server settings.
- Parameters
settings (object) – Settings, property of the request body.
site_id (basestring) – Site id to update the network settings which is associated with the site.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_device_credentials(settings=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to update device credentials.
- Parameters
settings (object) – Settings, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_service_provider_details(headers=None, **request_parameters)[source]¶
API to get service provider details (QoS).
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_credential_details(site_id=None, headers=None, **request_parameters)[source]¶
API to get device credential details.
- Parameters
site_id (basestring) – Site id to retrieve the credential details associated with the site.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_sp_profile(settings=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to create service provider profile(QOS).
- Parameters
settings (object) – settings, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_global_pool(limit=None, offset=None, headers=None, **request_parameters)[source]¶
API to get global pool.
- Parameters
offset (basestring) – offset/starting row.
limit (basestring) – No of Global Pools to be retrieved.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_network(site_id, settings=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to create a network for DHCP and DNS center server settings.
- Parameters
settings (object) – Settings, property of the request body.
site_id (basestring) – Site id to which site details to associate with the network settings.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_device_credentials(settings=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to create device credentials.
- Parameters
settings (object) – Settings, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_global_pool(settings=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to create global pool.
- Parameters
settings (object) – Settings, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
path_trace¶
- class PathTrace[source]¶
Cisco DNA Center Path Trace API (version: 2.1.1).
Wraps the DNA Center Path Trace API and exposes the API as native Python methods that return native Python objects.
- retrives_all_previous_pathtraces_summary(dest_ip=None, dest_port=None, gt_create_time=None, last_update_time=None, limit=None, lt_create_time=None, offset=None, order=None, periodic_refresh=None, protocol=None, sort_by=None, source_ip=None, source_port=None, status=None, task_id=None, headers=None, **request_parameters)[source]¶
Returns a summary of all flow analyses stored. Results can be filtered by specified parameters.
- Parameters
periodic_refresh (bool) – Is analysis periodically refreshed?.
source_ip (basestring) – Source IP address.
dest_ip (basestring) – Destination IP address.
source_port (basestring) – Source port.
dest_port (basestring) – Destination port.
gt_create_time (basestring) – Analyses requested after this time.
lt_create_time (basestring) – Analyses requested before this time.
protocol (basestring) – protocol query parameter.
status (basestring) – status query parameter.
task_id (basestring) – Task ID.
last_update_time (basestring) – Last update time.
limit (basestring) – Number of resources returned.
offset (basestring) – Start index of resources returned (1-based).
order (basestring) – Order by this field.
sort_by (basestring) – Sort by this field.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- retrieves_previous_pathtrace(flow_analysis_id, headers=None, **request_parameters)[source]¶
Returns result of a previously requested flow analysis by its Flow Analysis id.
- Parameters
flow_analysis_id (basestring) – Flow analysis request id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- deletes_pathtrace_by_id(flow_analysis_id, headers=None, **request_parameters)[source]¶
Deletes a flow analysis request by its id.
- Parameters
flow_analysis_id (basestring) – Flow analysis request id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- initiate_a_new_pathtrace(controlPath=None, destIP=None, destPort=None, inclusions=None, periodicRefresh=None, protocol=None, sourceIP=None, sourcePort=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Initiates a new flow analysis with periodic refresh and stat collection options. Returns a request id and a task id to get results and follow progress.
- Parameters
controlPath (boolean) – FlowAnalysisRequest’s controlPath.
destIP (string) – FlowAnalysisRequest’s destIP.
destPort (string) – FlowAnalysisRequest’s destPort.
inclusions (list) – FlowAnalysisRequest’s inclusions (list of strings).
periodicRefresh (boolean) – FlowAnalysisRequest’s periodicRefresh.
protocol (string) – FlowAnalysisRequest’s protocol.
sourceIP (string) – FlowAnalysisRequest’s sourceIP.
sourcePort (string) – FlowAnalysisRequest’s sourcePort.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
sda¶
- class Sda[source]¶
Cisco DNA Center SDA API (version: 2.1.1).
Wraps the DNA Center SDA API and exposes the API as native Python methods that return native Python objects.
- get_sda_fabric_info(fabric_name, headers=None, **request_parameters)[source]¶
Get SDA Fabric Info.
- Parameters
fabric_name (basestring) – Fabric Name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_ip_pool_in_sda_virtual_network(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add IP Pool in SDA Virtual Network.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_info(device_ipaddress, headers=None, **request_parameters)[source]¶
Get device info from SDA Fabric.
- Parameters
device_ipaddress (basestring) – Device IP Address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_port_assignment_for_access_point(device_ip, interface_name, headers=None, **request_parameters)[source]¶
Delete Port assignment for access point in SDA Fabric.
- Parameters
device_ip (basestring) – device-ip query parameter.
interface_name (basestring) – interfaceName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_edge_device(device_ipaddress, headers=None, **request_parameters)[source]¶
Delete edge device from SDA Fabric.
- Parameters
device_ipaddress (basestring) – Device IP Address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_vn(site_name_hierarchy, virtual_network_name, headers=None, **request_parameters)[source]¶
Get virtual network (VN) from SDA Fabric.
- Parameters
virtual_network_name (basestring) – virtualNetworkName query parameter.
site_name_hierarchy (basestring) – siteNameHierarchy query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_site(site_name_hierarchy, headers=None, **request_parameters)[source]¶
Delete Site from SDA Fabric.
- Parameters
site_name_hierarchy (basestring) – Site Name Hierarchy.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_default_authentication_profile(site_name_hierarchy, headers=None, **request_parameters)[source]¶
Add default authentication profile in SDA Fabric.
- Parameters
site_name_hierarchy (basestring) – siteNameHierarchy query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_port_assignment_for_access_point(device_ip, interface_name, headers=None, **request_parameters)[source]¶
Get Port assignment for access point in SDA Fabric.
- Parameters
device_ip (basestring) – device-ip query parameter.
interface_name (basestring) – interfaceName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_ip_pool_from_sda_virtual_network(ip_pool_name, virtual_network_name, headers=None, **request_parameters)[source]¶
Delete IP Pool from SDA Virtual Network.
- Parameters
ip_pool_name (basestring) – ipPoolName query parameter.
virtual_network_name (basestring) – virtualNetworkName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_edge_device(device_ipaddress, headers=None, **request_parameters)[source]¶
Get edge device from SDA Fabric.
- Parameters
device_ipaddress (basestring) – Device IP Address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_vn(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add virtual network (VN) in SDA Fabric .
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_default_authentication_profile(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Update default authentication profile in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_fabric(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_site(site_name_hierarchy, headers=None, **request_parameters)[source]¶
Get Site info from SDA Fabric.
- Parameters
site_name_hierarchy (basestring) – Site Name Hierarchy.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_edge_device(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add edge device in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_default_authentication_profile(site_name_hierarchy, headers=None, **request_parameters)[source]¶
Get default authentication profile from SDA Fabric.
- Parameters
site_name_hierarchy (basestring) – siteNameHierarchy query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_control_plane_device(device_ipaddress, headers=None, **request_parameters)[source]¶
Get control plane device from SDA Fabric.
- Parameters
device_ipaddress (basestring) – Device IP Address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- gets_border_device_detail(device_ipaddress, headers=None, **request_parameters)[source]¶
Gets border device detail from SDA Fabric.
- Parameters
device_ipaddress (basestring) – Device IP Address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_port_assignment_for_user_device(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add Port assignment for user device in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_default_authentication_profile(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add default authentication profile in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_port_assignment_for_user_device(device_ip, interface_name, headers=None, **request_parameters)[source]¶
Get Port assignment for user device in SDA Fabric.
- Parameters
device_ip (basestring) – device-ip query parameter.
interface_name (basestring) – interfaceName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_vn(site_name_hierarchy, virtual_network_name, headers=None, **request_parameters)[source]¶
Delete virtual network (VN) from SDA Fabric .
- Parameters
virtual_network_name (basestring) – virtualNetworkName query parameter.
site_name_hierarchy (basestring) – siteNameHierarchy query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_site(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add Site in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_port_assignment_for_user_device(device_ip, interface_name, headers=None, **request_parameters)[source]¶
Delete Port assignment for user device in SDA Fabric.
- Parameters
device_ip (basestring) – device-ip query parameter.
interface_name (basestring) – interfaceName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- adds_border_device(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds border device in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_port_assignment_for_access_point(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add Port assignment for access point in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_control_plane_device(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add control plane device in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- deletes_border_device(device_ipaddress, headers=None, **request_parameters)[source]¶
Deletes border device from SDA Fabric.
- Parameters
device_ipaddress (basestring) – Device IP Address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_sda_fabric(fabric_name, headers=None, **request_parameters)[source]¶
Delete SDA Fabric.
- Parameters
fabric_name (basestring) – Fabric Name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_control_plane_device(device_ipaddress, headers=None, **request_parameters)[source]¶
Delete control plane device in SDA Fabric.
- Parameters
device_ipaddress (basestring) – Device IP Address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_ip_pool_from_sda_virtual_network(ip_pool_name, virtual_network_name, headers=None, **request_parameters)[source]¶
Get IP Pool from SDA Virtual Network.
- Parameters
ip_pool_name (basestring) – ipPoolName query parameter.
virtual_network_name (basestring) – virtualNetworkName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
site_design¶
- class SiteDesign[source]¶
Cisco DNA Center Site Design API (version: 2.1.1).
Wraps the DNA Center Site Design API and exposes the API as native Python methods that return native Python objects.
- get_nfv_profile(id, limit=None, name=None, offset=None, headers=None, **request_parameters)[source]¶
API to get NFV network profile.
- Parameters
id (basestring) – ID of network profile to retrieve.
offset (basestring) – offset/starting row.
limit (basestring) – Number of profile to be retrieved.
name (basestring) – Name of network profile to be retrieved.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_nfv_profile(id, device=None, name=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to update a NFV Network profile.
- Parameters
device (list) – Device, property of the request body (list of objects).
id (basestring) – Id of the NFV profile to be updated.
name (basestring) – Name of the profile to be updated.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- nfv_provisioning_detail(device_ip=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Checks the provisioning detail of an ENCS device including log information.
- Parameters
device_ip (string) – Device Ip, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_nfv_profile(id, name=None, headers=None, **request_parameters)[source]¶
API to delete nfv network profile.
- Parameters
id (basestring) – Id of nfv network profile to delete. .
name (basestring) – Nameof nfv network profile to delete. .
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_nfv_profile(device=None, profileName=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to create network profile for different NFV topologies.
- Parameters
device (list) – Device, property of the request body (list of objects).
profileName (string) – Site Profile Name, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- provision_nfv(provisioning=None, siteProfile=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Design and Provision single/multi NFV device with given site/area/building/floor .
- Parameters
provisioning (list) – Provisioning, property of the request body (list of objects).
siteProfile (list) – Site Profile, property of the request body (list of objects).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_details_by_ip(device_ip, headers=None, **request_parameters)[source]¶
Returns provisioning device information for the specified IP address.
- Parameters
device_ip (basestring) – Device to which the provisioning detail has to be retrieved.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
sites¶
- class Sites[source]¶
Cisco DNA Center Sites API (version: 2.1.1).
Wraps the DNA Center Sites API and exposes the API as native Python methods that return native Python objects.
- assign_device_to_site(site_id, device=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Assigns list of devices to a site.
- Parameters
device (list) – Device, property of the request body (list of objects).
site_id (basestring) – Site id to which site the device to assign.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_site_health(timestamp=None, headers=None, **request_parameters)[source]¶
Returns Overall Health information for all sites.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_site(site=None, type=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates site with area/building/floor with specified hierarchy.
- Parameters
site (object) – Site, property of the request body.
type (string) – Type, property of the request body. Available values are ‘area’, ‘building’ and ‘floor’.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_site(limit=None, name=None, offset=None, site_id=None, type=None, headers=None, **request_parameters)[source]¶
Get site with area/building/floor with specified hierarchy.
- Parameters
name (basestring) – siteNameHierarchy (ex: global/groupName).
site_id (basestring) – Site id to which site details to retrieve.
type (basestring) – type (ex: area, building, floor).
offset (basestring) – offset/starting row.
limit (basestring) – Number of sites to be retrieved.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_site_count(site_id=None, headers=None, **request_parameters)[source]¶
API to get site count .
- Parameters
site_id (basestring) – Site id to retrieve site count.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_site(site_id, headers=None, **request_parameters)[source]¶
Delete site with area/building/floor by siteId.
- Parameters
site_id (basestring) – Site id to which site details to be deleted.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_membership(site_id, headers=None, **request_parameters)[source]¶
Getting the site children details and device details.
- Parameters
site_id (basestring) – Site id to retrieve device associated with the site.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_site(site_id, site=None, type=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Update site area/building/floor with specified hierarchy and new values.
- Parameters
site (object) – Site, property of the request body.
type (string) – Type, property of the request body. Available values are ‘area’, ‘building’ and ‘floor’.
site_id (basestring) – Site id to which site details to be updated.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
software_image_management_swim¶
- class SoftwareImageManagementSwim[source]¶
Cisco DNA Center Software Image Management (SWIM) API (version: 2.1.1).
Wraps the DNA Center Software Image Management (SWIM) API and exposes the API as native Python methods that return native Python objects.
- get_software_image_details(application_type=None, created_time=None, family=None, image_integrity_status=None, image_name=None, image_series=None, image_size_greater_than=None, image_size_lesser_than=None, image_uuid=None, is_cco_latest=None, is_cco_recommended=None, is_tagged_golden=None, limit=None, name=None, offset=None, sort_by=None, sort_order='asc', version=None, headers=None, **request_parameters)[source]¶
Returns software image list based on a filter criteria. For example: “filterbyName = cat3k%”.
- Parameters
image_uuid (basestring) – imageUuid query parameter.
name (basestring) – name query parameter.
family (basestring) – family query parameter.
application_type (basestring) – applicationType query parameter.
image_integrity_status (basestring) – imageIntegrityStatus FAILURE, UNKNOWN, VERIFIED.
version (basestring) – software Image Version.
image_series (basestring) – image Series.
image_name (basestring) – image Name.
is_tagged_golden (bool) – is Tagged Golden.
is_cco_recommended (bool) – is recommended from cisco.com.
is_cco_latest (bool) – is latest from cisco.com.
created_time (int) – time in milliseconds (epoch format).
image_size_greater_than (int) – size in bytes.
image_size_lesser_than (int) – size in bytes.
sort_by (basestring) – sort results by this field.
sort_order (basestring) – sort order ‘asc’ or ‘des’. Default is asc.
limit (int) – limit query parameter.
offset (int) – offset query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- import_local_software_image(multipart_fields, multipart_monitor_callback, is_third_party=None, third_party_application_type=None, third_party_image_family=None, third_party_vendor=None, headers=None, **request_parameters)[source]¶
Fetches a software image from local file system and uploads to DNA Center. Supported software image files extensions are bin, img, tar, smu, pie, aes, iso, ova, tar_gz and qcow2.
The following code gives an example of the multipart_fields.
multipart_fields={'file': ('file.zip', open('file.zip', 'rb')} multipart_fields={'file': ('file.txt', open('file.txt', 'rb'), 'text/plain', {'X-My-Header': 'my-value'})} multipart_fields=[('images', ('foo.png', open('foo.png', 'rb'), 'image/png')), ('images', ('bar.png', open('bar.png', 'rb'), 'image/png'))]
The following example demonstrates how to use multipart_monitor_callback=create_callback to create a progress bar using clint.
from clint.textui.progress import Bar def create_callback(encoder): encoder_len = encoder.len bar = Bar(expected_size=encoder_len, filled_char="=") def callback(monitor): bar.show(monitor.bytes_read) return callback
- Parameters
is_third_party (bool) – Third party Image check.
third_party_vendor (basestring) – Third Party Vendor.
third_party_image_family (basestring) – Third Party image family.
third_party_application_type (basestring) – Third Party Application Type.
multipart_fields (dict) – Fields from which to create a multipart/form-data body.
multipart_monitor_callback (function) – function used to monitor the progress of the upload.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- trigger_software_image_distribution(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Distributes a software image on a given device. Software image must be imported successfully into DNA Center before it can be distributed.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- import_software_image_via_url(schedule_at=None, schedule_desc=None, schedule_origin=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Fetches a software image from remote file system (using URL for HTTP/FTP) and uploads to DNA Center. Supported image files extensions are bin, img, tar, smu, pie, aes, iso, ova, tar_gz and qcow2.
- Parameters
schedule_at (basestring) – Epoch Time (The number of milli-seconds since January 1 1970 UTC) at which the distribution should be scheduled (Optional) .
schedule_desc (basestring) – Custom Description (Optional).
schedule_origin (basestring) – Originator of this call (Optional).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- trigger_software_image_activation(schedule_validate=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Activates a software image on a given device. Software image must be present in the device flash.
- Parameters
schedule_validate (bool) – scheduleValidate, validates data before schedule (Optional).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
tag¶
- class Tag[source]¶
Cisco DNA Center Tag API (version: 2.1.1).
Wraps the DNA Center Tag API and exposes the API as native Python methods that return native Python objects.
- add_members_to_the_tag(id, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds members to the tag specified by id.
- Parameters
id (basestring) – Tag ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_tag(description=None, dynamicRules=None, id=None, instanceTenantId=None, name=None, systemTag=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates tag with specified tag attributes.
- Parameters
description (string) – TagDTO’s description.
dynamicRules (list) – TagDTO’s dynamicRules (list of objects).
id (string) – TagDTO’s id.
instanceTenantId (string) – TagDTO’s instanceTenantId.
name (string) – TagDTO’s name.
systemTag (boolean) – TagDTO’s systemTag.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag_member_count(id, member_type, level='0', member_association_type=None, headers=None, **request_parameters)[source]¶
Returns the number of members in a given tag.
- Parameters
id (basestring) – Tag ID.
member_type (basestring) – memberType query parameter.
member_association_type (basestring) – memberAssociationType query parameter.
level (basestring) – level query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_tag(id, headers=None, **request_parameters)[source]¶
Deletes a tag specified by id.
- Parameters
id (basestring) – Tag ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- updates_tag_membership(memberToTags=None, memberType=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates tag membership. As part of the request payload through this API, only the specified members are added / retained to the given input tags. Possible values of memberType attribute in the request payload can be queried by using the /tag/member/type API.
- Parameters
memberToTags (array, object) – TagMemberDTO’s memberToTags.
memberType (string) – TagMemberDTO’s memberType.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag_resource_types(headers=None, **request_parameters)[source]¶
Returns list of supported resource types.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_tag(description=None, dynamicRules=None, id=None, instanceTenantId=None, name=None, systemTag=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates a tag specified by id.
- Parameters
description (string) – TagDTO’s description.
dynamicRules (list) – TagDTO’s dynamicRules (list of objects).
id (string) – TagDTO’s id.
instanceTenantId (string) – TagDTO’s instanceTenantId.
name (string) – TagDTO’s name.
systemTag (boolean) – TagDTO’s systemTag.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag_count(attribute_name=None, level=None, name=None, name_space=None, size=None, system_tag=None, headers=None, **request_parameters)[source]¶
Returns tag count.
- Parameters
name (basestring) – name query parameter.
name_space (basestring) – nameSpace query parameter.
attribute_name (basestring) – attributeName query parameter.
level (basestring) – level query parameter.
size (basestring) – size in kilobytes(KB).
system_tag (basestring) – systemTag query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag_by_id(id, headers=None, **request_parameters)[source]¶
Returns tag specified by Id.
- Parameters
id (basestring) – Tag ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- remove_tag_member(id, member_id, headers=None, **request_parameters)[source]¶
Removes Tag member from the tag specified by id.
- Parameters
id (basestring) – Tag ID.
member_id (basestring) – TagMember id to be removed from tag.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag_members_by_id(id, member_type, level='0', limit=None, member_association_type=None, offset=None, headers=None, **request_parameters)[source]¶
Returns tag members specified by id.
- Parameters
id (basestring) – Tag ID.
member_type (basestring) – Entity type of the member. Possible values can be retrieved by using /tag/member/type API.
offset (basestring) – Used for pagination. It indicates the starting row number out of available member records.
limit (basestring) – Used to Number of maximum members to return in the result.
member_association_type (basestring) – Indicates how the member is associated with the tag. Possible values and description. 1) DYNAMIC : The member is associated to the tag through rules. 2) STATIC – The member is associated to the tag manually. 3) MIXED – The member is associated manually and also satisfies the rule defined for the tag.
level (basestring) – level query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag(additional_info_attributes=None, additional_info_name_space=None, field=None, level=None, limit=None, name=None, offset=None, order=None, size=None, sort_by=None, system_tag=None, headers=None, **request_parameters)[source]¶
Returns the tags for given filter criteria.
- Parameters
name (basestring) – Tag name is mandatory when filter operation is used.
additional_info_name_space (basestring) – additionalInfo.nameSpace query parameter.
additional_info_attributes (basestring) – additionalInfo.attributes query parameter.
level (basestring) – level query parameter.
offset (basestring) – offset query parameter.
limit (basestring) – limit query parameter.
size (basestring) – size in kilobytes(KB).
field (basestring) – Available field names are :’name,id,p arentId,type,additionalInfo.nameSpace,ad ditionalInfo.attributes’.
sort_by (basestring) – Only supported attribute is name. SortyBy is mandatory when order is used.
order (basestring) – Available values are asc and des.
system_tag (basestring) – systemTag query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
task¶
- class Task[source]¶
Cisco DNA Center Task API (version: 2.1.1).
Wraps the DNA Center Task API and exposes the API as native Python methods that return native Python objects.
- get_task_count(data=None, end_time=None, error_code=None, failure_reason=None, is_error=None, parent_id=None, progress=None, service_type=None, start_time=None, username=None, headers=None, **request_parameters)[source]¶
Returns Task count.
- Parameters
start_time (basestring) – This is the epoch start time from which tasks need to be fetched.
end_time (basestring) – This is the epoch end time upto which audit records need to be fetched.
data (basestring) – Fetch tasks that contains this data.
error_code (basestring) – Fetch tasks that have this error code.
service_type (basestring) – Fetch tasks with this service type.
username (basestring) – Fetch tasks with this username.
progress (basestring) – Fetch tasks that contains this progress.
is_error (basestring) – Fetch tasks ended as success or failure. Valid values: true, false.
failure_reason (basestring) – Fetch tasks that contains this failure reason.
parent_id (basestring) – Fetch tasks that have this parent Id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_task_by_id(task_id, headers=None, **request_parameters)[source]¶
Returns a task by specified id.
- Parameters
task_id (basestring) – UUID of the Task.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tasks(data=None, end_time=None, error_code=None, failure_reason=None, is_error=None, limit=None, offset=None, order=None, parent_id=None, progress=None, service_type=None, sort_by=None, start_time=None, username=None, headers=None, **request_parameters)[source]¶
Returns task(s) based on filter criteria.
- Parameters
start_time (basestring) – This is the epoch start time from which tasks need to be fetched.
end_time (basestring) – This is the epoch end time upto which audit records need to be fetched.
data (basestring) – Fetch tasks that contains this data.
error_code (basestring) – Fetch tasks that have this error code.
service_type (basestring) – Fetch tasks with this service type.
username (basestring) – Fetch tasks with this username.
progress (basestring) – Fetch tasks that contains this progress.
is_error (basestring) – Fetch tasks ended as success or failure. Valid values: true, false.
failure_reason (basestring) – Fetch tasks that contains this failure reason.
parent_id (basestring) – Fetch tasks that have this parent Id.
offset (basestring) – offset query parameter.
limit (basestring) – limit query parameter.
sort_by (basestring) – Sort results by this field.
order (basestring) – Sort order asc or dsc.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_task_tree(task_id, headers=None, **request_parameters)[source]¶
Returns a task with its children tasks by based on their id.
- Parameters
task_id (basestring) – UUID of the Task.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_task_by_operationid(limit, offset, operation_id, headers=None, **request_parameters)[source]¶
Returns root tasks associated with an Operationid.
- Parameters
operation_id (basestring) – operationId path parameter.
offset (int) – Index, minimum value is 0.
limit (int) – The maximum value of {limit} supported is 500. Base 1 indexing for {limit}, minimum value is 1.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
topology¶
- class Topology[source]¶
Cisco DNA Center Topology API (version: 2.1.1).
Wraps the DNA Center Topology API and exposes the API as native Python methods that return native Python objects.
- get_vlan_details(headers=None, **request_parameters)[source]¶
Returns the list of VLAN names.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_site_topology(headers=None, **request_parameters)[source]¶
Returns site topology.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_physical_topology(node_type=None, headers=None, **request_parameters)[source]¶
Returns the raw physical topology by specified criteria of nodeType.
- Parameters
node_type (basestring) – nodeType query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_topology_details(vlan_id, headers=None, **request_parameters)[source]¶
Returns Layer 2 network topology by specified VLAN ID.
- Parameters
vlan_id (basestring) – Vlan Name for e.g Vlan1, Vlan23 etc.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_l3_topology_details(topology_type, headers=None, **request_parameters)[source]¶
Returns the Layer 3 network topology by routing protocol.
- Parameters
topology_type (basestring) – Type of topology(OSPF,ISIS,etc).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_overall_network_health(timestamp=None, headers=None, **request_parameters)[source]¶
Returns Overall Network Health information by Device category (Access, Distribution, Core, Router, Wireless) for any given point of time.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
users¶
- class Users[source]¶
Cisco DNA Center Users API (version: 2.1.1).
Wraps the DNA Center Users API and exposes the API as native Python methods that return native Python objects.
- get_user_enrichment_details(headers=None, **request_parameters)[source]¶
Enriches a given network End User context (a network user-id or end user’s device Mac Address) with details about the user and devices that the user is connected to.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
wireless¶
- class Wireless[source]¶
Cisco DNA Center Wireless API (version: 2.1.1).
Wraps the DNA Center Wireless API and exposes the API as native Python methods that return native Python objects.
- retrieve_rf_profiles(rf_profile_name=None, headers=None, **request_parameters)[source]¶
Retrieve all RF profiles.
- Parameters
rf_profile_name (basestring) – rf-profile-name query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_and_provision_ssid(enableFabric=None, flexConnect=None, managedAPLocations=None, ssidDetails=None, ssidType=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates SSID, updates the SSID to the corresponding site profiles and provision it to the devices matching the given sites.
- Parameters
enableFabric (boolean) – enableFabric, property of the request body.
flexConnect (object) – Flex Connect Applicable for non fabric profile, property of the request body.
managedAPLocations (list) – Managed AP Locations (Enter entire Site(s) hierarchy), property of the request body (list of strings).
ssidDetails (object) – SsidDetails, property of the request body.
ssidType (string) – SSID Type, property of the request body. Available values are ‘Guest’ and ‘Enterprise’.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_rf_profiles(rf_profile_name, headers=None, **request_parameters)[source]¶
Delete RF profile(s).
- Parameters
rf_profile_name (basestring) – rf-profile-name path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_wireless_profile(profileDetails=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates Wireless Network Profile on DNAC and associates sites and SSIDs to it.
- Parameters
profileDetails (object) – Profile Details, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- provision_update(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates wireless provisioning.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_enterprise_ssid(enableBroadcastSSID=None, enableFastLane=None, enableMACFiltering=None, fastTransition=None, name=None, passphrase=None, radioPolicy=None, securityLevel=None, trafficType=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates enterprise SSID.
- Parameters
enableBroadcastSSID (boolean) – enableBroadcastSSID, property of the request body.
enableFastLane (boolean) – enableFastLane, property of the request body.
enableMACFiltering (boolean) – enableMACFiltering, property of the request body.
fastTransition (string) – Fast Transition, property of the request body. Available values are ‘Adaptive’, ‘Enable’ and ‘Disable’.
name (string) – Enter SSID Name, property of the request body. Constraints: maxLength set to 32.
passphrase (string) – Pass Phrase (Only applicable for SSID with PERSONAL security level), property of the request body. Constraints: maxLength set to 63 and minLength set to 8.
radioPolicy (string) – Radio Policy, property of the request body. Available values are ‘Dual band operation (2.4GHz and 5GHz)’, ‘Dual band operation with band select’, ‘5GHz only’ and ‘2.4GHz only’.
securityLevel (string) – Security Level, property of the request body. Available values are ‘WPA2_ENTERPRISE’, ‘WPA2_PERSONAL’ and ‘OPEN’.
trafficType (string) – Traffic Type, property of the request body. Available values are ‘voicedata’ and ‘data’.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_wireless_profile(profile_name=None, headers=None, **request_parameters)[source]¶
Gets either one or all the wireless network profiles if no name is provided for network-profile.
- Parameters
profile_name (basestring) – profileName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_or_update_rf_profile(channelWidth=None, defaultRfProfile=None, enableBrownField=None, enableCustom=None, enableRadioTypeA=None, enableRadioTypeB=None, name=None, radioTypeAProperties=None, radioTypeBProperties=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Create or Update RF profile.
- Parameters
channelWidth (string) – Channel Width, property of the request body.
defaultRfProfile (boolean) – defaultRfProfile, property of the request body.
enableBrownField (boolean) – enableBrownField, property of the request body.
enableCustom (boolean) – enableCustom, property of the request body.
enableRadioTypeA (boolean) – enableRadioTypeA, property of the request body.
enableRadioTypeB (boolean) – enableRadioTypeB, property of the request body.
name (string) – Name, property of the request body.
radioTypeAProperties (object) – Radio Type AProperties, property of the request body.
radioTypeBProperties (object) – Radio Type BProperties, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_enterprise_ssid(ssid_name, headers=None, **request_parameters)[source]¶
Deletes given enterprise SSID.
- Parameters
ssid_name (basestring) – Enter the SSID name to be deleted.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- provision(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Provision wireless devices.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_enterprise_ssid(ssid_name=None, headers=None, **request_parameters)[source]¶
Gets either one or all the enterprise SSID.
- Parameters
ssid_name (basestring) – Enter the enterprise SSID name that needs to be retrieved. If not entered, all the enterprise SSIDs will be retrieved.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- ap_provision(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Provision wireless Access points.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- ap_provision_and_re_provision(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Access Point Provision and ReProvision .
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_wireless_profile(profileDetails=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates the wireless Network Profile with updated details provided. All sites to be present in the network profile should be provided.
- Parameters
profileDetails (object) – Profile Details, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_wireless_profile(wireless_profile_name, headers=None, **request_parameters)[source]¶
Delete the Wireless Profile from DNAC whose name is provided.
- Parameters
wireless_profile_name (basestring) – wirelessProfileName path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_ssid_and_provision_it_to_devices(managed_aplocations, ssid_name, headers=None, **request_parameters)[source]¶
Removes SSID or WLAN from the network profile, reprovision the device(s) and deletes the SSID or WLAN from DNA Center.
- Parameters
ssid_name (basestring) – ssidName path parameter.
managed_aplocations (basestring) – managedAPLocations path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
DNACenterAPI v2.1.2¶
application_policy¶
- class ApplicationPolicy[source]¶
Cisco DNA Center Application Policy API (version: 2.1.2).
Wraps the DNA Center Application Policy API and exposes the API as native Python methods that return native Python objects.
- get_applications_count(headers=None, **request_parameters)[source]¶
Get the number of all existing applications.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- edit_application(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Edit the attributes of an existing application.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_application_set(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Create new custom application-set/s.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_applications(limit=500, name=None, offset=1, headers=None, **request_parameters)[source]¶
Get applications by offset/limit or by name.
- Parameters
offset (int) – The offset of the first application to be returned.
limit (int) – The maximum number of applications to be returned.
name (basestring) – Application’s name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_application_set(id, headers=None, **request_parameters)[source]¶
Delete existing application-set by it’s id.
- Parameters
id (basestring) – id query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_application_sets(limit=500, name=None, offset=1, headers=None, **request_parameters)[source]¶
Get appllication-sets by offset/limit or by name.
- Parameters
offset (int) – offset query parameter.
limit (int) – limit query parameter.
name (basestring) – name query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_application(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Create new Custom application.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_application_sets_count(headers=None, **request_parameters)[source]¶
Get the number of existing application-sets .
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_application(id, headers=None, **request_parameters)[source]¶
Delete existing application by its id.
- Parameters
id (basestring) – Application’s Id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
applications¶
- class Applications[source]¶
Cisco DNA Center Applications API (version: 2.1.2).
Wraps the DNA Center Applications API and exposes the API as native Python methods that return native Python objects.
- applications(application_health=None, device_id=None, end_time=None, limit=None, mac_address=None, offset=None, site_id=None, start_time=None, headers=None, **request_parameters)[source]¶
Intent API to get a list of applications for a specific site, a device, or a client device’s MAC address.
- Parameters
site_id (basestring) – Assurance site UUID value (Cannot be submitted together with deviceId and clientMac).
device_id (basestring) – Assurance device UUID value (Cannot be submitted together with siteId and clientMac).
mac_address (basestring) – Client device’s MAC address (Cannot be submitted together with siteId and deviceId).
start_time (int) – Starting epoch time in milliseconds of time window.
end_time (int) – Ending epoch time in milliseconds of time window.
application_health (basestring) – Application health category (POOR, FAIR, or GOOD. Optionally use with siteId only).
offset (int) – The offset of the first application in the returned data (optionally used with siteId only).
limit (int) – The max number of application entries in returned data [1, 1000] (optionally used with siteId only).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
clients¶
- class Clients[source]¶
Cisco DNA Center Clients API (version: 2.1.2).
Wraps the DNA Center Clients API and exposes the API as native Python methods that return native Python objects.
- get_overall_client_health(timestamp=None, headers=None, **request_parameters)[source]¶
Returns Overall Client Health information by Client type (Wired and Wireless) for any given point of time.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_client_enrichment_details(headers=None, **request_parameters)[source]¶
Enriches a given network End User context (a network user-id or end user’s device Mac Address) with details about the user, the devices that the user is connected to and the assurance issues that the user is impacted by.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_client_detail(mac_address, timestamp=None, headers=None, **request_parameters)[source]¶
Returns detailed Client information retrieved by Mac Address for any given point of time. .
- Parameters
timestamp (basestring, int) – Epoch time(in milliseconds) when the Client health data is required.
mac_address (basestring) – MAC Address of the client.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
command_runner¶
- class CommandRunner[source]¶
Cisco DNA Center Command Runner API (version: 2.1.2).
Wraps the DNA Center Command Runner API and exposes the API as native Python methods that return native Python objects.
- get_all_keywords_of_clis_accepted(headers=None, **request_parameters)[source]¶
Get valid keywords.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- run_read_only_commands_on_devices(commands=None, description=None, deviceUuids=None, name=None, timeout=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Submit request for read-only CLIs.
- Parameters
commands (list) – CommandRunnerDTO’s commands (list of strings).
description (string) – CommandRunnerDTO’s description.
deviceUuids (list) – CommandRunnerDTO’s deviceUuids (list of strings).
name (string) – CommandRunnerDTO’s name.
timeout (number) – CommandRunnerDTO’s timeout.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
configuration_archive¶
- class ConfigurationArchive[source]¶
Cisco DNA Center Configuration Archive API (version: 2.1.2).
Wraps the DNA Center Configuration Archive API and exposes the API as native Python methods that return native Python objects.
- export_device_configurations(headers=None, **request_parameters)[source]¶
Export Device configurations to an encrypted zip file.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
configuration_templates¶
- class ConfigurationTemplates[source]¶
Cisco DNA Center Configuration Templates API (version: 2.1.2).
Wraps the DNA Center Configuration Templates API and exposes the API as native Python methods that return native Python objects.
- create_project(createTime=None, description=None, id=None, lastUpdateTime=None, name=None, tags=None, templates=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates a new project.
- Parameters
createTime (number) – ProjectDTO’s createTime.
description (string) – ProjectDTO’s description.
id (string) – ProjectDTO’s id.
lastUpdateTime (number) – ProjectDTO’s lastUpdateTime.
name (string) – ProjectDTO’s name.
tags (list) – ProjectDTO’s tags (list of string, objects).
templates – Part of the JSON serializable Python object to send in the body of the Request.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- gets_the_templates_available(filter_conflicting_templates=None, product_family=None, product_series=None, product_type=None, project_id=None, software_type=None, software_version=None, headers=None, **request_parameters)[source]¶
List the templates available.
- Parameters
project_id (basestring) – projectId query parameter.
software_type (basestring) – softwareType query parameter.
software_version (basestring) – softwareVersion query parameter.
product_family (basestring) – productFamily query parameter.
product_series (basestring) – productSeries query parameter.
product_type (basestring) – productType query parameter.
filter_conflicting_templates (bool) – filterConflictingTemplates query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_projects(name=None, headers=None, **request_parameters)[source]¶
Returns the projects in the system.
- Parameters
name (basestring) – Name of project to be searched.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- deploy_template(forcePushTemplate=None, isComposite=None, mainTemplateId=None, memberTemplateDeploymentInfo=None, targetInfo=None, templateId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Deploys a template.
- Parameters
forcePushTemplate (boolean) – TemplateDeploymentInfo’s forcePushTemplate.
isComposite (boolean) – TemplateDeploymentInfo’s isComposite.
mainTemplateId (string) – TemplateDeploymentInfo’s mainTemplateId.
memberTemplateDeploymentInfo (list) – TemplateDeploymentInfo’s memberTemplateDeploymentInfo (list of any objects).
targetInfo (list) – TemplateDeploymentInfo’s targetInfo (list of objects).
templateId (string) – TemplateDeploymentInfo’s templateId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- version_template(comments=None, templateId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates Versioning for the current contents of the template.
- Parameters
comments (string) – TemplateVersionRequestDTO’s comments.
templateId (string) – TemplateVersionRequestDTO’s templateId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_template(author=None, composite=None, containingTemplates=None, createTime=None, description=None, deviceTypes=None, failurePolicy=None, id=None, lastUpdateTime=None, name=None, parentTemplateId=None, projectId=None, projectName=None, rollbackTemplateContent=None, rollbackTemplateParams=None, softwareType=None, softwareVariant=None, softwareVersion=None, tags=None, templateContent=None, templateParams=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates an existing template.
- Parameters
author (string) – TemplateDTO’s author.
composite (boolean) – TemplateDTO’s composite.
containingTemplates (list) – TemplateDTO’s containingTemplates (list of objects).
createTime (number) – TemplateDTO’s createTime.
description (string) – TemplateDTO’s description.
deviceTypes (list) – TemplateDTO’s deviceTypes (list of objects).
failurePolicy (string) – TemplateDTO’s failurePolicy. Available values are ‘ABORT_ON_ERROR’, ‘CONTINUE_ON_ERROR’, ‘ROLLBACK_ON_ERROR’, ‘ROLLBACK_TARGET_ON_ERROR’ and ‘ABORT_TARGET_ON_ERROR’.
id (string) – TemplateDTO’s id.
lastUpdateTime (number) – TemplateDTO’s lastUpdateTime.
name (string) – TemplateDTO’s name.
parentTemplateId (string) – TemplateDTO’s parentTemplateId.
projectId (string) – TemplateDTO’s projectId.
projectName (string) – TemplateDTO’s projectName.
rollbackTemplateContent (string) – TemplateDTO’s rollbackTemplateContent.
rollbackTemplateParams (list) – TemplateDTO’s rollbackTemplateParams (list of objects).
softwareType (string) – TemplateDTO’s softwareType.
softwareVariant (string) – TemplateDTO’s softwareVariant.
softwareVersion (string) – TemplateDTO’s softwareVersion.
tags (list) – TemplateDTO’s tags (list of string, objects).
templateContent (string) – TemplateDTO’s templateContent.
templateParams (list) – TemplateDTO’s templateParams (list of objects).
version (string) – TemplateDTO’s version.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_template_details(template_id, latest_version=None, headers=None, **request_parameters)[source]¶
Returns details of the specified template.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_project(createTime=None, description=None, id=None, lastUpdateTime=None, name=None, tags=None, templates=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates an existing project.
- Parameters
createTime (number) – ProjectDTO’s createTime.
description (string) – ProjectDTO’s description.
id (string) – ProjectDTO’s id.
lastUpdateTime (number) – ProjectDTO’s lastUpdateTime.
name (string) – ProjectDTO’s name.
tags (list) – ProjectDTO’s tags (list of string, objects).
templates – Part of the JSON serializable Python object to send in the body of the Request.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_template_deployment_status(deployment_id, headers=None, **request_parameters)[source]¶
Returns the status of a deployed template.
- Parameters
deployment_id (basestring) – deploymentId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_template(template_id, headers=None, **request_parameters)[source]¶
Deletes an existing template.
- Parameters
template_id (basestring) – templateId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_template_versions(template_id, headers=None, **request_parameters)[source]¶
Returns the versions of a specified template.
- Parameters
template_id (basestring) – templateId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_project(project_id, headers=None, **request_parameters)[source]¶
Deletes an existing Project.
- Parameters
project_id (basestring) – projectId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- preview_template(params=None, templateId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Previews an existing template.
- Parameters
params (object) – TemplatePreviewRequestDTO’s params.
templateId (string) – TemplatePreviewRequestDTO’s templateId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_template(project_id, author=None, composite=None, containingTemplates=None, createTime=None, description=None, deviceTypes=None, failurePolicy=None, id=None, lastUpdateTime=None, name=None, parentTemplateId=None, projectId=None, projectName=None, rollbackTemplateContent=None, rollbackTemplateParams=None, softwareType=None, softwareVariant=None, softwareVersion=None, tags=None, templateContent=None, templateParams=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates a new template.
- Parameters
author (string) – TemplateDTO’s author.
composite (boolean) – TemplateDTO’s composite.
containingTemplates (list) – TemplateDTO’s containingTemplates (list of objects).
createTime (number) – TemplateDTO’s createTime.
description (string) – TemplateDTO’s description.
deviceTypes (list) – TemplateDTO’s deviceTypes (list of objects).
failurePolicy (string) – TemplateDTO’s failurePolicy. Available values are ‘ABORT_ON_ERROR’, ‘CONTINUE_ON_ERROR’, ‘ROLLBACK_ON_ERROR’, ‘ROLLBACK_TARGET_ON_ERROR’ and ‘ABORT_TARGET_ON_ERROR’.
id (string) – TemplateDTO’s id.
lastUpdateTime (number) – TemplateDTO’s lastUpdateTime.
name (string) – TemplateDTO’s name.
parentTemplateId (string) – TemplateDTO’s parentTemplateId.
projectId (string) – TemplateDTO’s projectId.
projectName (string) – TemplateDTO’s projectName.
rollbackTemplateContent (string) – TemplateDTO’s rollbackTemplateContent.
rollbackTemplateParams (list) – TemplateDTO’s rollbackTemplateParams (list of objects).
softwareType (string) – TemplateDTO’s softwareType.
softwareVariant (string) – TemplateDTO’s softwareVariant.
softwareVersion (string) – TemplateDTO’s softwareVersion.
tags (list) – TemplateDTO’s tags (list of string, objects).
templateContent (string) – TemplateDTO’s templateContent.
templateParams (list) – TemplateDTO’s templateParams (list of objects).
version (string) – TemplateDTO’s version.
project_id (basestring) – projectId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
device_onboarding_pnp¶
- class DeviceOnboardingPnp[source]¶
Cisco DNA Center Device Onboarding (PnP) API (version: 2.1.2).
Wraps the DNA Center Device Onboarding (PnP) API and exposes the API as native Python methods that return native Python objects.
- un_claim_device(deviceIdList=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Un-Claims one of more devices with specified workflow.
- Parameters
deviceIdList (list) – UnclaimRequest’s deviceIdList (list of string, objects).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_sync_result_for_virtual_account(domain, name, headers=None, **request_parameters)[source]¶
Returns the summary of devices synced from the given smart account & virtual account with PnP.
- Parameters
domain (basestring) – Smart Account Domain.
name (basestring) – Virtual Account Name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_virtual_account(autoSyncPeriod=None, ccoUser=None, expiry=None, lastSync=None, profile=None, smartAccountId=None, syncResult=None, syncResultStr=None, syncStartTime=None, syncStatus=None, tenantId=None, token=None, virtualAccountId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Registers a Smart Account, Virtual Account and the relevant server profile info with the PnP System & database. The devices present in the registered virtual account are synced with the PnP database as well. The response payload returns the new profile.
- Parameters
autoSyncPeriod (number) – SAVAMapping’s autoSyncPeriod.
ccoUser (string) – SAVAMapping’s ccoUser.
expiry (number) – SAVAMapping’s expiry.
lastSync (number) – SAVAMapping’s lastSync.
profile (object) – SAVAMapping’s profile.
smartAccountId (string) – SAVAMapping’s smartAccountId.
syncResult (object) – SAVAMapping’s syncResult.
syncResultStr (string) – SAVAMapping’s syncResultStr.
syncStartTime (number) – SAVAMapping’s syncStartTime.
syncStatus (string) – SAVAMapping’s syncStatus. Available values are ‘NOT_SYNCED’, ‘SYNCING’, ‘SUCCESS’ and ‘FAILURE’.
tenantId (string) – SAVAMapping’s tenantId.
token (string) – SAVAMapping’s token.
virtualAccountId (string) – SAVAMapping’s virtualAccountId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_device(id, _id=None, deviceInfo=None, runSummaryList=None, systemResetWorkflow=None, systemWorkflow=None, tenantId=None, version=None, workflow=None, workflowParameters=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates device details specified by device id in PnP database.
- Parameters
_id (string) – Device’s _id.
deviceInfo (object) – Device’s deviceInfo.
runSummaryList (list) – Device’s runSummaryList (list of objects).
systemResetWorkflow (object) – Device’s systemResetWorkflow.
systemWorkflow (object) – Device’s systemWorkflow.
tenantId (string) – Device’s tenantId.
version (number) – Device’s version.
workflow (object) – Device’s workflow.
workflowParameters (object) – Device’s workflowParameters.
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- import_devices_in_bulk(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add devices to PnP in bulk.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- deregister_virtual_account(domain, name, headers=None, **request_parameters)[source]¶
Deregisters the specified smart account & virtual account info and the associated device information from the PnP System & database. The devices associated with the deregistered virtual account are removed from the PnP database as well. The response payload contains the deregistered smart & virtual account information.
- Parameters
domain (basestring) – Smart Account Domain.
name (basestring) – Virtual Account Name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_workflow(id, _id=None, addToInventory=None, addedOn=None, configId=None, currTaskIdx=None, description=None, endTime=None, execTime=None, imageId=None, instanceType=None, lastupdateOn=None, name=None, startTime=None, state=None, tasks=None, tenantId=None, type=None, useState=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates an existing workflow.
- Parameters
_id (string) – Workflow’s _id.
addToInventory (boolean) – Workflow’s addToInventory.
addedOn (number) – Workflow’s addedOn.
configId (string) – Workflow’s configId.
currTaskIdx (number) – Workflow’s currTaskIdx.
description (string) – Workflow’s description.
endTime (number) – Workflow’s endTime.
execTime (number) – Workflow’s execTime.
imageId (string) – Workflow’s imageId.
instanceType (string) – Workflow’s instanceType. Available values are ‘SystemWorkflow’, ‘UserWorkflow’ and ‘SystemResetWorkflow’.
lastupdateOn (number) – Workflow’s lastupdateOn.
name (string) – Workflow’s name.
startTime (number) – Workflow’s startTime.
state (string) – Workflow’s state.
tasks (list) – Workflow’s tasks (list of objects).
tenantId (string) – Workflow’s tenantId.
type (string) – Workflow’s type.
useState (string) – Workflow’s useState.
version (number) – Workflow’s version.
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_smart_account_list(headers=None, **request_parameters)[source]¶
Returns the list of Smart Account domains.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- claim_a_device_to_a_site(deviceId=None, siteId=None, type=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Claim a device based on DNA-C Site based design process. Different parameters are required for different device platforms.
- Parameters
deviceId (string) – SiteProvisionRequest’s deviceId.
siteId (string) – SiteProvisionRequest’s siteId.
type (string) – SiteProvisionRequest’s type. Available values are ‘Default’, ‘AccessPoint’, ‘StackSwitch’, ‘Sensor’ and ‘MobilityExpress’.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_pnp_server_profile(autoSyncPeriod=None, ccoUser=None, expiry=None, lastSync=None, profile=None, smartAccountId=None, syncResult=None, syncResultStr=None, syncStartTime=None, syncStatus=None, tenantId=None, token=None, virtualAccountId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates the PnP Server profile in a registered Virtual Account in the PnP database. The response payload returns the updated smart & virtual account info.
- Parameters
autoSyncPeriod (number) – SAVAMapping’s autoSyncPeriod.
ccoUser (string) – SAVAMapping’s ccoUser.
expiry (number) – SAVAMapping’s expiry.
lastSync (number) – SAVAMapping’s lastSync.
profile (object) – SAVAMapping’s profile.
smartAccountId (string) – SAVAMapping’s smartAccountId.
syncResult (object) – SAVAMapping’s syncResult.
syncResultStr (string) – SAVAMapping’s syncResultStr.
syncStartTime (number) – SAVAMapping’s syncStartTime.
syncStatus (string) – SAVAMapping’s syncStatus. Available values are ‘NOT_SYNCED’, ‘SYNCING’, ‘SUCCESS’ and ‘FAILURE’.
tenantId (string) – SAVAMapping’s tenantId.
token (string) – SAVAMapping’s token.
virtualAccountId (string) – SAVAMapping’s virtualAccountId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_virtual_account_list(domain, headers=None, **request_parameters)[source]¶
Returns list of virtual accounts associated with the specified smart account.
- Parameters
domain (basestring) – Smart Account Domain.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_workflow_count(name=None, headers=None, **request_parameters)[source]¶
Returns the workflow count.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_pnp_global_settings(headers=None, **request_parameters)[source]¶
Returns global PnP settings of the user.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_workflow_by_id(id, headers=None, **request_parameters)[source]¶
Returns a workflow specified by id.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_a_workflow(_id=None, addToInventory=None, addedOn=None, configId=None, currTaskIdx=None, description=None, endTime=None, execTime=None, imageId=None, instanceType=None, lastupdateOn=None, name=None, startTime=None, state=None, tasks=None, tenantId=None, type=None, useState=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds a PnP Workflow along with the relevant tasks in the workflow into the PnP database.
- Parameters
_id (string) – Workflow’s _id.
addToInventory (boolean) – Workflow’s addToInventory.
addedOn (number) – Workflow’s addedOn.
configId (string) – Workflow’s configId.
currTaskIdx (number) – Workflow’s currTaskIdx.
description (string) – Workflow’s description.
endTime (number) – Workflow’s endTime.
execTime (number) – Workflow’s execTime.
imageId (string) – Workflow’s imageId.
instanceType (string) – Workflow’s instanceType. Available values are ‘SystemWorkflow’, ‘UserWorkflow’ and ‘SystemResetWorkflow’.
lastupdateOn (number) – Workflow’s lastupdateOn.
name (string) – Workflow’s name.
startTime (number) – Workflow’s startTime.
state (string) – Workflow’s state.
tasks (list) – Workflow’s tasks (list of objects).
tenantId (string) – Workflow’s tenantId.
type (string) – Workflow’s type.
useState (string) – Workflow’s useState.
version (number) – Workflow’s version.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_pnp_global_settings(_id=None, aaaCredentials=None, acceptEula=None, defaultProfile=None, savaMappingList=None, taskTimeOuts=None, tenantId=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates the user’s list of global PnP settings.
- Parameters
_id (string) – Settings’s _id.
aaaCredentials (object) – Settings’s aaaCredentials.
acceptEula (boolean) – Settings’s acceptEula.
defaultProfile (object) – Settings’s defaultProfile.
savaMappingList (list) – Settings’s savaMappingList (list of objects).
taskTimeOuts (object) – Settings’s taskTimeOuts.
tenantId (string) – Settings’s tenantId.
version (number) – Settings’s version.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_workflow_by_id(id, headers=None, **request_parameters)[source]¶
Deletes a workflow specified by id.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- reset_device(deviceResetList=None, projectId=None, workflowId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Recovers a device from a Workflow Execution Error state.
- Parameters
deviceResetList (list) – ResetRequest’s deviceResetList (list of objects).
projectId (string) – ResetRequest’s projectId.
workflowId (string) – ResetRequest’s workflowId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_workflows(limit=None, name=None, offset=None, sort=None, sort_order=None, type=None, headers=None, **request_parameters)[source]¶
Returns the list of workflows based on filter criteria. If a limit is not specified, it will default to return 50 workflows. Pagination and sorting are also supported by this endpoint.
- Parameters
limit (int) – Limits number of results.
offset (int) – Index of first result.
sort (basestring, list, set, tuple) – Comma seperated lost of fields to sort on.
sort_order (basestring) – Sort Order Ascending (asc) or Descending (des).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- sync_virtual_account_devices(autoSyncPeriod=None, ccoUser=None, expiry=None, lastSync=None, profile=None, smartAccountId=None, syncResult=None, syncResultStr=None, syncStartTime=None, syncStatus=None, tenantId=None, token=None, virtualAccountId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Synchronizes the device info from the given smart account & virtual account with the PnP database. The response payload returns a list of synced devices.
- Parameters
autoSyncPeriod (number) – SAVAMapping’s autoSyncPeriod.
ccoUser (string) – SAVAMapping’s ccoUser.
expiry (number) – SAVAMapping’s expiry.
lastSync (number) – SAVAMapping’s lastSync.
profile (object) – SAVAMapping’s profile.
smartAccountId (string) – SAVAMapping’s smartAccountId.
syncResult (object) – SAVAMapping’s syncResult.
syncResultStr (string) – SAVAMapping’s syncResultStr.
syncStartTime (number) – SAVAMapping’s syncStartTime.
syncStatus (string) – SAVAMapping’s syncStatus. Available values are ‘NOT_SYNCED’, ‘SYNCING’, ‘SUCCESS’ and ‘FAILURE’.
tenantId (string) – SAVAMapping’s tenantId.
token (string) – SAVAMapping’s token.
virtualAccountId (string) – SAVAMapping’s virtualAccountId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_by_id(id, headers=None, **request_parameters)[source]¶
Returns device details specified by device id.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_device_by_id_from_pnp(id, headers=None, **request_parameters)[source]¶
Deletes specified device from PnP database.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- preview_config(deviceId=None, siteId=None, type=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Triggers a preview for site-based Day 0 Configuration.
- Parameters
deviceId (string) – SiteProvisionRequest’s deviceId.
siteId (string) – SiteProvisionRequest’s siteId.
type (string) – SiteProvisionRequest’s type. Available values are ‘Default’, ‘AccessPoint’, ‘StackSwitch’, ‘Sensor’ and ‘MobilityExpress’.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_count(cm_state=None, last_contact=None, name=None, onb_state=None, pid=None, project_id=None, project_name=None, serial_number=None, smart_account_id=None, source=None, state=None, virtual_account_id=None, workflow_id=None, workflow_name=None, headers=None, **request_parameters)[source]¶
Returns the device count based on filter criteria. This is useful for pagination.
- Parameters
serial_number (basestring, list, set, tuple) – Device Serial Number.
onb_state (basestring, list, set, tuple) – Device Onboarding State.
cm_state (basestring, list, set, tuple) – Device Connection Manager State.
project_id (basestring, list, set, tuple) – Device Project Id.
workflow_id (basestring, list, set, tuple) – Device Workflow Id.
project_name (basestring, list, set, tuple) – Device Project Name.
workflow_name (basestring, list, set, tuple) – Device Workflow Name.
smart_account_id (basestring, list, set, tuple) – Device Smart Account.
virtual_account_id (basestring, list, set, tuple) – Device Virtual Account.
last_contact (bool) – Device Has Contacted lastContact > 0.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_device(_id=None, deviceInfo=None, runSummaryList=None, systemResetWorkflow=None, systemWorkflow=None, tenantId=None, version=None, workflow=None, workflowParameters=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds a device to the PnP database.
- Parameters
_id (string) – Device’s _id.
deviceInfo (object) – Device’s deviceInfo.
runSummaryList (list) – Device’s runSummaryList (list of objects).
systemResetWorkflow (object) – Device’s systemResetWorkflow.
systemWorkflow (object) – Device’s systemWorkflow.
tenantId (string) – Device’s tenantId.
version (number) – Device’s version.
workflow (object) – Device’s workflow.
workflowParameters (object) – Device’s workflowParameters.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- claim_device(configFileUrl=None, configId=None, deviceClaimList=None, fileServiceId=None, imageId=None, imageUrl=None, populateInventory=None, projectId=None, workflowId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Claims one of more devices with specified workflow.
- Parameters
configFileUrl (string) – ClaimDeviceRequest’s configFileUrl.
configId (string) – ClaimDeviceRequest’s configId.
deviceClaimList (list) – ClaimDeviceRequest’s deviceClaimList (list of objects).
fileServiceId (string) – ClaimDeviceRequest’s fileServiceId.
imageId (string) – ClaimDeviceRequest’s imageId.
imageUrl (string) – ClaimDeviceRequest’s imageUrl.
populateInventory (boolean) – ClaimDeviceRequest’s populateInventory.
projectId (string) – ClaimDeviceRequest’s projectId.
workflowId (string) – ClaimDeviceRequest’s workflowId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_list(cm_state=None, hostname=None, last_contact=None, limit=None, mac_address=None, name=None, offset=None, onb_state=None, pid=None, project_id=None, project_name=None, serial_number=None, site_name=None, smart_account_id=None, sort=None, sort_order=None, source=None, state=None, virtual_account_id=None, workflow_id=None, workflow_name=None, headers=None, **request_parameters)[source]¶
Returns list of devices based on filter crieteria. If a limit is not specified, it will default to return 50 devices. Pagination and sorting are also supported by this endpoint.
- Parameters
limit (int) – Limits number of results.
offset (int) – Index of first result.
sort (basestring, list, set, tuple) – Comma seperated list of fields to sort on.
sort_order (basestring) – Sort Order Ascending (asc) or Descending (des).
serial_number (basestring, list, set, tuple) – Device Serial Number.
onb_state (basestring, list, set, tuple) – Device Onboarding State.
cm_state (basestring, list, set, tuple) – Device Connection Manager State.
project_id (basestring, list, set, tuple) – Device Project Id.
workflow_id (basestring, list, set, tuple) – Device Workflow Id.
project_name (basestring, list, set, tuple) – Device Project Name.
workflow_name (basestring, list, set, tuple) – Device Workflow Name.
smart_account_id (basestring, list, set, tuple) – Device Smart Account.
virtual_account_id (basestring, list, set, tuple) – Device Virtual Account.
last_contact (bool) – Device Has Contacted lastContact > 0.
mac_address (basestring) – Device Mac Address.
hostname (basestring) – Device Hostname.
site_name (basestring) – Device Site Name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_history(serial_number, sort=None, sort_order=None, headers=None, **request_parameters)[source]¶
Returns history for a specific device. Serial number is a required parameter.
- Parameters
serial_number (basestring) – Device Serial Number.
sort (basestring, list, set, tuple) – Comma seperated list of fields to sort on.
sort_order (basestring) – Sort Order Ascending (asc) or Descending (des).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
device_replacement¶
- class DeviceReplacement[source]¶
Cisco DNA Center Device Replacement API (version: 2.1.2).
Wraps the DNA Center Device Replacement API and exposes the API as native Python methods that return native Python objects.
- unmark_device_for_replacement(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
UnMarks device for replacement.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- deploy_device_replacement_workflow(faultyDeviceSerialNumber=None, replacementDeviceSerialNumber=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to trigger RMA workflow that will replace faulty device with replacement device with same configuration and images.
- Parameters
faultyDeviceSerialNumber (string) – DeviceReplacementWorkflowDTO’s faultyDeviceSerialNumber.
replacementDeviceSerialNumber (string) – DeviceReplacementWorkflowDTO’s replacementDeviceSerialNumber.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- mark_device_for_replacement(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Marks device for replacement.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- return_replacement_devices_with_details(family=None, faulty_device_name=None, faulty_device_platform=None, faulty_device_serial_number=None, limit=None, offset=None, replacement_device_platform=None, replacement_device_serial_number=None, replacement_status=None, sort_by=None, sort_order=None, headers=None, **request_parameters)[source]¶
Get list of replacement devices with replacement details and it can filter replacement devices based on Faulty Device Name,Faulty Device Platform, Replacement Device Platform, Faulty Device Serial Number,Replacement Device Serial Number, Device Replacement status, Product Family.
- Parameters
faulty_device_name (basestring) – Faulty Device Name.
faulty_device_platform (basestring) – Faulty Device Platform.
replacement_device_platform (basestring) – Replacement Device Platform.
faulty_device_serial_number (basestring) – Faulty Device Serial Number.
replacement_device_serial_number (basestring) – Replacement Device Serial Number.
replacement_status (basestring, list, set, tuple) – Device Replacement status [READY-FOR- REPLACEMENT, REPLACEMENT-IN-PROGRESS, REPLACEMENT-SCHEDULED, REPLACED, ERROR, NETWORK_READINESS_REQUESTED, NETWORK_READINESS_FAILED].
family (basestring, list, set, tuple) – List of families[Routers, Switches and Hubs, AP].
sort_by (basestring) – SortBy this field. SortBy is mandatory when order is used.
sort_order (basestring) – Order on displayName[ASC,DESC].
offset (int) – offset query parameter.
limit (int) – limit query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- return_replacement_devices_count(replacement_status=None, headers=None, **request_parameters)[source]¶
Get replacement devices count.
- Parameters
replacement_status (basestring, list, set, tuple) – Device Replacement status list[READY-FOR- REPLACEMENT, REPLACEMENT-IN-PROGRESS, REPLACEMENT-SCHEDULED, REPLACED, ERROR].
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
devices¶
- class Devices[source]¶
Cisco DNA Center Devices API (version: 2.1.2).
Wraps the DNA Center Devices API and exposes the API as native Python methods that return native Python objects.
- threat_detail_count(endTime=None, isNewThreat=None, limit=None, offset=None, siteId=None, startTime=None, threatLevel=None, threatType=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
The details count for the Rogue and aWIPS threats.
- Parameters
endTime (number) – endTime, property of the request body.
isNewThreat (boolean) – isNewThreat, property of the request body.
limit (number) – limit, property of the request body.
offset (number) – offset, property of the request body.
siteId (list) – Site Id, property of the request body (list of strings).
startTime (number) – startTime, property of the request body.
threatLevel (list) – Threat Level, property of the request body (list of strings).
threatType (list) – Threat Type, property of the request body (list of strings).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- threat_summary(endTime=None, siteId=None, startTime=None, threatLevel=None, threatType=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
The Threat Summary for the Rogues and aWIPS.
- Parameters
endTime (number) – Threat Parameters’s endTime.
siteId (list) – Threat Parameters’s Site Id (list of strings).
startTime (number) – Threat Parameters’s startTime.
threatLevel (list) – Threat Parameters’s Threat Level (list of strings).
threatType (list) – Threat Parameters’s Threat Type (list of strings).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- threat_details(endTime=None, isNewThreat=None, limit=None, offset=None, siteId=None, startTime=None, threatLevel=None, threatType=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
The details for the Rogue and aWIPS threats.
- Parameters
endTime (number) – Threat Parameters’s endTime.
isNewThreat (boolean) – Threat Parameters’s isNewThreat.
limit (number) – Threat Parameters’s limit.
offset (number) – Threat Parameters’s offset.
siteId (list) – Threat Parameters’s Site Id (list of strings).
startTime (number) – Threat Parameters’s startTime.
threatLevel (list) – Threat Parameters’s Threat Level (list of strings).
threatType (list) – Threat Parameters’s Threat Type (list of strings).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_list(associated_wlc_ip=None, collection_interval=None, collection_status=None, error_code=None, error_description=None, family=None, hostname=None, id=None, license_name=None, license_status=None, license_type=None, location=None, location_name=None, mac_address=None, management_ip_address=None, module_equpimenttype=None, module_name=None, module_operationstatecode=None, module_partnumber=None, module_servicestate=None, module_vendorequipmenttype=None, not_synced_for_minutes=None, platform_id=None, reachability_status=None, role=None, serial_number=None, series=None, software_type=None, software_version=None, type=None, up_time=None, headers=None, **request_parameters)[source]¶
Returns list of network devices based on filter criteria such as management IP address, mac address, hostname, etc. You can use the .* in any value to conduct a wildcard search. For example, to find all hostnames beginning with myhost in the IP address range 192.25.18.n, issue the following request: GET /dna/intent/api/v1/network-de vice?hostname=myhost.*&managementIpAddress=192.25.18..* If id parameter is provided with comma separated ids, it will return the list of network-devices for the given ids and ignores the other request parameters.
- Parameters
hostname (basestring, list, set, tuple) – hostname query parameter.
management_ip_address (basestring, list, set, tuple) – managementIpAddress query parameter.
mac_address (basestring, list, set, tuple) – macAddress query parameter.
location_name (basestring, list, set, tuple) – locationName query parameter.
serial_number (basestring, list, set, tuple) – serialNumber query parameter.
location (basestring, list, set, tuple) – location query parameter.
family (basestring, list, set, tuple) – family query parameter.
series (basestring, list, set, tuple) – series query parameter.
collection_status (basestring, list, set, tuple) – collectionStatus query parameter.
collection_interval (basestring, list, set, tuple) – collectionInterval query parameter.
not_synced_for_minutes (basestring, list, set, tuple) – notSyncedForMinutes query parameter.
error_code (basestring, list, set, tuple) – errorCode query parameter.
error_description (basestring, list, set, tuple) – errorDescription query parameter.
software_version (basestring, list, set, tuple) – softwareVersion query parameter.
software_type (basestring, list, set, tuple) – softwareType query parameter.
platform_id (basestring, list, set, tuple) – platformId query parameter.
reachability_status (basestring, list, set, tuple) – reachabilityStatus query parameter.
up_time (basestring, list, set, tuple) – upTime query parameter.
associated_wlc_ip (basestring, list, set, tuple) – associatedWlcIp query parameter.
license_name (basestring, list, set, tuple) – license.name query parameter.
license_type (basestring, list, set, tuple) – license.type query parameter.
license_status (basestring, list, set, tuple) – license.status query parameter.
module_name (basestring, list, set, tuple) – module+name query parameter.
module_equpimenttype (basestring, list, set, tuple) – module+equpimenttype query parameter.
module_servicestate (basestring, list, set, tuple) – module+servicestate query parameter.
module_vendorequipmenttype(basestring – tuple): module+vendorequipmenttype query parameter.
list – tuple): module+vendorequipmenttype query parameter.
set – tuple): module+vendorequipmenttype query parameter.
- :paramtuple): module+vendorequipmenttype query
parameter.
- Parameters
module_partnumber (basestring, list, set, tuple) – module+partnumber query parameter.
module_operationstatecode (basestring, list, set, tuple) – module+operationstatecode query parameter.
id (basestring) – Accepts comma separated ids and return list of network-devices for the given ids. If invalid or not-found ids are provided, null entry will be returned in the list.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_interface_vlans(id, interface_type=None, headers=None, **request_parameters)[source]¶
Returns Device Interface VLANs.
- Parameters
id (basestring) – id path parameter.
interface_type (basestring) – Vlan assocaited with sub- interface.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_interfaces_by_specified_range(device_id, records_to_return, start_index, headers=None, **request_parameters)[source]¶
Returns the list of interfaces for the device for the specified range.
- Parameters
device_id (basestring) – Device ID.
start_index (int) – Start index.
records_to_return (int) – Number of records to return.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_module_info_by_id(id, headers=None, **request_parameters)[source]¶
Returns Module info by id.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_polling_interval_for_all_devices(headers=None, **request_parameters)[source]¶
Returns polling interval of all devices.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_device_by_id(id, is_force_delete=None, headers=None, **request_parameters)[source]¶
Deletes the network device for the given Id.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_interface_count(headers=None, **request_parameters)[source]¶
Returns the count of interfaces for all devices.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- sync_devices_using_forcesync(force_sync=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Synchronizes the devices. If forceSync param is false (default) then the sync would run in normal priority thread. If forceSync param is true then the sync would run in high priority thread if available, else the sync will fail. Result can be seen in the child task of each device.
- Parameters
force_sync (bool) – forceSync query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_device(cliTransport=None, computeDevice=None, enablePassword=None, extendedDiscoveryInfo=None, httpPassword=None, httpPort=None, httpSecure=None, httpUserName=None, ipAddress=None, merakiOrgId=None, netconfPort=None, password=None, serialNumber=None, snmpAuthPassphrase=None, snmpAuthProtocol=None, snmpMode=None, snmpPrivPassphrase=None, snmpPrivProtocol=None, snmpROCommunity=None, snmpRWCommunity=None, snmpRetry=None, snmpTimeout=None, snmpUserName=None, snmpVersion=None, type=None, updateMgmtIPaddressList=None, userName=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds the device with given credential.
- Parameters
cliTransport (string) – InventoryDeviceInfo’s cliTransport.
computeDevice (boolean) – InventoryDeviceInfo’s computeDevice.
enablePassword (string) – InventoryDeviceInfo’s enablePassword.
extendedDiscoveryInfo (string) – InventoryDeviceInfo’s extendedDiscoveryInfo.
httpPassword (string) – InventoryDeviceInfo’s httpPassword.
httpPort (string) – InventoryDeviceInfo’s httpPort.
httpSecure (boolean) – InventoryDeviceInfo’s httpSecure.
httpUserName (string) – InventoryDeviceInfo’s httpUserName.
ipAddress (list) – InventoryDeviceInfo’s ipAddress (list of strings).
merakiOrgId (list) – InventoryDeviceInfo’s merakiOrgId (list of strings).
netconfPort (string) – InventoryDeviceInfo’s netconfPort.
password (string) – InventoryDeviceInfo’s password.
serialNumber (string) – InventoryDeviceInfo’s serialNumber.
snmpAuthPassphrase (string) – InventoryDeviceInfo’s snmpAuthPassphrase.
snmpAuthProtocol (string) – InventoryDeviceInfo’s snmpAuthProtocol.
snmpMode (string) – InventoryDeviceInfo’s snmpMode.
snmpPrivPassphrase (string) – InventoryDeviceInfo’s snmpPrivPassphrase.
snmpPrivProtocol (string) – InventoryDeviceInfo’s snmpPrivProtocol.
snmpROCommunity (string) – InventoryDeviceInfo’s snmpROCommunity.
snmpRWCommunity (string) – InventoryDeviceInfo’s snmpRWCommunity.
snmpRetry (number) – InventoryDeviceInfo’s snmpRetry.
snmpTimeout (number) – InventoryDeviceInfo’s snmpTimeout.
snmpUserName (string) – InventoryDeviceInfo’s snmpUserName.
snmpVersion (string) – InventoryDeviceInfo’s snmpVersion.
type (string) – InventoryDeviceInfo’s type. Available values are ‘COMPUTE_DEVICE’, ‘MERAKI_DASHBOARD’, ‘NETWORK_DEVICE’ and ‘NODATACHANGE’.
updateMgmtIPaddressList (list) – InventoryDeviceInfo’s updateMgmtIPaddressList (list of objects).
userName (string) – InventoryDeviceInfo’s userName.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_interface_details(device_id, name, headers=None, **request_parameters)[source]¶
Returns interface by specified device Id and interface name.
- Parameters
device_id (basestring) – Device ID.
name (basestring) – Interface name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_interface_count_by_id(device_id, headers=None, **request_parameters)[source]¶
Returns the interface count for the given device.
- Parameters
device_id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_count(headers=None, **request_parameters)[source]¶
Returns the count of network devices based on the filter criteria by management IP address, mac address, hostname and location name.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_ospf_interfaces(headers=None, **request_parameters)[source]¶
Returns the interfaces that has OSPF enabled.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_polling_interval_by_id(id, headers=None, **request_parameters)[source]¶
Returns polling interval by device id.
- Parameters
id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_functional_capability_by_id(id, headers=None, **request_parameters)[source]¶
Returns functional capability with given Id.
- Parameters
id (basestring) – Functional Capability UUID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_organization_list_for_meraki(id, headers=None, **request_parameters)[source]¶
Returns list of organizations for meraki dashboard.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_config_count(headers=None, **request_parameters)[source]¶
Returns the count of device configs.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_config_by_id(network_device_id, headers=None, **request_parameters)[source]¶
Returns the device config by specified device ID.
- Parameters
network_device_id (basestring) – networkDeviceId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_summary(id, headers=None, **request_parameters)[source]¶
Returns brief summary of device info such as hostname, management IP address for the given device Id.
- Parameters
id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_module_count(device_id, name_list=None, operational_state_code_list=None, part_number_list=None, vendor_equipment_type_list=None, headers=None, **request_parameters)[source]¶
Returns Module Count.
- Parameters
device_id (basestring) – deviceId query parameter.
name_list (basestring, list, set, tuple) – nameList query parameter.
vendor_equipment_type_list(basestring – tuple): vendorEquipmentTypeList query parameter.
list – tuple): vendorEquipmentTypeList query parameter.
set – tuple): vendorEquipmentTypeList query parameter.
- :paramtuple): vendorEquipmentTypeList query
parameter.
- Parameters
- :paramtuple): operationalStateCodeList query
parameter.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_isis_interfaces(headers=None, **request_parameters)[source]¶
Returns the interfaces that has ISIS enabled.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_by_id(id, headers=None, **request_parameters)[source]¶
Returns the network device details for the given device ID.
- Parameters
id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- sync_devices(cliTransport=None, computeDevice=None, enablePassword=None, extendedDiscoveryInfo=None, httpPassword=None, httpPort=None, httpSecure=None, httpUserName=None, ipAddress=None, merakiOrgId=None, netconfPort=None, password=None, serialNumber=None, snmpAuthPassphrase=None, snmpAuthProtocol=None, snmpMode=None, snmpPrivPassphrase=None, snmpPrivProtocol=None, snmpROCommunity=None, snmpRWCommunity=None, snmpRetry=None, snmpTimeout=None, snmpUserName=None, snmpVersion=None, type=None, updateMgmtIPaddressList=None, userName=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Sync the devices provided as input.
- Parameters
cliTransport (string) – InventoryDeviceInfo’s cliTransport.
computeDevice (boolean) – InventoryDeviceInfo’s computeDevice.
enablePassword (string) – InventoryDeviceInfo’s enablePassword.
extendedDiscoveryInfo (string) – InventoryDeviceInfo’s extendedDiscoveryInfo.
httpPassword (string) – InventoryDeviceInfo’s httpPassword.
httpPort (string) – InventoryDeviceInfo’s httpPort.
httpSecure (boolean) – InventoryDeviceInfo’s httpSecure.
httpUserName (string) – InventoryDeviceInfo’s httpUserName.
ipAddress (list) – InventoryDeviceInfo’s ipAddress (list of strings).
merakiOrgId (list) – InventoryDeviceInfo’s merakiOrgId (list of strings).
netconfPort (string) – InventoryDeviceInfo’s netconfPort.
password (string) – InventoryDeviceInfo’s password.
serialNumber (string) – InventoryDeviceInfo’s serialNumber.
snmpAuthPassphrase (string) – InventoryDeviceInfo’s snmpAuthPassphrase.
snmpAuthProtocol (string) – InventoryDeviceInfo’s snmpAuthProtocol.
snmpMode (string) – InventoryDeviceInfo’s snmpMode.
snmpPrivPassphrase (string) – InventoryDeviceInfo’s snmpPrivPassphrase.
snmpPrivProtocol (string) – InventoryDeviceInfo’s snmpPrivProtocol.
snmpROCommunity (string) – InventoryDeviceInfo’s snmpROCommunity.
snmpRWCommunity (string) – InventoryDeviceInfo’s snmpRWCommunity.
snmpRetry (number) – InventoryDeviceInfo’s snmpRetry.
snmpTimeout (number) – InventoryDeviceInfo’s snmpTimeout.
snmpUserName (string) – InventoryDeviceInfo’s snmpUserName.
snmpVersion (string) – InventoryDeviceInfo’s snmpVersion.
type (string) – InventoryDeviceInfo’s type. Available values are ‘COMPUTE_DEVICE’, ‘MERAKI_DASHBOARD’, ‘NETWORK_DEVICE’ and ‘NODATACHANGE’.
updateMgmtIPaddressList (list) – InventoryDeviceInfo’s updateMgmtIPaddressList (list of objects).
userName (string) – InventoryDeviceInfo’s userName.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_device_role(id=None, role=None, roleSource=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates the role of the device as access, core, distribution, border router.
- Parameters
id (string) – NetworkDeviceBriefNIO’s id.
role (string) – NetworkDeviceBriefNIO’s role.
roleSource (string) – NetworkDeviceBriefNIO’s roleSource.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_interface_by_id(id, headers=None, **request_parameters)[source]¶
Returns the interface for the given interface ID.
- Parameters
id (basestring) – Interface ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_config_for_all_devices(headers=None, **request_parameters)[source]¶
Returns the config for all devices.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_functional_capability_for_devices(device_id, function_name=None, headers=None, **request_parameters)[source]¶
Returns the functional-capability for given devices.
- Parameters
device_id (basestring) – Accepts comma separated deviceid’s and return list of functional-capabilities for the given id’s. If invalid or not-found id’s are provided, null entry will be returned in the list.
function_name (basestring, list, set, tuple) – functionName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- export_device_list(deviceUuids=None, id=None, operationEnum=None, parameters=None, password=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Exports the selected network device to a file.
- Parameters
deviceUuids (list) – ExportDeviceDTO’s deviceUuids (list of strings).
id (string) – ExportDeviceDTO’s id.
operationEnum (string) – ExportDeviceDTO’s operationEnum. Available values are ‘CREDENTIALDETAILS’ and ‘DEVICEDETAILS’.
parameters (list) – ExportDeviceDTO’s parameters (list of strings).
password (string) – ExportDeviceDTO’s password.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_interface_by_ip(ip_address, headers=None, **request_parameters)[source]¶
Returns list of interfaces for specified device management IP address.
- Parameters
ip_address (basestring) – IP address of the interface.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_network_device_by_ip(ip_address, headers=None, **request_parameters)[source]¶
Returns the network device by specified IP address.
- Parameters
ip_address (basestring) – Device IP address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_interface_info_by_id(device_id, headers=None, **request_parameters)[source]¶
Returns list of interfaces by specified device.
- Parameters
device_id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_by_serial_number(serial_number, headers=None, **request_parameters)[source]¶
Returns the network device with given serial number.
- Parameters
serial_number (basestring) – Device serial number.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_modules(device_id, limit=None, name_list=None, offset=None, operational_state_code_list=None, part_number_list=None, vendor_equipment_type_list=None, headers=None, **request_parameters)[source]¶
Returns modules by specified device id.
- Parameters
device_id (basestring) – deviceId query parameter.
limit (basestring) – limit query parameter.
offset (basestring) – offset query parameter.
name_list (basestring, list, set, tuple) – nameList query parameter.
vendor_equipment_type_list(basestring – tuple): vendorEquipmentTypeList query parameter.
list – tuple): vendorEquipmentTypeList query parameter.
set – tuple): vendorEquipmentTypeList query parameter.
- :paramtuple): vendorEquipmentTypeList query
parameter.
- Parameters
- :paramtuple): operationalStateCodeList query
parameter.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- register_device_for_wsa(macaddress=None, serial_number=None, headers=None, **request_parameters)[source]¶
Registers a device for WSA notification.
- Parameters
serial_number (basestring) – Serial number of the device.
macaddress (basestring) – Mac addres of the device.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_network_device_by_pagination_range(records_to_return, start_index, headers=None, **request_parameters)[source]¶
Returns the list of network devices for the given pagination range.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_wireless_lan_controller_details_by_id(id, headers=None, **request_parameters)[source]¶
Returns the wireless lan controller info with given device ID.
- Parameters
id (basestring) – Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_all_interfaces(limit=500, offset=1, headers=None, **request_parameters)[source]¶
Returns all available interfaces. This endpoint can return a maximum of 500 interfaces.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- retrieves_all_network_devices(associated_wlc_ip=None, collection_interval=None, collection_status=None, error_code=None, family=None, hostname=None, limit=None, mac_address=None, management_ip_address=None, offset=None, platform_id=None, reachability_failure_reason=None, reachability_status=None, role=None, role_source=None, serial_number=None, series=None, software_type=None, software_version=None, type=None, up_time=None, vrf_name=None, headers=None, **request_parameters)[source]¶
Gets the list of first 500 network devices sorted lexicographically based on host name. It can be filtered using management IP address, mac address, hostname and location name. If id param is provided, it will be returning the list of network-devices for the given id’s and other request params will be ignored. In case of autocomplete request, returns the list of specified attributes.
- Parameters
vrf_name (basestring) – vrfName query parameter.
management_ip_address (basestring) – managementIpAddress query parameter.
hostname (basestring) – hostname query parameter.
mac_address (basestring) – macAddress query parameter.
family (basestring) – family query parameter.
collection_status (basestring) – collectionStatus query parameter.
collection_interval (basestring) – collectionInterval query parameter.
software_version (basestring) – softwareVersion query parameter.
software_type (basestring) – softwareType query parameter.
reachability_status (basestring) – reachabilityStatus query parameter.
reachability_failure_reason (basestring) – reachabilityFailureReason query parameter.
error_code (basestring) – errorCode query parameter.
platform_id (basestring) – platformId query parameter.
series (basestring) – series query parameter.
type (basestring) – type query parameter.
serial_number (basestring) – serialNumber query parameter.
up_time (basestring) – upTime query parameter.
role (basestring) – role query parameter.
role_source (basestring) – roleSource query parameter.
associated_wlc_ip (basestring) – associatedWlcIp query parameter.
offset (basestring) – offset query parameter.
limit (basestring) – limit query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_detail(identifier, search_by, timestamp=None, headers=None, **request_parameters)[source]¶
Returns detailed Network Device information retrieved by Mac Address, Device Name or UUID for any given point of time. .
- Parameters
timestamp (basestring, int) – Epoch time(in milliseconds) when the device data is required.
search_by (basestring) – MAC Address or Device Name value or UUID of the network device.
identifier (basestring) – One of keywords : macAddress or uuid or nwDeviceName.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- devices(device_role=None, end_time=None, health=None, limit=None, offset=None, site_id=None, start_time=None, headers=None, **request_parameters)[source]¶
Intent API for accessing DNA Assurance Device object for generating reports, creating dashboards or creating additional value added services.
- Parameters
device_role (basestring) – The device role (One of CORE, ACCESS, DISTRIBUTION, ROUTER, WLC, AP).
site_id (basestring) – Assurance site UUID value.
health (basestring) – The device overall health (One of POOR, FAIR, GOOD).
start_time (int) – UTC epoch time in milliseconds.
end_time (int) – UTC epoch time in miliseconds.
limit (int) – Max number of device entries in the response (default to 50. Max at 1000).
offset (int) – The offset of the first device in the returned data.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_enrichment_details(headers=None, **request_parameters)[source]¶
Enriches a given network device context (device id or device Mac Address or device management IP address) with details about the device and neighbor topology.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
discovery¶
- class Discovery[source]¶
Cisco DNA Center Discovery API (version: 2.1.2).
Wraps the DNA Center Discovery API and exposes the API as native Python methods that return native Python objects.
- update_snmp_write_community(comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, writeCommunity=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global SNMP write community.
- Parameters
comments (string) – SNMPv2WriteCommunityDTO’s comments.
credentialType (string) – SNMPv2WriteCommunityDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – SNMPv2WriteCommunityDTO’s description.
id (string) – SNMPv2WriteCommunityDTO’s id.
instanceTenantId (string) – SNMPv2WriteCommunityDTO’s instanceTenantId.
instanceUuid (string) – SNMPv2WriteCommunityDTO’s instanceUuid.
writeCommunity (string) – SNMPv2WriteCommunityDTO’s writeCommunity.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_snmpv3_credentials(authPassword=None, authType=None, comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, privacyPassword=None, privacyType=None, snmpMode=None, username=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global SNMPv3 credential.
- Parameters
authPassword (string) – SNMPv3CredentialDTO’s authPassword.
authType (string) – SNMPv3CredentialDTO’s authType. Available values are ‘SHA’ and ‘MD5’.
comments (string) – SNMPv3CredentialDTO’s comments.
credentialType (string) – SNMPv3CredentialDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – SNMPv3CredentialDTO’s description.
id (string) – SNMPv3CredentialDTO’s id.
instanceTenantId (string) – SNMPv3CredentialDTO’s instanceTenantId.
instanceUuid (string) – SNMPv3CredentialDTO’s instanceUuid.
privacyPassword (string) – SNMPv3CredentialDTO’s privacyPassword.
privacyType (string) – SNMPv3CredentialDTO’s privacyType. Available values are ‘DES’ and ‘AES128’.
snmpMode (string) – SNMPv3CredentialDTO’s snmpMode. Available values are ‘AUTHPRIV’, ‘AUTHNOPRIV’ and ‘NOAUTHNOPRIV’.
username (string) – SNMPv3CredentialDTO’s username.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_count_of_all_discovery_jobs(headers=None, **request_parameters)[source]¶
Returns the count of all available discovery jobs.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_netconf_credentials(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global netconf credentials.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_network_devices_from_discovery(id, cli_status=None, http_status=None, ip_address=None, netconf_status=None, ping_status=None, snmp_status=None, sort_by=None, sort_order=None, task_id=None, headers=None, **request_parameters)[source]¶
Returns the network devices from a discovery job based on given filters. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
task_id (basestring) – taskId query parameter.
sort_by (basestring) – sortBy query parameter.
sort_order (basestring) – sortOrder query parameter.
ip_address (basestring, list, set, tuple) – ipAddress query parameter.
ping_status (basestring, list, set, tuple) – pingStatus query parameter.
snmp_status (basestring, list, set, tuple) – snmpStatus query parameter.
cli_status (basestring, list, set, tuple) – cliStatus query parameter.
netconf_status (basestring, list, set, tuple) – netconfStatus query parameter.
http_status (basestring, list, set, tuple) – httpStatus query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_snmp_properties(headers=None, **request_parameters)[source]¶
Returns SNMP properties.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discoveries_by_range(records_to_return, start_index, headers=None, **request_parameters)[source]¶
Returns the discovery by specified range.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_snmp_read_community(comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, readCommunity=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global SNMP read community.
- Parameters
comments (string) – SNMPv2ReadCommunityDTO’s comments.
credentialType (string) – SNMPv2ReadCommunityDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – SNMPv2ReadCommunityDTO’s description.
id (string) – SNMPv2ReadCommunityDTO’s id.
instanceTenantId (string) – SNMPv2ReadCommunityDTO’s instanceTenantId.
instanceUuid (string) – SNMPv2ReadCommunityDTO’s instanceUuid.
readCommunity (string) – SNMPv2ReadCommunityDTO’s readCommunity.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_http_write_credentials(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global HTTP write credentials.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- start_discovery(cdpLevel=None, discoveryType=None, enablePasswordList=None, globalCredentialIdList=None, httpReadCredential=None, httpWriteCredential=None, ipAddressList=None, ipFilterList=None, lldpLevel=None, name=None, netconfPort=None, noAddNewDevice=None, parentDiscoveryId=None, passwordList=None, preferredMgmtIPMethod=None, protocolOrder=None, reDiscovery=None, retry=None, snmpAuthPassphrase=None, snmpAuthProtocol=None, snmpMode=None, snmpPrivPassphrase=None, snmpPrivProtocol=None, snmpROCommunity=None, snmpROCommunityDesc=None, snmpRWCommunity=None, snmpRWCommunityDesc=None, snmpUserName=None, snmpVersion=None, timeout=None, updateMgmtIp=None, userNameList=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Initiates discovery with the given parameters.
- Parameters
cdpLevel (number) – InventoryRequest’s cdpLevel.
discoveryType (string) – InventoryRequest’s discoveryType.
enablePasswordList (list) – InventoryRequest’s enablePasswordList (list of string, objects).
globalCredentialIdList (list) – InventoryRequest’s globalCredentialIdList (list of string, objects).
httpReadCredential (object) – InventoryRequest’s httpReadCredential.
httpWriteCredential (object) – InventoryRequest’s httpWriteCredential.
ipAddressList (string) – InventoryRequest’s ipAddressList.
ipFilterList (list) – InventoryRequest’s ipFilterList (list of string, objects).
lldpLevel (number) – InventoryRequest’s lldpLevel.
name (string) – InventoryRequest’s name.
netconfPort (string) – InventoryRequest’s netconfPort.
noAddNewDevice (boolean) – InventoryRequest’s noAddNewDevice.
parentDiscoveryId (string) – InventoryRequest’s parentDiscoveryId.
passwordList (list) – InventoryRequest’s passwordList (list of string, objects).
preferredMgmtIPMethod (string) – InventoryRequest’s preferredMgmtIPMethod.
protocolOrder (string) – InventoryRequest’s protocolOrder.
reDiscovery (boolean) – InventoryRequest’s reDiscovery.
retry (number) – InventoryRequest’s retry.
snmpAuthPassphrase (string) – InventoryRequest’s snmpAuthPassphrase.
snmpAuthProtocol (string) – InventoryRequest’s snmpAuthProtocol.
snmpMode (string) – InventoryRequest’s snmpMode.
snmpPrivPassphrase (string) – InventoryRequest’s snmpPrivPassphrase.
snmpPrivProtocol (string) – InventoryRequest’s snmpPrivProtocol.
snmpROCommunity (string) – InventoryRequest’s snmpROCommunity.
snmpROCommunityDesc (string) – InventoryRequest’s snmpROCommunityDesc.
snmpRWCommunity (string) – InventoryRequest’s snmpRWCommunity.
snmpRWCommunityDesc (string) – InventoryRequest’s snmpRWCommunityDesc.
snmpUserName (string) – InventoryRequest’s snmpUserName.
snmpVersion (string) – InventoryRequest’s snmpVersion.
timeout (number) – InventoryRequest’s timeout.
updateMgmtIp (boolean) – InventoryRequest’s updateMgmtIp.
userNameList (list) – InventoryRequest’s userNameList (list of string, objects).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_discovery_by_id(id, headers=None, **request_parameters)[source]¶
Stops the discovery for the given Discovery ID and removes it. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discovery_by_id(id, headers=None, **request_parameters)[source]¶
Returns discovery by Discovery ID. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_credential_sub_type_by_credential_id(id, headers=None, **request_parameters)[source]¶
Returns the credential sub type for the given Id.
- Parameters
id (basestring) – Global Credential ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_snmp_write_community(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global SNMP write community.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_global_credentials(global_credential_id, siteUuids=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Update global credential for network devices in site(s).
- Parameters
siteUuids (list) – SitesInfoDTO’s siteUuids (list of strings).
global_credential_id (basestring) – Global credential Uuid.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_snmp_read_community(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global SNMP read community.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_http_read_credential(comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, password=None, port=None, secure=None, username=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global HTTP Read credential.
- Parameters
comments (string) – HTTPReadCredentialDTO’s comments.
credentialType (string) – HTTPReadCredentialDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – HTTPReadCredentialDTO’s description.
id (string) – HTTPReadCredentialDTO’s id.
instanceTenantId (string) – HTTPReadCredentialDTO’s instanceTenantId.
instanceUuid (string) – HTTPReadCredentialDTO’s instanceUuid.
password (string) – HTTPReadCredentialDTO’s password.
port (number) – HTTPReadCredentialDTO’s port.
secure (boolean) – HTTPReadCredentialDTO’s secure.
username (string) – HTTPReadCredentialDTO’s username.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_cli_credentials(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global CLI credential.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_list_of_discoveries_by_discovery_id(id, ip_address=None, limit=None, offset=None, headers=None, **request_parameters)[source]¶
Returns the list of discovery jobs for the given Discovery ID. The results can be optionally filtered based on IP. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
offset (int) – offset query parameter.
limit (int) – limit query parameter.
ip_address (basestring) – ipAddress query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_snmpv3_credentials(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global SNMPv3 credentials.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discovery_jobs_by_ip(ip_address, limit=None, name=None, offset=None, headers=None, **request_parameters)[source]¶
Returns the list of discovery jobs for the given IP.
- Parameters
offset (int) – offset query parameter.
limit (int) – limit query parameter.
ip_address (basestring) – ipAddress query parameter.
name (basestring) – name query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discovered_devices_by_range(id, records_to_return, start_index, task_id=None, headers=None, **request_parameters)[source]¶
Returns the network devices discovered for the given discovery and for the given range. The maximum number of records that can be retrieved is 500. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
start_index (int) – Start index.
records_to_return (int) – Number of records to return.
task_id (basestring) – taskId query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_devices_discovered_by_id(id, task_id=None, headers=None, **request_parameters)[source]¶
Returns the count of network devices discovered in the given discovery. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
task_id (basestring) – taskId query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- updates_discovery_by_id(attributeInfo=None, cdpLevel=None, deviceIds=None, discoveryCondition=None, discoveryStatus=None, discoveryType=None, enablePasswordList=None, globalCredentialIdList=None, httpReadCredential=None, httpWriteCredential=None, id=None, ipAddressList=None, ipFilterList=None, isAutoCdp=None, lldpLevel=None, name=None, netconfPort=None, numDevices=None, parentDiscoveryId=None, passwordList=None, preferredMgmtIPMethod=None, protocolOrder=None, retryCount=None, snmpAuthPassphrase=None, snmpAuthProtocol=None, snmpMode=None, snmpPrivPassphrase=None, snmpPrivProtocol=None, snmpRoCommunity=None, snmpRoCommunityDesc=None, snmpRwCommunity=None, snmpRwCommunityDesc=None, snmpUserName=None, timeOut=None, updateMgmtIp=None, userNameList=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Stops or starts an existing discovery.
- Parameters
attributeInfo (object) – DiscoveryNIO’s attributeInfo.
cdpLevel (number) – DiscoveryNIO’s cdpLevel.
deviceIds (string) – DiscoveryNIO’s deviceIds.
discoveryCondition (string) – DiscoveryNIO’s discoveryCondition.
discoveryStatus (string) – DiscoveryNIO’s discoveryStatus.
discoveryType (string) – DiscoveryNIO’s discoveryType.
enablePasswordList (string) – DiscoveryNIO’s enablePasswordList.
globalCredentialIdList (list) – DiscoveryNIO’s globalCredentialIdList (list of string, objects).
httpReadCredential (object) – DiscoveryNIO’s httpReadCredential.
httpWriteCredential (object) – DiscoveryNIO’s httpWriteCredential.
id (string) – DiscoveryNIO’s id.
ipAddressList (string) – DiscoveryNIO’s ipAddressList.
ipFilterList (string) – DiscoveryNIO’s ipFilterList.
isAutoCdp (boolean) – DiscoveryNIO’s isAutoCdp.
lldpLevel (number) – DiscoveryNIO’s lldpLevel.
name (string) – DiscoveryNIO’s name.
netconfPort (string) – DiscoveryNIO’s netconfPort.
numDevices (number) – DiscoveryNIO’s numDevices.
parentDiscoveryId (string) – DiscoveryNIO’s parentDiscoveryId.
passwordList (string) – DiscoveryNIO’s passwordList.
preferredMgmtIPMethod (string) – DiscoveryNIO’s preferredMgmtIPMethod.
protocolOrder (string) – DiscoveryNIO’s protocolOrder.
retryCount (number) – DiscoveryNIO’s retryCount.
snmpAuthPassphrase (string) – DiscoveryNIO’s snmpAuthPassphrase.
snmpAuthProtocol (string) – DiscoveryNIO’s snmpAuthProtocol.
snmpMode (string) – DiscoveryNIO’s snmpMode.
snmpPrivPassphrase (string) – DiscoveryNIO’s snmpPrivPassphrase.
snmpPrivProtocol (string) – DiscoveryNIO’s snmpPrivProtocol.
snmpRoCommunity (string) – DiscoveryNIO’s snmpRoCommunity.
snmpRoCommunityDesc (string) – DiscoveryNIO’s snmpRoCommunityDesc.
snmpRwCommunity (string) – DiscoveryNIO’s snmpRwCommunity.
snmpRwCommunityDesc (string) – DiscoveryNIO’s snmpRwCommunityDesc.
snmpUserName (string) – DiscoveryNIO’s snmpUserName.
timeOut (number) – DiscoveryNIO’s timeOut.
updateMgmtIp (boolean) – DiscoveryNIO’s updateMgmtIp.
userNameList (string) – DiscoveryNIO’s userNameList.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_update_snmp_properties(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds SNMP properties.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_http_read_credentials(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds HTTP read credentials.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_netconf_credentials(comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, netconfPort=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global netconf credentials.
- Parameters
comments (string) – NetconfCredentialDTO’s comments.
credentialType (string) – NetconfCredentialDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – NetconfCredentialDTO’s description.
id (string) – NetconfCredentialDTO’s id.
instanceTenantId (string) – NetconfCredentialDTO’s instanceTenantId.
instanceUuid (string) – NetconfCredentialDTO’s instanceUuid.
netconfPort (string) – NetconfCredentialDTO’s netconfPort.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_http_write_credentials(comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, password=None, port=None, secure=None, username=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global HTTP write credentials.
- Parameters
comments (string) – HTTPWriteCredentialDTO’s comments.
credentialType (string) – HTTPWriteCredentialDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – HTTPWriteCredentialDTO’s description.
id (string) – HTTPWriteCredentialDTO’s id.
instanceTenantId (string) – HTTPWriteCredentialDTO’s instanceTenantId.
instanceUuid (string) – HTTPWriteCredentialDTO’s instanceUuid.
password (string) – HTTPWriteCredentialDTO’s password.
port (number) – HTTPWriteCredentialDTO’s port.
secure (boolean) – HTTPWriteCredentialDTO’s secure.
username (string) – HTTPWriteCredentialDTO’s username.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_all_discovery(headers=None, **request_parameters)[source]¶
Stops all the discoveries and removes them.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_discovery_by_specified_range(records_to_delete, start_index, headers=None, **request_parameters)[source]¶
Stops discovery for the given range and removes them.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_global_credentials_by_id(global_credential_id, headers=None, **request_parameters)[source]¶
Deletes global credential for the given ID.
- Parameters
global_credential_id (basestring) – ID of global- credential.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_cli_credentials(comments=None, credentialType=None, description=None, enablePassword=None, id=None, instanceTenantId=None, instanceUuid=None, password=None, username=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global CLI credentials.
- Parameters
comments (string) – CLICredentialDTO’s comments.
credentialType (string) – CLICredentialDTO’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – CLICredentialDTO’s description.
enablePassword (string) – CLICredentialDTO’s enablePassword.
id (string) – CLICredentialDTO’s id.
instanceTenantId (string) – CLICredentialDTO’s instanceTenantId.
instanceUuid (string) – CLICredentialDTO’s instanceUuid.
password (string) – CLICredentialDTO’s password.
username (string) – CLICredentialDTO’s username.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discovered_network_devices_by_discovery_id(id, task_id=None, headers=None, **request_parameters)[source]¶
Returns the network devices discovered for the given Discovery ID. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – Discovery ID.
task_id (basestring) – taskId query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_global_credentials(credential_sub_type, order=None, sort_by=None, headers=None, **request_parameters)[source]¶
Returns global credential for the given credential sub type.
- Parameters
credential_sub_type (basestring) – Credential type as CLI / SNMPV2_READ_COMMUNITY / SNMPV2_WRITE_COMMUNITY / SNMPV3 / HTTP_WRITE / HTTP_READ / NETCONF.
sort_by (basestring) – sortBy query parameter.
order (basestring) – order query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
event_management¶
- class EventManagement[source]¶
Cisco DNA Center Event Management API (version: 2.1.2).
Wraps the DNA Center Event Management API and exposes the API as native Python methods that return native Python objects.
- count_of_event_subscriptions(event_ids, headers=None, **request_parameters)[source]¶
Returns the Count of EventSubscriptions.
- Parameters
event_ids (basestring) – List of subscriptions related to the respective eventIds.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_events(tags, event_id=' ', limit=10, offset=None, order=None, sort_by=None, headers=None, **request_parameters)[source]¶
Gets the list of registered Events with provided eventIds or tags as mandatory.
- Parameters
event_id (basestring) – The registered EventId should be provided.
tags (basestring) – The registered Tags should be provided.
offset (int) – The number of Registries to offset in the resultset whose default value 0.
limit (int) – The number of Registries to limit in the resultset whose default value 10.
sort_by (basestring) – SortBy field name.
order (basestring) – order query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_event_subscriptions(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Update SubscriptionEndpoint to list of registered events.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_event_subscriptions(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Subscribe SubscriptionEndpoint to list of registered events.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- count_of_events(tags, event_id=None, headers=None, **request_parameters)[source]¶
Get the count of registered events with provided eventIds or tags as mandatory.
- Parameters
event_id (basestring) – The registered EventId should be provided.
tags (basestring) – The registered Tags should be provided.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- count_of_notifications(category=None, domain=None, end_time=None, event_ids=None, severity=None, source=None, start_time=None, sub_domain=None, type=None, headers=None, **request_parameters)[source]¶
Get the Count of Published Notifications.
- Parameters
event_ids (basestring) – The registered EventIds should be provided.
start_time (basestring) – StartTime .
end_time (basestring) – endTime .
category (basestring) – category .
type (basestring) – type .
severity (basestring) – severity .
domain (basestring) – domain .
sub_domain (basestring) – subDomain .
source (basestring) – source .
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_event_subscriptions(subscriptions, headers=None, **request_parameters)[source]¶
Delete EventSubscriptions.
- Parameters
subscriptions (basestring) – List of EventSubscriptionId’s for removal.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_event_subscriptions(event_ids=None, limit=10, offset=None, order=None, sort_by=None, headers=None, **request_parameters)[source]¶
Gets the list of Subscriptions’s based on provided offset and limit.
- Parameters
event_ids (basestring) – List of subscriptions related to the respective eventIds.
offset (int) – The number of Subscriptions’s to offset in the resultset whose default value 0.
limit (int) – The number of Subscriptions’s to limit in the resultset whose default value 10.
sort_by (basestring) – SortBy field name.
order (basestring) – order query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_status_api_for_events(execution_id, headers=None, **request_parameters)[source]¶
Get the Status of events API calls with provided executionId as mandatory path parameter.
- Parameters
execution_id (basestring) – Execution ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_notifications(category=None, domain=None, end_time=None, event_ids=None, limit=20, offset=None, order=None, severity=None, sort_by=None, source=None, start_time=None, sub_domain=None, type=None, headers=None, **request_parameters)[source]¶
Get the list of Published Notifications.
- Parameters
event_ids (basestring) – The registered EventIds should be provided.
start_time (basestring) – StartTime .
end_time (basestring) – endTime .
category (basestring) – category .
type (basestring) – type .
severity (basestring) – severity .
domain (basestring) – domain .
sub_domain (basestring) – subDomain .
source (basestring) – source .
offset (int) – Offset whose default value 0.
limit (int) – Limit whose default value 10.
sort_by (basestring) – SortBy field name.
order (basestring) – order query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
file¶
- class File[source]¶
Cisco DNA Center File API (version: 2.1.2).
Wraps the DNA Center File API and exposes the API as native Python methods that return native Python objects.
- get_list_of_available_namespaces(headers=None, **request_parameters)[source]¶
Returns list of available namespaces.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_list_of_files(name_space, headers=None, **request_parameters)[source]¶
Returns list of files under a specific namespace.
- Parameters
name_space (basestring) – A listing of fileId’s.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- download_a_file_by_fileid(file_id, dirpath=None, save_file=None, headers=None, **request_parameters)[source]¶
Downloads a file specified by fileId.
- Parameters
file_id (basestring) – File Identification number.
dirpath (basestring) – Directory absolute path. Defaults to os.getcwd().
save_file (bool) – Enable or disable automatic file creation of raw response.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
HTTP Response container. For more information check the urlib3 documentation
- Return type
urllib3.response.HTTPResponse
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
DownloadFailure – If was not able to download the raw
response to a file. –
itsm¶
- class Itsm[source]¶
Cisco DNA Center ITSM API (version: 2.1.2).
Wraps the DNA Center ITSM API and exposes the API as native Python methods that return native Python objects.
- get_failed_itsm_events(instance_id=None, headers=None, **request_parameters)[source]¶
Used to retrieve the list of integration events that failed to create tickets in ITSM.
- Parameters
instance_id (basestring) – Instance Id of the failed event as in the Runtime Dashboard.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- retry_integration_events(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Allows retry of multiple failed ITSM event instances. The retry request payload can be given as a list of strings: [“instance1”,”instance2”,”instance3”,..] A minimum of one instance Id is mandatory. The list of failed event instance Ids can be retrieved using the ‘Get Failed ITSM Events’ API in the ‘instanceId’ attribute.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
issues¶
- class Issues[source]¶
Cisco DNA Center Issues API (version: 2.1.2).
Wraps the DNA Center Issues API and exposes the API as native Python methods that return native Python objects.
- issues(ai_driven=None, device_id=None, end_time=None, issue_status=None, mac_address=None, priority=None, site_id=None, start_time=None, headers=None, **request_parameters)[source]¶
Intent API to get a list of global issues, issues for a specific device, or issue for a specific client device’s MAC address.
- Parameters
start_time (int) – Starting epoch time in milliseconds of query time window.
end_time (int) – Ending epoch time in milliseconds of query time window.
site_id (basestring) – Assurance UUID value of the site in the issue content.
device_id (basestring) – Assurance UUID value of the device in the issue content.
mac_address (basestring) – Client’s device MAC address of the issue (format xx:xx:xx:xx:xx:xx).
priority (basestring) – The issue’s priority value (One of P1, P2, P3, or P4)(Use only when macAddress and deviceId are not provided).
ai_driven (basestring) – The issue’s AI driven value (Yes or No)(Use only when macAddress and deviceId are not provided).
issue_status (basestring) – The issue’s status value (One of ACTIVE, IGNORED, RESOLVED) (Use only when macAddress and deviceId are not provided).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_issue_enrichment_details(headers=None, **request_parameters)[source]¶
Enriches a given network issue context (an issue id or end user’s Mac Address) with details about the issue(s), impacted hosts and suggested actions for remediation.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
network_settings¶
- class NetworkSettings[source]¶
Cisco DNA Center Network Settings API (version: 2.1.2).
Wraps the DNA Center Network Settings API and exposes the API as native Python methods that return native Python objects.
- update_global_pool(settings=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to update global pool.
- Parameters
settings (object) – Settings, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_global_ip_pool(id, headers=None, **request_parameters)[source]¶
API to delete global IP pool.
- Parameters
id (basestring) – global pool id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_device_credential(id, headers=None, **request_parameters)[source]¶
Delete device credential.
- Parameters
id (basestring) – global credential id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_network(site_id=None, headers=None, **request_parameters)[source]¶
API to get DHCP and DNS center server details.
- Parameters
site_id (basestring) – Site id to get the network settings associated with the site.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_sp_profile(sp_profile_name, headers=None, **request_parameters)[source]¶
API to delete Service Provider profile (QoS).
- Parameters
sp_profile_name (basestring) – sp profile name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_sp_profile(settings=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to update SP profile.
- Parameters
settings (object) – Settings, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_service_provider_details(headers=None, **request_parameters)[source]¶
API to get service provider details (QoS).
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_device_credentials(settings=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to update device credentials.
- Parameters
settings (object) – Settings, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- assign_credential_to_site(site_id, cliId=None, httpRead=None, httpWrite=None, snmpV2ReadId=None, snmpV2WriteId=None, snmpV3Id=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Assign Device Credential To Site .
- Parameters
cliId (string) – Cli Id, property of the request body.
httpRead (string) – Http Read, property of the request body.
httpWrite (string) – Http Write, property of the request body.
snmpV2ReadId (string) – Snmp V2 Read Id, property of the request body.
snmpV2WriteId (string) – Snmp V2 Write Id, property of the request body.
snmpV3Id (string) – Snmp V3 Id, property of the request body.
site_id (basestring) – site id to assign credential.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_network(site_id, settings=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to update network for DHCP and DNS center server settings.
- Parameters
settings (object) – Settings, property of the request body.
site_id (basestring) – Site id to update the network settings which is associated with the site.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_sp_profile(settings=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to create service provider profile(QOS).
- Parameters
settings (object) – settings, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_global_pool(limit=None, offset=None, headers=None, **request_parameters)[source]¶
API to get global pool.
- Parameters
offset (basestring) – offset/starting row.
limit (basestring) – No of Global Pools to be retrieved.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_credential_details(site_id=None, headers=None, **request_parameters)[source]¶
API to get device credential details.
- Parameters
site_id (basestring) – Site id to retrieve the credential details associated with the site.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_network(site_id, settings=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to create a network for DHCP and DNS center server settings.
- Parameters
settings (object) – Settings, property of the request body.
site_id (basestring) – Site id to which site details to associate with the network settings.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_device_credentials(settings=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to create device credentials.
- Parameters
settings (object) – Settings, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_global_pool(settings=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to create global pool.
- Parameters
settings (object) – Settings, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
path_trace¶
- class PathTrace[source]¶
Cisco DNA Center Path Trace API (version: 2.1.2).
Wraps the DNA Center Path Trace API and exposes the API as native Python methods that return native Python objects.
- retrives_all_previous_pathtraces_summary(dest_ip=None, dest_port=None, gt_create_time=None, last_update_time=None, limit=None, lt_create_time=None, offset=None, order=None, periodic_refresh=None, protocol=None, sort_by=None, source_ip=None, source_port=None, status=None, task_id=None, headers=None, **request_parameters)[source]¶
Returns a summary of all flow analyses stored. Results can be filtered by specified parameters.
- Parameters
periodic_refresh (bool) – Is analysis periodically refreshed?.
source_ip (basestring) – Source IP address.
dest_ip (basestring) – Destination IP address.
source_port (basestring) – Source port.
dest_port (basestring) – Destination port.
gt_create_time (basestring) – Analyses requested after this time.
lt_create_time (basestring) – Analyses requested before this time.
protocol (basestring) – protocol query parameter.
status (basestring) – status query parameter.
task_id (basestring) – Task ID.
last_update_time (basestring) – Last update time.
limit (basestring) – Number of resources returned.
offset (basestring) – Start index of resources returned (1-based).
order (basestring) – Order by this field.
sort_by (basestring) – Sort by this field.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- retrieves_previous_pathtrace(flow_analysis_id, headers=None, **request_parameters)[source]¶
Returns result of a previously requested flow analysis by its Flow Analysis id.
- Parameters
flow_analysis_id (basestring) – Flow analysis request id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- deletes_pathtrace_by_id(flow_analysis_id, headers=None, **request_parameters)[source]¶
Deletes a flow analysis request by its id.
- Parameters
flow_analysis_id (basestring) – Flow analysis request id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- initiate_a_new_pathtrace(controlPath=None, destIP=None, destPort=None, inclusions=None, periodicRefresh=None, protocol=None, sourceIP=None, sourcePort=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Initiates a new flow analysis with periodic refresh and stat collection options. Returns a request id and a task id to get results and follow progress.
- Parameters
controlPath (boolean) – FlowAnalysisRequest’s controlPath.
destIP (string) – FlowAnalysisRequest’s destIP.
destPort (string) – FlowAnalysisRequest’s destPort.
inclusions (list) – FlowAnalysisRequest’s inclusions (list of strings).
periodicRefresh (boolean) – FlowAnalysisRequest’s periodicRefresh.
protocol (string) – FlowAnalysisRequest’s protocol.
sourceIP (string) – FlowAnalysisRequest’s sourceIP.
sourcePort (string) – FlowAnalysisRequest’s sourcePort.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
sda¶
- class Sda[source]¶
Cisco DNA Center SDA API (version: 2.1.2).
Wraps the DNA Center SDA API and exposes the API as native Python methods that return native Python objects.
- delete_port_assignment_for_access_point(device_ip, interface_name, headers=None, **request_parameters)[source]¶
Delete Port assignment for access point in SDA Fabric.
- Parameters
device_ip (basestring) – device-ip query parameter.
interface_name (basestring) – interfaceName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_info(device_ipaddress, headers=None, **request_parameters)[source]¶
Get device info from SDA Fabric.
- Parameters
device_ipaddress (basestring) – Device IP Address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_sda_fabric_info(fabric_name, headers=None, **request_parameters)[source]¶
Get SDA Fabric Info.
- Parameters
fabric_name (basestring) – Fabric Name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_ip_pool_in_sda_virtual_network(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add IP Pool in SDA Virtual Network.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_vn(site_name_hierarchy, virtual_network_name, headers=None, **request_parameters)[source]¶
Get virtual network (VN) from SDA Fabric.
- Parameters
virtual_network_name (basestring) – virtualNetworkName query parameter.
site_name_hierarchy (basestring) – siteNameHierarchy query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_site(site_name_hierarchy, headers=None, **request_parameters)[source]¶
Delete Site from SDA Fabric.
- Parameters
site_name_hierarchy (basestring) – Site Name Hierarchy.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_port_assignment_for_access_point(device_ip, interface_name, headers=None, **request_parameters)[source]¶
Get Port assignment for access point in SDA Fabric.
- Parameters
device_ip (basestring) – device-ip query parameter.
interface_name (basestring) – interfaceName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_ip_pool_from_sda_virtual_network(ip_pool_name, virtual_network_name, headers=None, **request_parameters)[source]¶
Delete IP Pool from SDA Virtual Network.
- Parameters
ip_pool_name (basestring) – ipPoolName query parameter.
virtual_network_name (basestring) – virtualNetworkName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_edge_device(device_ipaddress, headers=None, **request_parameters)[source]¶
Delete edge device from SDA Fabric.
- Parameters
device_ipaddress (basestring) – Device IP Address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_fabric(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_default_authentication_profile(site_name_hierarchy, headers=None, **request_parameters)[source]¶
Add default authentication profile in SDA Fabric.
- Parameters
site_name_hierarchy (basestring) – siteNameHierarchy query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_site(site_name_hierarchy, headers=None, **request_parameters)[source]¶
Get Site info from SDA Fabric.
- Parameters
site_name_hierarchy (basestring) – Site Name Hierarchy.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_edge_device(device_ipaddress, headers=None, **request_parameters)[source]¶
Get edge device from SDA Fabric.
- Parameters
device_ipaddress (basestring) – Device IP Address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_edge_device(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add edge device in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_vn(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add virtual network (VN) in SDA Fabric .
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_role_in_sda_fabric(device_management_ip_address, headers=None, **request_parameters)[source]¶
Get device role in SDA Fabric.
- Parameters
device_management_ip_address (basestring) – Device Management IP Address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_port_assignment_for_user_device(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add Port assignment for user device in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_sda_fabric_count(headers=None, **request_parameters)[source]¶
Get SDA Fabric Count.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_control_plane_device(device_ipaddress, headers=None, **request_parameters)[source]¶
Get control plane device from SDA Fabric.
- Parameters
device_ipaddress (basestring) – Device IP Address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_default_authentication_profile(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add default authentication profile in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_default_authentication_profile(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Update default authentication profile in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_vn(site_name_hierarchy, virtual_network_name, headers=None, **request_parameters)[source]¶
Delete virtual network (VN) from SDA Fabric .
- Parameters
virtual_network_name (basestring) – virtualNetworkName query parameter.
site_name_hierarchy (basestring) – siteNameHierarchy query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_default_authentication_profile(site_name_hierarchy, headers=None, **request_parameters)[source]¶
Get default authentication profile from SDA Fabric.
- Parameters
site_name_hierarchy (basestring) – siteNameHierarchy query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_sda_fabric(fabric_name, headers=None, **request_parameters)[source]¶
Delete SDA Fabric.
- Parameters
fabric_name (basestring) – Fabric Name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_port_assignment_for_user_device(device_ip, interface_name, headers=None, **request_parameters)[source]¶
Delete Port assignment for user device in SDA Fabric.
- Parameters
device_ip (basestring) – device-ip query parameter.
interface_name (basestring) – interfaceName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_control_plane_device(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add control plane device in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- gets_border_device_detail(device_ipaddress, headers=None, **request_parameters)[source]¶
Gets border device detail from SDA Fabric.
- Parameters
device_ipaddress (basestring) – Device IP Address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_port_assignment_for_user_device(device_ip, interface_name, headers=None, **request_parameters)[source]¶
Get Port assignment for user device in SDA Fabric.
- Parameters
device_ip (basestring) – device-ip query parameter.
interface_name (basestring) – interfaceName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_ip_pool_from_sda_virtual_network(ip_pool_name, virtual_network_name, headers=None, **request_parameters)[source]¶
Get IP Pool from SDA Virtual Network.
- Parameters
ip_pool_name (basestring) – ipPoolName query parameter.
virtual_network_name (basestring) – virtualNetworkName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- adds_border_device(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds border device in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_port_assignment_for_access_point(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add Port assignment for access point in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- deletes_border_device(device_ipaddress, headers=None, **request_parameters)[source]¶
Deletes border device from SDA Fabric.
- Parameters
device_ipaddress (basestring) – Device IP Address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_site(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add Site in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_control_plane_device(device_ipaddress, headers=None, **request_parameters)[source]¶
Delete control plane device in SDA Fabric.
- Parameters
device_ipaddress (basestring) – Device IP Address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
sensors¶
- class Sensors[source]¶
Cisco DNA Center Sensors API (version: 2.1.2).
Wraps the DNA Center Sensors API and exposes the API as native Python methods that return native Python objects.
- create_sensor_test_template(apCoverage=None, connection=None, modelVersion=None, name=None, ssids=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Intent API to create a SENSOR test template with a new SSID, existing SSID, or both new and existing SSID.
- Parameters
apCoverage (list) – Ap Coverage, property of the request body (list of objects).
connection (string) – Connection, property of the request body.
modelVersion (number) – modelVersion, property of the request body.
name (string) – Name, property of the request body.
ssids (list) – Ssids, property of the request body (list of objects).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_sensor_test(template_name=None, headers=None, **request_parameters)[source]¶
Intent API to delete an existing SENSOR test template.
- Parameters
template_name (basestring) – templateName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- duplicate_sensor_test_template(newTemplateName=None, templateName=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Intent API to duplicate an existing SENSOR test template.
- Parameters
newTemplateName (string) – New Template Name, property of the request body.
templateName (string) – Template Name, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- sensors(site_id=None, headers=None, **request_parameters)[source]¶
Intent API to get a list of SENSOR devices.
- Parameters
site_id (basestring) – siteId query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- edit_sensor_test_template(locationInfoList=None, schedule=None, templateName=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Intent API to deploy, schedule, or edit and existing SENSOR test template.
- Parameters
locationInfoList (list) – Location Info List, property of the request body (list of objects).
schedule (object) – Schedule, property of the request body.
templateName (string) – Template Name, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- run_now_sensor_test(templateName=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Intent API to run a deployed SENSOR test.
- Parameters
templateName (string) – Template Name, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
site_design¶
- class SiteDesign[source]¶
Cisco DNA Center Site Design API (version: 2.1.2).
Wraps the DNA Center Site Design API and exposes the API as native Python methods that return native Python objects.
- get_nfv_profile(id, limit=None, name=None, offset=None, headers=None, **request_parameters)[source]¶
API to get NFV network profile.
- Parameters
id (basestring) – ID of network profile to retrieve.
offset (basestring) – offset/starting row.
limit (basestring) – Number of profile to be retrieved.
name (basestring) – Name of network profile to be retrieved.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_nfv_profile(id, device=None, name=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to update a NFV Network profile.
- Parameters
device (list) – Device, property of the request body (list of objects).
id (basestring) – Id of the NFV profile to be updated.
name (basestring) – Name of the profile to be updated.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_nfv_profile(device=None, profileName=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to create network profile for different NFV topologies.
- Parameters
device (list) – Device, property of the request body (list of objects).
profileName (string) – Site Profile Name, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- nfv_provisioning_detail(device_ip=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Checks the provisioning detail of an ENCS device including log information.
- Parameters
device_ip (string) – Device Ip, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_nfv_profile(id, name=None, headers=None, **request_parameters)[source]¶
API to delete nfv network profile.
- Parameters
id (basestring) – Id of nfv network profile to delete. .
name (basestring) – Nameof nfv network profile to delete. .
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- provision_nfv(provisioning=None, siteProfile=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Design and Provision single/multi NFV device with given site/area/building/floor .
- Parameters
provisioning (list) – Provisioning, property of the request body (list of objects).
siteProfile (list) – Site Profile, property of the request body (list of objects).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_details_by_ip(device_ip, headers=None, **request_parameters)[source]¶
Returns provisioning device information for the specified IP address.
- Parameters
device_ip (basestring) – Device to which the provisioning detail has to be retrieved.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
sites¶
- class Sites[source]¶
Cisco DNA Center Sites API (version: 2.1.2).
Wraps the DNA Center Sites API and exposes the API as native Python methods that return native Python objects.
- assign_device_to_site(site_id, device=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Assigns list of devices to a site.
- Parameters
device (list) – Device, property of the request body (list of objects).
site_id (basestring) – Site id to which site the device to assign.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_site_health(timestamp=None, headers=None, **request_parameters)[source]¶
Returns Overall Health information for all sites.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_site(limit=None, name=None, offset=None, site_id=None, type=None, headers=None, **request_parameters)[source]¶
Get site with area/building/floor with specified hierarchy.
- Parameters
name (basestring) – siteNameHierarchy (ex: global/groupName).
site_id (basestring) – Site id to which site details to retrieve.
type (basestring) – type (ex: area, building, floor).
offset (basestring) – offset/starting row.
limit (basestring) – Number of sites to be retrieved.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_site(site=None, type=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates site with area/building/floor with specified hierarchy.
- Parameters
site (object) – Site, property of the request body.
type (string) – Type, property of the request body. Available values are ‘area’, ‘building’ and ‘floor’.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_site_count(site_id=None, headers=None, **request_parameters)[source]¶
API to get site count .
- Parameters
site_id (basestring) – Site id to retrieve site count.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_site(site_id, headers=None, **request_parameters)[source]¶
Delete site with area/building/floor by siteId.
- Parameters
site_id (basestring) – Site id to which site details to be deleted.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_membership(site_id, device_family=None, limit=None, offset=None, serial_number=None, headers=None, **request_parameters)[source]¶
Getting the site children details and device details.
- Parameters
site_id (basestring) – Site id to retrieve device associated with the site.
offset (basestring) – offset/starting row.
limit (basestring) – Number of sites to be retrieved.
device_family (basestring) – Device family name .
serial_number (basestring) – Device serial number.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_site(site_id, site=None, type=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Update site area/building/floor with specified hierarchy and new values.
- Parameters
site (object) – Site, property of the request body.
type (string) – Type, property of the request body. Available values are ‘area’, ‘building’ and ‘floor’.
site_id (basestring) – Site id to which site details to be updated.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
software_image_management_swim¶
- class SoftwareImageManagementSwim[source]¶
Cisco DNA Center Software Image Management (SWIM) API (version: 2.1.2).
Wraps the DNA Center Software Image Management (SWIM) API and exposes the API as native Python methods that return native Python objects.
- get_software_image_details(application_type=None, created_time=None, family=None, image_integrity_status=None, image_name=None, image_series=None, image_size_greater_than=None, image_size_lesser_than=None, image_uuid=None, is_cco_latest=None, is_cco_recommended=None, is_tagged_golden=None, limit=None, name=None, offset=None, sort_by=None, sort_order='asc', version=None, headers=None, **request_parameters)[source]¶
Returns software image list based on a filter criteria. For example: “filterbyName = cat3k%”.
- Parameters
image_uuid (basestring) – imageUuid query parameter.
name (basestring) – name query parameter.
family (basestring) – family query parameter.
application_type (basestring) – applicationType query parameter.
image_integrity_status (basestring) – imageIntegrityStatus FAILURE, UNKNOWN, VERIFIED.
version (basestring) – software Image Version.
image_series (basestring) – image Series.
image_name (basestring) – image Name.
is_tagged_golden (bool) – is Tagged Golden.
is_cco_recommended (bool) – is recommended from cisco.com.
is_cco_latest (bool) – is latest from cisco.com.
created_time (int) – time in milliseconds (epoch format).
image_size_greater_than (int) – size in bytes.
image_size_lesser_than (int) – size in bytes.
sort_by (basestring) – sort results by this field.
sort_order (basestring) – sort order ‘asc’ or ‘des’. Default is asc.
limit (int) – limit query parameter.
offset (int) – offset query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- import_local_software_image(multipart_fields, multipart_monitor_callback, is_third_party=None, third_party_application_type=None, third_party_image_family=None, third_party_vendor=None, headers=None, **request_parameters)[source]¶
Fetches a software image from local file system and uploads to DNA Center. Supported software image files extensions are bin, img, tar, smu, pie, aes, iso, ova, tar_gz and qcow2.
The following code gives an example of the multipart_fields.
multipart_fields={'file': ('file.zip', open('file.zip', 'rb')} multipart_fields={'file': ('file.txt', open('file.txt', 'rb'), 'text/plain', {'X-My-Header': 'my-value'})} multipart_fields=[('images', ('foo.png', open('foo.png', 'rb'), 'image/png')), ('images', ('bar.png', open('bar.png', 'rb'), 'image/png'))]
The following example demonstrates how to use multipart_monitor_callback=create_callback to create a progress bar using clint.
from clint.textui.progress import Bar def create_callback(encoder): encoder_len = encoder.len bar = Bar(expected_size=encoder_len, filled_char="=") def callback(monitor): bar.show(monitor.bytes_read) return callback
- Parameters
is_third_party (bool) – Third party Image check.
third_party_vendor (basestring) – Third Party Vendor.
third_party_image_family (basestring) – Third Party image family.
third_party_application_type (basestring) – Third Party Application Type.
multipart_fields (dict) – Fields from which to create a multipart/form-data body.
multipart_monitor_callback (function) – function used to monitor the progress of the upload.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- trigger_software_image_distribution(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Distributes a software image on a given device. Software image must be imported successfully into DNA Center before it can be distributed.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- import_software_image_via_url(schedule_at=None, schedule_desc=None, schedule_origin=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Fetches a software image from remote file system (using URL for HTTP/FTP) and uploads to DNA Center. Supported image files extensions are bin, img, tar, smu, pie, aes, iso, ova, tar_gz and qcow2.
- Parameters
schedule_at (basestring) – Epoch Time (The number of milli-seconds since January 1 1970 UTC) at which the distribution should be scheduled (Optional) .
schedule_desc (basestring) – Custom Description (Optional).
schedule_origin (basestring) – Originator of this call (Optional).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- trigger_software_image_activation(schedule_validate=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Activates a software image on a given device. Software image must be present in the device flash.
- Parameters
schedule_validate (bool) – scheduleValidate, validates data before schedule (Optional).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
tag¶
- class Tag[source]¶
Cisco DNA Center Tag API (version: 2.1.2).
Wraps the DNA Center Tag API and exposes the API as native Python methods that return native Python objects.
- add_members_to_the_tag(id, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds members to the tag specified by id.
- Parameters
id (basestring) – Tag ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_tag(description=None, dynamicRules=None, id=None, instanceTenantId=None, name=None, systemTag=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates tag with specified tag attributes.
- Parameters
description (string) – TagDTO’s description.
dynamicRules (list) – TagDTO’s dynamicRules (list of objects).
id (string) – TagDTO’s id.
instanceTenantId (string) – TagDTO’s instanceTenantId.
name (string) – TagDTO’s name.
systemTag (boolean) – TagDTO’s systemTag.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag_member_count(id, member_type, level='0', member_association_type=None, headers=None, **request_parameters)[source]¶
Returns the number of members in a given tag.
- Parameters
id (basestring) – Tag ID.
member_type (basestring) – memberType query parameter.
member_association_type (basestring) – memberAssociationType query parameter.
level (basestring) – level query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_tag(id, headers=None, **request_parameters)[source]¶
Deletes a tag specified by id.
- Parameters
id (basestring) – Tag ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- updates_tag_membership(memberToTags=None, memberType=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates tag membership. As part of the request payload through this API, only the specified members are added / retained to the given input tags. Possible values of memberType attribute in the request payload can be queried by using the /tag/member/type API.
- Parameters
memberToTags (array, object) – TagMemberDTO’s memberToTags.
memberType (string) – TagMemberDTO’s memberType.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag_resource_types(headers=None, **request_parameters)[source]¶
Returns list of supported resource types.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_tag(description=None, dynamicRules=None, id=None, instanceTenantId=None, name=None, systemTag=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates a tag specified by id.
- Parameters
description (string) – TagDTO’s description.
dynamicRules (list) – TagDTO’s dynamicRules (list of objects).
id (string) – TagDTO’s id.
instanceTenantId (string) – TagDTO’s instanceTenantId.
name (string) – TagDTO’s name.
systemTag (boolean) – TagDTO’s systemTag.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag_count(attribute_name=None, level=None, name=None, name_space=None, size=None, system_tag=None, headers=None, **request_parameters)[source]¶
Returns tag count.
- Parameters
name (basestring) – name query parameter.
name_space (basestring) – nameSpace query parameter.
attribute_name (basestring) – attributeName query parameter.
level (basestring) – level query parameter.
size (basestring) – size in kilobytes(KB).
system_tag (basestring) – systemTag query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag_by_id(id, headers=None, **request_parameters)[source]¶
Returns tag specified by Id.
- Parameters
id (basestring) – Tag ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- remove_tag_member(id, member_id, headers=None, **request_parameters)[source]¶
Removes Tag member from the tag specified by id.
- Parameters
id (basestring) – Tag ID.
member_id (basestring) – TagMember id to be removed from tag.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag_members_by_id(id, member_type, level='0', limit=None, member_association_type=None, offset=None, headers=None, **request_parameters)[source]¶
Returns tag members specified by id.
- Parameters
id (basestring) – Tag ID.
member_type (basestring) – Entity type of the member. Possible values can be retrieved by using /tag/member/type API.
offset (basestring) – Used for pagination. It indicates the starting row number out of available member records.
limit (basestring) – Used to Number of maximum members to return in the result.
member_association_type (basestring) – Indicates how the member is associated with the tag. Possible values and description. 1) DYNAMIC : The member is associated to the tag through rules. 2) STATIC – The member is associated to the tag manually. 3) MIXED – The member is associated manually and also satisfies the rule defined for the tag.
level (basestring) – level query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag(additional_info_attributes=None, additional_info_name_space=None, field=None, level=None, limit=None, name=None, offset=None, order=None, size=None, sort_by=None, system_tag=None, headers=None, **request_parameters)[source]¶
Returns the tags for given filter criteria.
- Parameters
name (basestring) – Tag name is mandatory when filter operation is used.
additional_info_name_space (basestring) – additionalInfo.nameSpace query parameter.
additional_info_attributes (basestring) – additionalInfo.attributes query parameter.
level (basestring) – level query parameter.
offset (basestring) – offset query parameter.
limit (basestring) – limit query parameter.
size (basestring) – size in kilobytes(KB).
field (basestring) – Available field names are :’name,id,p arentId,type,additionalInfo.nameSpace,ad ditionalInfo.attributes’.
sort_by (basestring) – Only supported attribute is name. SortyBy is mandatory when order is used.
order (basestring) – Available values are asc and des.
system_tag (basestring) – systemTag query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
task¶
- class Task[source]¶
Cisco DNA Center Task API (version: 2.1.2).
Wraps the DNA Center Task API and exposes the API as native Python methods that return native Python objects.
- get_task_count(data=None, end_time=None, error_code=None, failure_reason=None, is_error=None, parent_id=None, progress=None, service_type=None, start_time=None, username=None, headers=None, **request_parameters)[source]¶
Returns Task count.
- Parameters
start_time (basestring) – This is the epoch start time from which tasks need to be fetched.
end_time (basestring) – This is the epoch end time upto which audit records need to be fetched.
data (basestring) – Fetch tasks that contains this data.
error_code (basestring) – Fetch tasks that have this error code.
service_type (basestring) – Fetch tasks with this service type.
username (basestring) – Fetch tasks with this username.
progress (basestring) – Fetch tasks that contains this progress.
is_error (basestring) – Fetch tasks ended as success or failure. Valid values: true, false.
failure_reason (basestring) – Fetch tasks that contains this failure reason.
parent_id (basestring) – Fetch tasks that have this parent Id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_task_by_id(task_id, headers=None, **request_parameters)[source]¶
Returns a task by specified id.
- Parameters
task_id (basestring) – UUID of the Task.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_task_by_operationid(limit, offset, operation_id, headers=None, **request_parameters)[source]¶
Returns root tasks associated with an Operationid.
- Parameters
operation_id (basestring) – operationId path parameter.
offset (int) – Index, minimum value is 0.
limit (int) – The maximum value of {limit} supported is 500. Base 1 indexing for {limit}, minimum value is 1.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_task_tree(task_id, headers=None, **request_parameters)[source]¶
Returns a task with its children tasks by based on their id.
- Parameters
task_id (basestring) – UUID of the Task.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tasks(data=None, end_time=None, error_code=None, failure_reason=None, is_error=None, limit=None, offset=None, order=None, parent_id=None, progress=None, service_type=None, sort_by=None, start_time=None, username=None, headers=None, **request_parameters)[source]¶
Returns task(s) based on filter criteria.
- Parameters
start_time (basestring) – This is the epoch start time from which tasks need to be fetched.
end_time (basestring) – This is the epoch end time upto which audit records need to be fetched.
data (basestring) – Fetch tasks that contains this data.
error_code (basestring) – Fetch tasks that have this error code.
service_type (basestring) – Fetch tasks with this service type.
username (basestring) – Fetch tasks with this username.
progress (basestring) – Fetch tasks that contains this progress.
is_error (basestring) – Fetch tasks ended as success or failure. Valid values: true, false.
failure_reason (basestring) – Fetch tasks that contains this failure reason.
parent_id (basestring) – Fetch tasks that have this parent Id.
offset (basestring) – offset query parameter.
limit (basestring) – limit query parameter.
sort_by (basestring) – Sort results by this field.
order (basestring) – Sort order asc or dsc.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
topology¶
- class Topology[source]¶
Cisco DNA Center Topology API (version: 2.1.2).
Wraps the DNA Center Topology API and exposes the API as native Python methods that return native Python objects.
- get_vlan_details(headers=None, **request_parameters)[source]¶
Returns the list of VLAN names.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_site_topology(headers=None, **request_parameters)[source]¶
Returns site topology.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_physical_topology(node_type=None, headers=None, **request_parameters)[source]¶
Returns the raw physical topology by specified criteria of nodeType.
- Parameters
node_type (basestring) – nodeType query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_topology_details(vlan_id, headers=None, **request_parameters)[source]¶
Returns Layer 2 network topology by specified VLAN ID.
- Parameters
vlan_id (basestring) – Vlan Name for e.g Vlan1, Vlan23 etc.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_l3_topology_details(topology_type, headers=None, **request_parameters)[source]¶
Returns the Layer 3 network topology by routing protocol.
- Parameters
topology_type (basestring) – Type of topology(OSPF,ISIS,etc).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_overall_network_health(timestamp=None, headers=None, **request_parameters)[source]¶
Returns Overall Network Health information by Device category (Access, Distribution, Core, Router, Wireless) for any given point of time.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
users¶
- class Users[source]¶
Cisco DNA Center Users API (version: 2.1.2).
Wraps the DNA Center Users API and exposes the API as native Python methods that return native Python objects.
- get_user_enrichment_details(headers=None, **request_parameters)[source]¶
Enriches a given network End User context (a network user-id or end user’s device Mac Address) with details about the user and devices that the user is connected to.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
wireless¶
- class Wireless[source]¶
Cisco DNA Center Wireless API (version: 2.1.2).
Wraps the DNA Center Wireless API and exposes the API as native Python methods that return native Python objects.
- retrieve_rf_profiles(rf_profile_name=None, headers=None, **request_parameters)[source]¶
Retrieve all RF profiles.
- Parameters
rf_profile_name (basestring) – rf-profile-name query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_and_provision_ssid(enableFabric=None, flexConnect=None, managedAPLocations=None, ssidDetails=None, ssidType=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates SSID, updates the SSID to the corresponding site profiles and provision it to the devices matching the given sites.
- Parameters
enableFabric (boolean) – enableFabric, property of the request body.
flexConnect (object) – Flex Connect Applicable for non fabric profile, property of the request body.
managedAPLocations (list) – Managed AP Locations (Enter entire Site(s) hierarchy), property of the request body (list of strings).
ssidDetails (object) – SsidDetails, property of the request body.
ssidType (string) – SSID Type, property of the request body. Available values are ‘Guest’ and ‘Enterprise’.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_rf_profiles(rf_profile_name, headers=None, **request_parameters)[source]¶
Delete RF profile(s).
- Parameters
rf_profile_name (basestring) – rf-profile-name path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_wireless_profile(profileDetails=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates Wireless Network Profile on DNAC and associates sites and SSIDs to it.
- Parameters
profileDetails (object) – Profile Details, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- sensor_test_results(end_time=None, site_id=None, start_time=None, test_failure_by='area', headers=None, **request_parameters)[source]¶
Intent API to get SENSOR test result summary.
- Parameters
site_id (basestring) – Assurance site UUID.
start_time (int) – The epoch time in milliseconds.
end_time (int) – The epoch time in milliseconds.
test_failure_by (basestring) – Obtain failure statistics group by “area”, “building”, or “floor”.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_enterprise_ssid(enableBroadcastSSID=None, enableFastLane=None, enableMACFiltering=None, fastTransition=None, name=None, passphrase=None, radioPolicy=None, securityLevel=None, trafficType=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates enterprise SSID.
- Parameters
enableBroadcastSSID (boolean) – enableBroadcastSSID, property of the request body.
enableFastLane (boolean) – enableFastLane, property of the request body.
enableMACFiltering (boolean) – enableMACFiltering, property of the request body.
fastTransition (string) – Fast Transition, property of the request body. Available values are ‘Adaptive’, ‘Enable’ and ‘Disable’.
name (string) – Enter SSID Name, property of the request body. Constraints: maxLength set to 32.
passphrase (string) – Pass Phrase (Only applicable for SSID with PERSONAL security level), property of the request body. Constraints: maxLength set to 63 and minLength set to 8.
radioPolicy (string) – Radio Policy, property of the request body. Available values are ‘Dual band operation (2.4GHz and 5GHz)’, ‘Dual band operation with band select’, ‘5GHz only’ and ‘2.4GHz only’.
securityLevel (string) – Security Level, property of the request body. Available values are ‘WPA2_ENTERPRISE’, ‘WPA2_PERSONAL’ and ‘OPEN’.
trafficType (string) – Traffic Type, property of the request body. Available values are ‘voicedata’ and ‘data’.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_wireless_profile(profile_name=None, headers=None, **request_parameters)[source]¶
Gets either one or all the wireless network profiles if no name is provided for network-profile.
- Parameters
profile_name (basestring) – profileName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_or_update_rf_profile(channelWidth=None, defaultRfProfile=None, enableBrownField=None, enableCustom=None, enableRadioTypeA=None, enableRadioTypeB=None, name=None, radioTypeAProperties=None, radioTypeBProperties=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Create or Update RF profile.
- Parameters
channelWidth (string) – Channel Width, property of the request body.
defaultRfProfile (boolean) – defaultRfProfile, property of the request body.
enableBrownField (boolean) – enableBrownField, property of the request body.
enableCustom (boolean) – enableCustom, property of the request body.
enableRadioTypeA (boolean) – enableRadioTypeA, property of the request body.
enableRadioTypeB (boolean) – enableRadioTypeB, property of the request body.
name (string) – Name, property of the request body.
radioTypeAProperties (object) – Radio Type AProperties, property of the request body.
radioTypeBProperties (object) – Radio Type BProperties, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_enterprise_ssid(ssid_name, headers=None, **request_parameters)[source]¶
Deletes given enterprise SSID.
- Parameters
ssid_name (basestring) – Enter the SSID name to be deleted.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- provision_update(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates wireless provisioning.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_enterprise_ssid(ssid_name=None, headers=None, **request_parameters)[source]¶
Gets either one or all the enterprise SSID.
- Parameters
ssid_name (basestring) – Enter the enterprise SSID name that needs to be retrieved. If not entered, all the enterprise SSIDs will be retrieved.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- provision(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Provision wireless devices.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- ap_provision(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Provision wireless Access points.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_wireless_profile(wireless_profile_name, headers=None, **request_parameters)[source]¶
Delete the Wireless Profile from DNAC whose name is provided.
- Parameters
wireless_profile_name (basestring) – wirelessProfileName path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_wireless_profile(profileDetails=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates the wireless Network Profile with updated details provided. All sites to be present in the network profile should be provided.
- Parameters
profileDetails (object) – Profile Details, property of the request body.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_ssid_and_provision_it_to_devices(managed_aplocations, ssid_name, headers=None, **request_parameters)[source]¶
Removes SSID or WLAN from the network profile, reprovision the device(s) and deletes the SSID or WLAN from DNA Center.
- Parameters
ssid_name (basestring) – ssidName path parameter.
managed_aplocations (basestring) – managedAPLocations path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
DNACenterAPI v2.2.1¶
application_policy¶
- class ApplicationPolicy[source]¶
Cisco DNA Center Application Policy API (version: 2.2.1).
Wraps the DNA Center Application Policy API and exposes the API as native Python methods that return native Python objects.
- get_applications_count(headers=None, **request_parameters)[source]¶
Get the number of all existing applications.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_applications(limit=None, name=None, offset=None, headers=None, **request_parameters)[source]¶
Get applications by offset/limit or by name.
- Parameters
offset (int) – offset query parameter. The offset of the first application to be returned.
limit (int) – limit query parameter. The maximum number of applications to be returned.
name (basestring) – name query parameter. Application’s name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- edit_application(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Edit the attributes of an existing application.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_application(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Create new Custom application.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_application(id, headers=None, **request_parameters)[source]¶
Delete existing application by its id.
- Parameters
id (basestring) – id query parameter. Application’s Id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_application_sets(limit=None, name=None, offset=None, headers=None, **request_parameters)[source]¶
Get appllication-sets by offset/limit or by name.
- Parameters
offset (int) – offset query parameter.
limit (int) – limit query parameter.
name (basestring) – name query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_application_set(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Create new custom application-set/s.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_application_set(id, headers=None, **request_parameters)[source]¶
Delete existing application-set by it’s id.
- Parameters
id (basestring) – id query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_application_sets_count(headers=None, **request_parameters)[source]¶
Get the number of existing application-sets .
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
applications¶
- class Applications[source]¶
Cisco DNA Center Applications API (version: 2.2.1).
Wraps the DNA Center Applications API and exposes the API as native Python methods that return native Python objects.
- applications(application_health=None, device_id=None, end_time=None, limit=None, mac_address=None, offset=None, site_id=None, start_time=None, headers=None, **request_parameters)[source]¶
Intent API to get a list of applications for a specific site, a device, or a client device’s MAC address.
- Parameters
site_id (basestring) – siteId query parameter. Assurance site UUID value (Cannot be submitted together with deviceId and clientMac).
device_id (basestring) – deviceId query parameter. Assurance device UUID value (Cannot be submitted together with siteId and clientMac).
mac_address (basestring) – macAddress query parameter. Client device’s MAC address (Cannot be submitted together with siteId and deviceId).
start_time (int) – startTime query parameter. Starting epoch time in milliseconds of time window.
end_time (int) – endTime query parameter. Ending epoch time in milliseconds of time window.
application_health (basestring) – applicationHealth query parameter. Application health category (POOR, FAIR, or GOOD. Optionally use with siteId only).
offset (int) – offset query parameter. The offset of the first application in the returned data (optionally used with siteId only).
limit (int) – limit query parameter. The max number of application entries in returned data [1, 1000] (optionally used with siteId only).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
clients¶
- class Clients[source]¶
Cisco DNA Center Clients API (version: 2.2.1).
Wraps the DNA Center Clients API and exposes the API as native Python methods that return native Python objects.
- get_overall_client_health(timestamp=None, headers=None, **request_parameters)[source]¶
Returns Overall Client Health information by Client type (Wired and Wireless) for any given point of time.
- Parameters
timestamp (basestring) – timestamp query parameter. Epoch time(in milliseconds) when the Client health data is required.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- client_proximity(username, number_days=None, time_resolution=None, headers=None, **request_parameters)[source]¶
This intent API will provide client proximity information for a specific wireless user. Proximity is defined as presence on the same floor at the same time as the specified wireless user. The Proximity workflow requires the subscription to the following event (via the Event Notification workflow) prior to making this API call: NETWORK-CLIENTS-3-506 Client Proximity Report.
- Parameters
username (basestring) – username query parameter. Wireless client username for which proximity information is required.
number_days (int) – number_days query parameter. Number of days to track proximity until current date. Defaults and maximum up to 14 days.
time_resolution (int) – time_resolution query parameter. Time interval (in minutes) to measure proximity. Defaults to 15 minutes with a minimum 5 minutes.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_client_enrichment_details(headers=None, **request_parameters)[source]¶
Enriches a given network End User context (a network user-id or end user’s device Mac Address) with details about the user, the devices that the user is connected to and the assurance issues that the user is impacted by.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_client_detail(mac_address, timestamp=None, headers=None, **request_parameters)[source]¶
Returns detailed Client information retrieved by Mac Address for any given point of time. .
- Parameters
timestamp (basestring) – timestamp query parameter. Epoch time(in milliseconds) when the Client health data is required.
mac_address (basestring) – macAddress query parameter. MAC Address of the client.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
command_runner¶
- class CommandRunner[source]¶
Cisco DNA Center Command Runner API (version: 2.2.1).
Wraps the DNA Center Command Runner API and exposes the API as native Python methods that return native Python objects.
- get_all_keywords_of_clis_accepted(headers=None, **request_parameters)[source]¶
Get valid keywords.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- run_read_only_commands_on_devices(commands=None, description=None, deviceUuids=None, name=None, timeout=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Submit request for read-only CLIs.
- Parameters
commands (list) – Command Runner’s commands (list of strings).
description (string) – Command Runner’s description.
deviceUuids (list) – Command Runner’s deviceUuids (list of strings).
name (string) – Command Runner’s name.
timeout (integer) – Command Runner’s timeout.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
compliance¶
- class Compliance[source]¶
Cisco DNA Center Compliance API (version: 2.2.1).
Wraps the DNA Center Compliance API and exposes the API as native Python methods that return native Python objects.
- compliance_details_of_device(device_uuid, category=None, compliance_type=None, diff_list=None, key=None, value=None, headers=None, **request_parameters)[source]¶
Return compliance detailed report for a device.
- Parameters
device_uuid (basestring) – deviceUuid path parameter.
category (basestring) – category query parameter. complianceCategory can have any value among ‘INTENT’, ‘RUNNING_CONFIG’.
compliance_type (basestring) – complianceType query parameter. complianceType can have any value among ‘NETWORK_DESIGN’, ‘NETWORK_PROFILE’, ‘FABRIC’, ‘POLICY’, ‘RUNNING_CONFIG’.
diff_list (bool) – diffList query parameter. diff list [ pass true to fetch the diff list ].
key (basestring) – key query parameter. extended attribute key.
value (basestring) – value query parameter. extended attribute value.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- device_compliance_status(device_uuid, headers=None, **request_parameters)[source]¶
Return compliance status of a device.
- Parameters
device_uuid (basestring) – deviceUuid path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_compliance_status_(compliance_status=None, device_uuid=None, limit=None, offset=None, headers=None, **request_parameters)[source]¶
Return compliance status of device(s).
- Parameters
compliance_status (basestring) – complianceStatus query parameter. Compliance status can be have value among ‘COMPLIANT’,’NON_COMPLIANT’, ‘IN_PROGRESS’, ‘ERROR’.
device_uuid (basestring) – deviceUuid query parameter. Comma separated deviceUuids.
offset (int) – offset query parameter. offset/starting row.
limit (int) – limit query parameter. Number of records to be retrieved.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_compliance_status(compliance_status=None, device_uuid=None, limit=None, offset=None, headers=None, **request_parameters)[source]¶
Return compliance status of device(s).
- Parameters
compliance_status (basestring) – complianceStatus query parameter. Compliance status can be have value among ‘COMPLIANT’,’NON_COMPLIANT’, ‘IN_PROGRESS’, ‘ERROR’.
device_uuid (basestring) – deviceUuid query parameter. Comma separated deviceUuids.
offset (int) – offset query parameter. offset/starting row.
limit (int) – limit query parameter. Number of records to be retrieved.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- run_compliance(categories=None, deviceUuids=None, triggerFull=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Run compliance check for device(s).
- Parameters
categories (list) – Compliance’s categories (list of strings).
deviceUuids (list) – Compliance’s deviceUuids (list of strings).
triggerFull (boolean) – Compliance’s triggerFull.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
configuration_archive¶
- class ConfigurationArchive[source]¶
Cisco DNA Center Configuration Archive API (version: 2.2.1).
Wraps the DNA Center Configuration Archive API and exposes the API as native Python methods that return native Python objects.
- export_device_configurations(deviceId=None, password=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Export Device configurations to an encrypted zip file.
- Parameters
deviceId (list) – Configuration Archive’s deviceId (list of strings).
password (string) – Configuration Archive’s password.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
configuration_templates¶
- class ConfigurationTemplates[source]¶
Cisco DNA Center Configuration Templates API (version: 2.2.1).
Wraps the DNA Center Configuration Templates API and exposes the API as native Python methods that return native Python objects.
- get_projects(name=None, headers=None, **request_parameters)[source]¶
Returns the projects in the system.
- Parameters
name (basestring) – name query parameter. Name of project to be searched.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_project(createTime=None, description=None, id=None, lastUpdateTime=None, name=None, tags=None, templates=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates an existing project.
- Parameters
createTime (integer) – Configuration Templates’s createTime.
description (string) – Configuration Templates’s description.
id (string) – Configuration Templates’s id.
lastUpdateTime (integer) – Configuration Templates’s lastUpdateTime.
name (string) – Configuration Templates’s name.
tags (list) – Configuration Templates’s tags (list of strings).
templates (object) – Configuration Templates’s templates.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_project(createTime=None, description=None, id=None, lastUpdateTime=None, name=None, tags=None, templates=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates a new project.
- Parameters
createTime (integer) – Configuration Templates’s createTime.
description (string) – Configuration Templates’s description.
id (string) – Configuration Templates’s id.
lastUpdateTime (integer) – Configuration Templates’s lastUpdateTime.
name (string) – Configuration Templates’s name.
tags (list) – Configuration Templates’s tags (list of strings).
templates (object) – Configuration Templates’s templates.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- gets_the_templates_available(filter_conflicting_templates=None, product_family=None, product_series=None, product_type=None, project_id=None, software_type=None, software_version=None, headers=None, **request_parameters)[source]¶
List the templates available.
- Parameters
project_id (basestring) – projectId query parameter.
software_type (basestring) – softwareType query parameter.
software_version (basestring) – softwareVersion query parameter.
product_family (basestring) – productFamily query parameter.
product_series (basestring) – productSeries query parameter.
product_type (basestring) – productType query parameter.
filter_conflicting_templates (bool) – filterConflictingTemplates query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_template(author=None, composite=None, containingTemplates=None, createTime=None, description=None, deviceTypes=None, failurePolicy=None, id=None, lastUpdateTime=None, name=None, parentTemplateId=None, projectId=None, projectName=None, rollbackTemplateContent=None, rollbackTemplateParams=None, softwareType=None, softwareVariant=None, softwareVersion=None, tags=None, templateContent=None, templateParams=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates an existing template.
- Parameters
author (string) – Configuration Templates’s author.
composite (boolean) – Configuration Templates’s composite.
containingTemplates (list) – Configuration Templates’s containingTemplates (list of objects).
createTime (integer) – Configuration Templates’s createTime.
description (string) – Configuration Templates’s description.
deviceTypes (list) – Configuration Templates’s deviceTypes (list of objects).
failurePolicy (string) – Configuration Templates’s failurePolicy. Available values are ‘ABORT_ON_ERROR’, ‘CONTINUE_ON_ERROR’, ‘ROLLBACK_ON_ERROR’, ‘ROLLBACK_TARGET_ON_ERROR’ and ‘ABORT_TARGET_ON_ERROR’.
id (string) – Configuration Templates’s id.
lastUpdateTime (integer) – Configuration Templates’s lastUpdateTime.
name (string) – Configuration Templates’s name.
parentTemplateId (string) – Configuration Templates’s parentTemplateId.
projectId (string) – Configuration Templates’s projectId.
projectName (string) – Configuration Templates’s projectName.
rollbackTemplateContent (string) – Configuration Templates’s rollbackTemplateContent.
rollbackTemplateParams (list) – Configuration Templates’s rollbackTemplateParams (list of objects).
softwareType (string) – Configuration Templates’s softwareType.
softwareVariant (string) – Configuration Templates’s softwareVariant.
softwareVersion (string) – Configuration Templates’s softwareVersion.
tags (list) – Configuration Templates’s tags (list of strings).
templateContent (string) – Configuration Templates’s templateContent.
templateParams (list) – Configuration Templates’s templateParams (list of objects).
version (string) – Configuration Templates’s version.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- deploy_template(forcePushTemplate=None, isComposite=None, mainTemplateId=None, memberTemplateDeploymentInfo=None, targetInfo=None, templateId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Deploys a template.
- Parameters
forcePushTemplate (boolean) – Configuration Templates’s forcePushTemplate.
isComposite (boolean) – Configuration Templates’s isComposite.
mainTemplateId (string) – Configuration Templates’s mainTemplateId.
memberTemplateDeploymentInfo (list) – Configuration Templates’s memberTemplateDeploymentInfo (list of strings).
targetInfo (list) – Configuration Templates’s targetInfo (list of objects).
templateId (string) – Configuration Templates’s templateId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- version_template(comments=None, templateId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates Versioning for the current contents of the template.
- Parameters
comments (string) – Configuration Templates’s comments.
templateId (string) – Configuration Templates’s templateId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_template_details(template_id, latest_version=None, headers=None, **request_parameters)[source]¶
Returns details of the specified template.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_template(template_id, headers=None, **request_parameters)[source]¶
Deletes an existing template.
- Parameters
template_id (basestring) – templateId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_template_deployment_status(deployment_id, headers=None, **request_parameters)[source]¶
Returns the status of a deployed template.
- Parameters
deployment_id (basestring) – deploymentId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_template_versions(template_id, headers=None, **request_parameters)[source]¶
Returns the versions of a specified template.
- Parameters
template_id (basestring) – templateId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_project(project_id, headers=None, **request_parameters)[source]¶
Deletes an existing Project.
- Parameters
project_id (basestring) – projectId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- preview_template(params=None, templateId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Previews an existing template.
- Parameters
params (object) – Configuration Templates’s params.
templateId (string) – Configuration Templates’s templateId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_template(project_id, author=None, composite=None, containingTemplates=None, createTime=None, description=None, deviceTypes=None, failurePolicy=None, id=None, lastUpdateTime=None, name=None, parentTemplateId=None, projectId=None, projectName=None, rollbackTemplateContent=None, rollbackTemplateParams=None, softwareType=None, softwareVariant=None, softwareVersion=None, tags=None, templateContent=None, templateParams=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates a new template.
- Parameters
author (string) – Configuration Templates’s author.
composite (boolean) – Configuration Templates’s composite.
containingTemplates (list) – Configuration Templates’s containingTemplates (list of objects).
createTime (integer) – Configuration Templates’s createTime.
description (string) – Configuration Templates’s description.
deviceTypes (list) – Configuration Templates’s deviceTypes (list of objects).
failurePolicy (string) – Configuration Templates’s failurePolicy. Available values are ‘ABORT_ON_ERROR’, ‘CONTINUE_ON_ERROR’, ‘ROLLBACK_ON_ERROR’, ‘ROLLBACK_TARGET_ON_ERROR’ and ‘ABORT_TARGET_ON_ERROR’.
id (string) – Configuration Templates’s id.
lastUpdateTime (integer) – Configuration Templates’s lastUpdateTime.
name (string) – Configuration Templates’s name.
parentTemplateId (string) – Configuration Templates’s parentTemplateId.
projectId (string) – Configuration Templates’s projectId.
projectName (string) – Configuration Templates’s projectName.
rollbackTemplateContent (string) – Configuration Templates’s rollbackTemplateContent.
rollbackTemplateParams (list) – Configuration Templates’s rollbackTemplateParams (list of objects).
softwareType (string) – Configuration Templates’s softwareType.
softwareVariant (string) – Configuration Templates’s softwareVariant.
softwareVersion (string) – Configuration Templates’s softwareVersion.
tags (list) – Configuration Templates’s tags (list of strings).
templateContent (string) – Configuration Templates’s templateContent.
templateParams (list) – Configuration Templates’s templateParams (list of objects).
version (string) – Configuration Templates’s version.
project_id (basestring) – projectId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
device_onboarding_pnp¶
- class DeviceOnboardingPnp[source]¶
Cisco DNA Center Device Onboarding (PnP) API (version: 2.2.1).
Wraps the DNA Center Device Onboarding (PnP) API and exposes the API as native Python methods that return native Python objects.
- get_sync_result_for_virtual_account(domain, name, headers=None, **request_parameters)[source]¶
Returns the summary of devices synced from the given smart account & virtual account with PnP.
- Parameters
domain (basestring) – domain path parameter. Smart Account Domain.
name (basestring) – name path parameter. Virtual Account Name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_by_id(id, headers=None, **request_parameters)[source]¶
Returns device details specified by device id.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_device(id, _id=None, dayZeroConfig=None, dayZeroConfigPreview=None, deviceInfo=None, runSummaryList=None, systemResetWorkflow=None, systemWorkflow=None, tenantId=None, version=None, workflow=None, workflowParameters=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates device details specified by device id in PnP database.
- Parameters
_id (string) – Device Onboarding (PnP)’s _id.
dayZeroConfig (object) – Device Onboarding (PnP)’s dayZeroConfig.
dayZeroConfigPreview (object) – Device Onboarding (PnP)’s dayZeroConfigPreview.
deviceInfo (object) – Device Onboarding (PnP)’s deviceInfo.
runSummaryList (list) – Device Onboarding (PnP)’s runSummaryList (list of objects).
systemResetWorkflow (object) – Device Onboarding (PnP)’s systemResetWorkflow.
systemWorkflow (object) – Device Onboarding (PnP)’s systemWorkflow.
tenantId (string) – Device Onboarding (PnP)’s tenantId.
version (number) – Device Onboarding (PnP)’s version.
workflow (object) – Device Onboarding (PnP)’s workflow.
workflowParameters (object) – Device Onboarding (PnP)’s workflowParameters.
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_device_by_id_from_pnp(id, headers=None, **request_parameters)[source]¶
Deletes specified device from PnP database.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- un_claim_device(deviceIdList=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Un-Claims one of more devices with specified workflow.
- Parameters
deviceIdList (list) – Device Onboarding (PnP)’s deviceIdList (list of strings).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_pnp_server_profile(autoSyncPeriod=None, ccoUser=None, expiry=None, lastSync=None, profile=None, smartAccountId=None, syncResult=None, syncResultStr=None, syncStartTime=None, syncStatus=None, tenantId=None, token=None, virtualAccountId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates the PnP Server profile in a registered Virtual Account in the PnP database. The response payload returns the updated smart & virtual account info.
- Parameters
autoSyncPeriod (integer) – Device Onboarding (PnP)’s autoSyncPeriod.
ccoUser (string) – Device Onboarding (PnP)’s ccoUser.
expiry (integer) – Device Onboarding (PnP)’s expiry.
lastSync (integer) – Device Onboarding (PnP)’s lastSync.
profile (object) – Device Onboarding (PnP)’s profile.
smartAccountId (string) – Device Onboarding (PnP)’s smartAccountId.
syncResult (object) – Device Onboarding (PnP)’s syncResult.
syncResultStr (string) – Device Onboarding (PnP)’s syncResultStr.
syncStartTime (integer) – Device Onboarding (PnP)’s syncStartTime.
syncStatus (string) – Device Onboarding (PnP)’s syncStatus. Available values are ‘NOT_SYNCED’, ‘SYNCING’, ‘SUCCESS’ and ‘FAILURE’.
tenantId (string) – Device Onboarding (PnP)’s tenantId.
token (string) – Device Onboarding (PnP)’s token.
virtualAccountId (string) – Device Onboarding (PnP)’s virtualAccountId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_virtual_account(autoSyncPeriod=None, ccoUser=None, expiry=None, lastSync=None, profile=None, smartAccountId=None, syncResult=None, syncResultStr=None, syncStartTime=None, syncStatus=None, tenantId=None, token=None, virtualAccountId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Registers a Smart Account, Virtual Account and the relevant server profile info with the PnP System & database. The devices present in the registered virtual account are synced with the PnP database as well. The response payload returns the new profile.
- Parameters
autoSyncPeriod (integer) – Device Onboarding (PnP)’s autoSyncPeriod.
ccoUser (string) – Device Onboarding (PnP)’s ccoUser.
expiry (integer) – Device Onboarding (PnP)’s expiry.
lastSync (integer) – Device Onboarding (PnP)’s lastSync.
profile (object) – Device Onboarding (PnP)’s profile.
smartAccountId (string) – Device Onboarding (PnP)’s smartAccountId.
syncResult (object) – Device Onboarding (PnP)’s syncResult.
syncResultStr (string) – Device Onboarding (PnP)’s syncResultStr.
syncStartTime (integer) – Device Onboarding (PnP)’s syncStartTime.
syncStatus (string) – Device Onboarding (PnP)’s syncStatus. Available values are ‘NOT_SYNCED’, ‘SYNCING’, ‘SUCCESS’ and ‘FAILURE’.
tenantId (string) – Device Onboarding (PnP)’s tenantId.
token (string) – Device Onboarding (PnP)’s token.
virtualAccountId (string) – Device Onboarding (PnP)’s virtualAccountId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- import_devices_in_bulk(_id=None, dayZeroConfig=None, dayZeroConfigPreview=None, deviceInfo=None, runSummaryList=None, systemResetWorkflow=None, systemWorkflow=None, tenantId=None, version=None, workflow=None, workflowParameters=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add devices to PnP in bulk.
- Parameters
_id (string) – Device Onboarding (PnP)’s _id.
dayZeroConfig (object) – Device Onboarding (PnP)’s dayZeroConfig.
dayZeroConfigPreview (object) – Device Onboarding (PnP)’s dayZeroConfigPreview.
deviceInfo (object) – Device Onboarding (PnP)’s deviceInfo.
runSummaryList (list) – Device Onboarding (PnP)’s runSummaryList (list of objects).
systemResetWorkflow (object) – Device Onboarding (PnP)’s systemResetWorkflow.
systemWorkflow (object) – Device Onboarding (PnP)’s systemWorkflow.
tenantId (string) – Device Onboarding (PnP)’s tenantId.
version (number) – Device Onboarding (PnP)’s version.
workflow (object) – Device Onboarding (PnP)’s workflow.
workflowParameters (object) – Device Onboarding (PnP)’s workflowParameters.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- deregister_virtual_account(domain, name, headers=None, **request_parameters)[source]¶
Deregisters the specified smart account & virtual account info and the associated device information from the PnP System & database. The devices associated with the deregistered virtual account are removed from the PnP database as well. The response payload contains the deregistered smart & virtual account information.
- Parameters
domain (basestring) – domain query parameter. Smart Account Domain.
name (basestring) – name query parameter. Virtual Account Name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_workflow_by_id(id, headers=None, **request_parameters)[source]¶
Returns a workflow specified by id.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_workflow(id, _id=None, addToInventory=None, addedOn=None, configId=None, currTaskIdx=None, description=None, endTime=None, execTime=None, imageId=None, instanceType=None, lastupdateOn=None, name=None, startTime=None, state=None, tasks=None, tenantId=None, type=None, useState=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates an existing workflow.
- Parameters
_id (string) – Device Onboarding (PnP)’s _id.
addToInventory (boolean) – Device Onboarding (PnP)’s addToInventory.
addedOn (integer) – Device Onboarding (PnP)’s addedOn.
configId (string) – Device Onboarding (PnP)’s configId.
currTaskIdx (integer) – Device Onboarding (PnP)’s currTaskIdx.
description (string) – Device Onboarding (PnP)’s description.
endTime (integer) – Device Onboarding (PnP)’s endTime.
execTime (integer) – Device Onboarding (PnP)’s execTime.
imageId (string) – Device Onboarding (PnP)’s imageId.
instanceType (string) – Device Onboarding (PnP)’s instanceType. Available values are ‘SystemWorkflow’, ‘UserWorkflow’ and ‘SystemResetWorkflow’.
lastupdateOn (integer) – Device Onboarding (PnP)’s lastupdateOn.
name (string) – Device Onboarding (PnP)’s name.
startTime (integer) – Device Onboarding (PnP)’s startTime.
state (string) – Device Onboarding (PnP)’s state.
tasks (list) – Device Onboarding (PnP)’s tasks (list of objects).
tenantId (string) – Device Onboarding (PnP)’s tenantId.
type (string) – Device Onboarding (PnP)’s type.
useState (string) – Device Onboarding (PnP)’s useState.
version (integer) – Device Onboarding (PnP)’s version.
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_workflow_by_id(id, headers=None, **request_parameters)[source]¶
Deletes a workflow specified by id.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_smart_account_list(headers=None, **request_parameters)[source]¶
Returns the list of Smart Account domains.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- claim_a_device_to_a_site(deviceId=None, siteId=None, type=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Claim a device based on DNA-C Site based design process. Different parameters are required for different device platforms.
- Parameters
deviceId (string) – Device Onboarding (PnP)’s deviceId.
siteId (string) – Device Onboarding (PnP)’s siteId.
type (string) – Device Onboarding (PnP)’s type. Available values are ‘Default’, ‘AccessPoint’, ‘StackSwitch’, ‘Sensor’ and ‘MobilityExpress’.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_virtual_account_list(domain, headers=None, **request_parameters)[source]¶
Returns list of virtual accounts associated with the specified smart account.
- Parameters
domain (basestring) – domain path parameter. Smart Account Domain.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_workflow_count(name=None, headers=None, **request_parameters)[source]¶
Returns the workflow count.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_pnp_global_settings(headers=None, **request_parameters)[source]¶
Returns global PnP settings of the user.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_pnp_global_settings(_id=None, aaaCredentials=None, acceptEula=None, defaultProfile=None, savaMappingList=None, taskTimeOuts=None, tenantId=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates the user’s list of global PnP settings.
- Parameters
_id (string) – Device Onboarding (PnP)’s _id.
aaaCredentials (object) – Device Onboarding (PnP)’s aaaCredentials.
acceptEula (boolean) – Device Onboarding (PnP)’s acceptEula.
defaultProfile (object) – Device Onboarding (PnP)’s defaultProfile.
savaMappingList (list) – Device Onboarding (PnP)’s savaMappingList (list of objects).
taskTimeOuts (object) – Device Onboarding (PnP)’s taskTimeOuts.
tenantId (string) – Device Onboarding (PnP)’s tenantId.
version (integer) – Device Onboarding (PnP)’s version.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_workflows(limit=None, name=None, offset=None, sort=None, sort_order=None, type=None, headers=None, **request_parameters)[source]¶
Returns the list of workflows based on filter criteria. If a limit is not specified, it will default to return 50 workflows. Pagination and sorting are also supported by this endpoint.
- Parameters
limit (int) – limit query parameter. Limits number of results.
offset (int) – offset query parameter. Index of first result.
sort (basestring, list, set, tuple) – sort query parameter. Comma seperated lost of fields to sort on.
sort_order (basestring) – sortOrder query parameter. Sort Order Ascending (asc) or Descending (des).
type (basestring, list, set, tuple) – type query parameter. Workflow Type.
name (basestring, list, set, tuple) – name query parameter. Workflow Name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_a_workflow(_id=None, addToInventory=None, addedOn=None, configId=None, currTaskIdx=None, description=None, endTime=None, execTime=None, imageId=None, instanceType=None, lastupdateOn=None, name=None, startTime=None, state=None, tasks=None, tenantId=None, type=None, useState=None, version=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds a PnP Workflow along with the relevant tasks in the workflow into the PnP database.
- Parameters
_id (string) – Device Onboarding (PnP)’s _id.
addToInventory (boolean) – Device Onboarding (PnP)’s addToInventory.
addedOn (integer) – Device Onboarding (PnP)’s addedOn.
configId (string) – Device Onboarding (PnP)’s configId.
currTaskIdx (integer) – Device Onboarding (PnP)’s currTaskIdx.
description (string) – Device Onboarding (PnP)’s description.
endTime (integer) – Device Onboarding (PnP)’s endTime.
execTime (integer) – Device Onboarding (PnP)’s execTime.
imageId (string) – Device Onboarding (PnP)’s imageId.
instanceType (string) – Device Onboarding (PnP)’s instanceType. Available values are ‘SystemWorkflow’, ‘UserWorkflow’ and ‘SystemResetWorkflow’.
lastupdateOn (integer) – Device Onboarding (PnP)’s lastupdateOn.
name (string) – Device Onboarding (PnP)’s name.
startTime (integer) – Device Onboarding (PnP)’s startTime.
state (string) – Device Onboarding (PnP)’s state.
tasks (list) – Device Onboarding (PnP)’s tasks (list of objects).
tenantId (string) – Device Onboarding (PnP)’s tenantId.
type (string) – Device Onboarding (PnP)’s type.
useState (string) – Device Onboarding (PnP)’s useState.
version (integer) – Device Onboarding (PnP)’s version.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- reset_device(deviceResetList=None, projectId=None, workflowId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Recovers a device from a Workflow Execution Error state.
- Parameters
deviceResetList (list) – Device Onboarding (PnP)’s deviceResetList (list of objects).
projectId (string) – Device Onboarding (PnP)’s projectId.
workflowId (string) – Device Onboarding (PnP)’s workflowId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- sync_virtual_account_devices(autoSyncPeriod=None, ccoUser=None, expiry=None, lastSync=None, profile=None, smartAccountId=None, syncResult=None, syncResultStr=None, syncStartTime=None, syncStatus=None, tenantId=None, token=None, virtualAccountId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Synchronizes the device info from the given smart account & virtual account with the PnP database. The response payload returns a list of synced devices.
- Parameters
autoSyncPeriod (integer) – Device Onboarding (PnP)’s autoSyncPeriod.
ccoUser (string) – Device Onboarding (PnP)’s ccoUser.
expiry (integer) – Device Onboarding (PnP)’s expiry.
lastSync (integer) – Device Onboarding (PnP)’s lastSync.
profile (object) – Device Onboarding (PnP)’s profile.
smartAccountId (string) – Device Onboarding (PnP)’s smartAccountId.
syncResult (object) – Device Onboarding (PnP)’s syncResult.
syncResultStr (string) – Device Onboarding (PnP)’s syncResultStr.
syncStartTime (integer) – Device Onboarding (PnP)’s syncStartTime.
syncStatus (string) – Device Onboarding (PnP)’s syncStatus. Available values are ‘NOT_SYNCED’, ‘SYNCING’, ‘SUCCESS’ and ‘FAILURE’.
tenantId (string) – Device Onboarding (PnP)’s tenantId.
token (string) – Device Onboarding (PnP)’s token.
virtualAccountId (string) – Device Onboarding (PnP)’s virtualAccountId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- preview_config(deviceId=None, siteId=None, type=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Triggers a preview for site-based Day 0 Configuration.
- Parameters
deviceId (string) – Device Onboarding (PnP)’s deviceId.
siteId (string) – Device Onboarding (PnP)’s siteId.
type (string) – Device Onboarding (PnP)’s type. Available values are ‘Default’, ‘AccessPoint’, ‘StackSwitch’, ‘Sensor’ and ‘MobilityExpress’.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- claim_device(configFileUrl=None, configId=None, deviceClaimList=None, fileServiceId=None, imageId=None, imageUrl=None, populateInventory=None, projectId=None, workflowId=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Claims one of more devices with specified workflow.
- Parameters
configFileUrl (string) – Device Onboarding (PnP)’s configFileUrl.
configId (string) – Device Onboarding (PnP)’s configId.
deviceClaimList (list) – Device Onboarding (PnP)’s deviceClaimList (list of objects).
fileServiceId (string) – Device Onboarding (PnP)’s fileServiceId.
imageId (string) – Device Onboarding (PnP)’s imageId.
imageUrl (string) – Device Onboarding (PnP)’s imageUrl.
populateInventory (boolean) – Device Onboarding (PnP)’s populateInventory.
projectId (string) – Device Onboarding (PnP)’s projectId.
workflowId (string) – Device Onboarding (PnP)’s workflowId.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_count(cm_state=None, last_contact=None, name=None, onb_state=None, pid=None, project_id=None, project_name=None, serial_number=None, smart_account_id=None, source=None, state=None, virtual_account_id=None, workflow_id=None, workflow_name=None, headers=None, **request_parameters)[source]¶
Returns the device count based on filter criteria. This is useful for pagination.
- Parameters
serial_number (basestring, list, set, tuple) – serialNumber query parameter. Device Serial Number.
state (basestring, list, set, tuple) – state query parameter. Device State.
onb_state (basestring, list, set, tuple) – onbState query parameter. Device Onboarding State.
cm_state (basestring, list, set, tuple) – cmState query parameter. Device Connection Manager State.
name (basestring, list, set, tuple) – name query parameter. Device Name.
pid (basestring, list, set, tuple) – pid query parameter. Device ProductId.
source (basestring, list, set, tuple) – source query parameter. Device Source.
project_id (basestring, list, set, tuple) – projectId query parameter. Device Project Id.
workflow_id (basestring, list, set, tuple) – workflowId query parameter. Device Workflow Id.
project_name (basestring, list, set, tuple) – projectName query parameter. Device Project Name.
workflow_name (basestring, list, set, tuple) – workflowName query parameter. Device Workflow Name.
smart_account_id (basestring, list, set, tuple) – smartAccountId query parameter. Device Smart Account.
virtual_account_id (basestring, list, set, tuple) – virtualAccountId query parameter. Device Virtual Account.
last_contact (bool) – lastContact query parameter. Device Has Contacted lastContact > 0.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_list(cm_state=None, hostname=None, last_contact=None, limit=None, mac_address=None, name=None, offset=None, onb_state=None, pid=None, project_id=None, project_name=None, serial_number=None, site_name=None, smart_account_id=None, sort=None, sort_order=None, source=None, state=None, virtual_account_id=None, workflow_id=None, workflow_name=None, headers=None, **request_parameters)[source]¶
Returns list of devices based on filter crieteria. If a limit is not specified, it will default to return 50 devices. Pagination and sorting are also supported by this endpoint.
- Parameters
limit (int) – limit query parameter. Limits number of results.
offset (int) – offset query parameter. Index of first result.
sort (basestring, list, set, tuple) – sort query parameter. Comma seperated list of fields to sort on.
sort_order (basestring) – sortOrder query parameter. Sort Order Ascending (asc) or Descending (des).
serial_number (basestring, list, set, tuple) – serialNumber query parameter. Device Serial Number.
state (basestring, list, set, tuple) – state query parameter. Device State.
onb_state (basestring, list, set, tuple) – onbState query parameter. Device Onboarding State.
cm_state (basestring, list, set, tuple) – cmState query parameter. Device Connection Manager State.
name (basestring, list, set, tuple) – name query parameter. Device Name.
pid (basestring, list, set, tuple) – pid query parameter. Device ProductId.
source (basestring, list, set, tuple) – source query parameter. Device Source.
project_id (basestring, list, set, tuple) – projectId query parameter. Device Project Id.
workflow_id (basestring, list, set, tuple) – workflowId query parameter. Device Workflow Id.
project_name (basestring, list, set, tuple) – projectName query parameter. Device Project Name.
workflow_name (basestring, list, set, tuple) – workflowName query parameter. Device Workflow Name.
smart_account_id (basestring, list, set, tuple) – smartAccountId query parameter. Device Smart Account.
virtual_account_id (basestring, list, set, tuple) – virtualAccountId query parameter. Device Virtual Account.
last_contact (bool) – lastContact query parameter. Device Has Contacted lastContact > 0.
mac_address (basestring) – macAddress query parameter. Device Mac Address.
hostname (basestring) – hostname query parameter. Device Hostname.
site_name (basestring) – siteName query parameter. Device Site Name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_device(_id=None, dayZeroConfig=None, dayZeroConfigPreview=None, deviceInfo=None, runSummaryList=None, systemResetWorkflow=None, systemWorkflow=None, tenantId=None, version=None, workflow=None, workflowParameters=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds a device to the PnP database.
- Parameters
_id (string) – Device Onboarding (PnP)’s _id.
dayZeroConfig (object) – Device Onboarding (PnP)’s dayZeroConfig.
dayZeroConfigPreview (object) – Device Onboarding (PnP)’s dayZeroConfigPreview.
deviceInfo (object) – Device Onboarding (PnP)’s deviceInfo.
runSummaryList (list) – Device Onboarding (PnP)’s runSummaryList (list of objects).
systemResetWorkflow (object) – Device Onboarding (PnP)’s systemResetWorkflow.
systemWorkflow (object) – Device Onboarding (PnP)’s systemWorkflow.
tenantId (string) – Device Onboarding (PnP)’s tenantId.
version (number) – Device Onboarding (PnP)’s version.
workflow (object) – Device Onboarding (PnP)’s workflow.
workflowParameters (object) – Device Onboarding (PnP)’s workflowParameters.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_history(serial_number, sort=None, sort_order=None, headers=None, **request_parameters)[source]¶
Returns history for a specific device. Serial number is a required parameter.
- Parameters
serial_number (basestring) – serialNumber query parameter. Device Serial Number.
sort (basestring, list, set, tuple) – sort query parameter. Comma seperated list of fields to sort on.
sort_order (basestring) – sortOrder query parameter. Sort Order Ascending (asc) or Descending (des).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
device_replacement¶
- class DeviceReplacement[source]¶
Cisco DNA Center Device Replacement API (version: 2.2.1).
Wraps the DNA Center Device Replacement API and exposes the API as native Python methods that return native Python objects.
- deploy_device_replacement_workflow(faultyDeviceSerialNumber=None, replacementDeviceSerialNumber=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to trigger RMA workflow that will replace faulty device with replacement device with same configuration and images.
- Parameters
faultyDeviceSerialNumber (string) – Device Replacement’s faultyDeviceSerialNumber.
replacementDeviceSerialNumber (string) – Device Replacement’s replacementDeviceSerialNumber.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- return_replacement_devices_with_details(family=None, faulty_device_name=None, faulty_device_platform=None, faulty_device_serial_number=None, limit=None, offset=None, replacement_device_platform=None, replacement_device_serial_number=None, replacement_status=None, sort_by=None, sort_order=None, headers=None, **request_parameters)[source]¶
Get list of replacement devices with replacement details and it can filter replacement devices based on Faulty Device Name,Faulty Device Platform, Replacement Device Platform, Faulty Device Serial Number,Replacement Device Serial Number, Device Replacement status, Product Family.
- Parameters
faulty_device_name (basestring) – faultyDeviceName query parameter. Faulty Device Name.
faulty_device_platform (basestring) – faultyDevicePlatform query parameter. Faulty Device Platform.
replacement_device_platform (basestring) – replacementDevicePlatform query parameter. Replacement Device Platform.
faulty_device_serial_number (basestring) – faultyDeviceSerialNumber query parameter. Faulty Device Serial Number.
replacement_device_serial_number (basestring) – replacementDeviceSerialNumber query parameter. Replacement Device Serial Number.
replacement_status (basestring, list, set, tuple) – replacementStatus query parameter. Device Replacement status [READY-FOR- REPLACEMENT, REPLACEMENT-IN-PROGRESS, REPLACEMENT-SCHEDULED, REPLACED, ERROR, NETWORK_READINESS_REQUESTED, NETWORK_READINESS_FAILED].
family (basestring, list, set, tuple) – family query parameter. List of families[Routers, Switches and Hubs, AP].
sort_by (basestring) – sortBy query parameter. SortBy this field. SortBy is mandatory when order is used.
sort_order (basestring) – sortOrder query parameter. Order on displayName[ASC,DESC].
offset (int) – offset query parameter.
limit (int) – limit query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- unmark_device_for_replacement(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
UnMarks device for replacement.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- mark_device_for_replacement(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Marks device for replacement.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- return_replacement_devices_count(replacement_status=None, headers=None, **request_parameters)[source]¶
Get replacement devices count.
- Parameters
replacement_status (basestring, list, set, tuple) – replacementStatus query parameter. Device Replacement status list[READY- FOR-REPLACEMENT, REPLACEMENT-IN- PROGRESS, REPLACEMENT-SCHEDULED, REPLACED, ERROR].
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
devices¶
- class Devices[source]¶
Cisco DNA Center Devices API (version: 2.2.1).
Wraps the DNA Center Devices API and exposes the API as native Python methods that return native Python objects.
- threat_detail_count(endTime=None, isNewThreat=None, limit=None, offset=None, siteId=None, startTime=None, threatLevel=None, threatType=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
The details count for the Rogue and aWIPS threats.
- Parameters
endTime (integer) – Devices’s endTime.
isNewThreat (boolean) – Devices’s isNewThreat.
limit (integer) – Devices’s limit.
offset (integer) – Devices’s offset.
siteId (list) – Devices’s siteId (list of strings).
startTime (integer) – Devices’s startTime.
threatLevel (list) – Devices’s threatLevel (list of strings).
threatType (list) – Devices’s threatType (list of strings).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- threat_summary(endTime=None, siteId=None, startTime=None, threatLevel=None, threatType=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
The Threat Summary for the Rogues and aWIPS.
- Parameters
endTime (integer) – Devices’s endTime.
siteId (list) – Devices’s siteId (list of strings).
startTime (integer) – Devices’s startTime.
threatLevel (list) – Devices’s threatLevel (list of strings).
threatType (list) – Devices’s threatType (list of strings).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- threat_details(endTime=None, isNewThreat=None, limit=None, offset=None, siteId=None, startTime=None, threatLevel=None, threatType=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
The details for the Rogue and aWIPS threats.
- Parameters
endTime (integer) – Devices’s endTime.
isNewThreat (boolean) – Devices’s isNewThreat.
limit (integer) – Devices’s limit.
offset (integer) – Devices’s offset.
siteId (list) – Devices’s siteId (list of strings).
startTime (integer) – Devices’s startTime.
threatLevel (list) – Devices’s threatLevel (list of strings).
threatType (list) – Devices’s threatType (list of strings).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_module_info_by_id(id, headers=None, **request_parameters)[source]¶
Returns Module info by id.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_by_id(id, headers=None, **request_parameters)[source]¶
Returns the network device details for the given device ID.
- Parameters
id (basestring) – id path parameter. Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_device_by_id(id, is_force_delete=None, headers=None, **request_parameters)[source]¶
Deletes the network device for the given Id.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- return_power_supply_fan_details_for_the_given_device(device_uuid, type, headers=None, **request_parameters)[source]¶
Return PowerSupply/ Fan details for the Given device.
- Parameters
device_uuid (basestring) – deviceUuid path parameter.
type (basestring) – type query parameter. Type value should be PowerSupply or Fan.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_interface_vlans(id, interface_type=None, headers=None, **request_parameters)[source]¶
Returns Device Interface VLANs.
- Parameters
id (basestring) – id path parameter.
interface_type (basestring) – interfaceType query parameter. Vlan assocaited with sub- interface.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_interfaces_by_specified_range(device_id, records_to_return, start_index, headers=None, **request_parameters)[source]¶
Returns the list of interfaces for the device for the specified range.
- Parameters
device_id (basestring) – deviceId path parameter. Device ID.
start_index (int) – startIndex path parameter. Start index.
records_to_return (int) – recordsToReturn path parameter. Number of records to return.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_polling_interval_for_all_devices(headers=None, **request_parameters)[source]¶
Returns polling interval of all devices.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- sync_devices_using_forcesync(force_sync=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Synchronizes the devices. If forceSync param is false (default) then the sync would run in normal priority thread. If forceSync param is true then the sync would run in high priority thread if available, else the sync will fail. Result can be seen in the child task of each device.
- Parameters
force_sync (bool) – forceSync query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_interface_count(headers=None, **request_parameters)[source]¶
Returns the count of interfaces for all devices.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_list(headers=None, **request_parameters)[source]¶
Get device list.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- sync_devices(cliTransport=None, computeDevice=None, enablePassword=None, extendedDiscoveryInfo=None, httpPassword=None, httpPort=None, httpSecure=None, httpUserName=None, ipAddress=None, merakiOrgId=None, netconfPort=None, password=None, serialNumber=None, snmpAuthPassphrase=None, snmpAuthProtocol=None, snmpMode=None, snmpPrivPassphrase=None, snmpPrivProtocol=None, snmpROCommunity=None, snmpRWCommunity=None, snmpRetry=None, snmpTimeout=None, snmpUserName=None, snmpVersion=None, type=None, updateMgmtIPaddressList=None, userName=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Sync the devices provided as input.
- Parameters
cliTransport (string) – Devices’s cliTransport.
computeDevice (boolean) – Devices’s computeDevice.
enablePassword (string) – Devices’s enablePassword.
extendedDiscoveryInfo (string) – Devices’s extendedDiscoveryInfo.
httpPassword (string) – Devices’s httpPassword.
httpPort (string) – Devices’s httpPort.
httpSecure (boolean) – Devices’s httpSecure.
httpUserName (string) – Devices’s httpUserName.
ipAddress (list) – Devices’s ipAddress (list of strings).
merakiOrgId (list) – Devices’s merakiOrgId (list of strings).
netconfPort (string) – Devices’s netconfPort.
password (string) – Devices’s password.
serialNumber (string) – Devices’s serialNumber.
snmpAuthPassphrase (string) – Devices’s snmpAuthPassphrase.
snmpAuthProtocol (string) – Devices’s snmpAuthProtocol.
snmpMode (string) – Devices’s snmpMode.
snmpPrivPassphrase (string) – Devices’s snmpPrivPassphrase.
snmpPrivProtocol (string) – Devices’s snmpPrivProtocol.
snmpROCommunity (string) – Devices’s snmpROCommunity.
snmpRWCommunity (string) – Devices’s snmpRWCommunity.
snmpRetry (integer) – Devices’s snmpRetry.
snmpTimeout (integer) – Devices’s snmpTimeout.
snmpUserName (string) – Devices’s snmpUserName.
snmpVersion (string) – Devices’s snmpVersion.
type (string) – Devices’s type. Available values are ‘COMPUTE_DEVICE’, ‘MERAKI_DASHBOARD’, ‘NETWORK_DEVICE’ and ‘NODATACHANGE’.
updateMgmtIPaddressList (list) – Devices’s updateMgmtIPaddressList (list of objects).
userName (string) – Devices’s userName.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_device(cliTransport=None, computeDevice=None, enablePassword=None, extendedDiscoveryInfo=None, httpPassword=None, httpPort=None, httpSecure=None, httpUserName=None, ipAddress=None, merakiOrgId=None, netconfPort=None, password=None, serialNumber=None, snmpAuthPassphrase=None, snmpAuthProtocol=None, snmpMode=None, snmpPrivPassphrase=None, snmpPrivProtocol=None, snmpROCommunity=None, snmpRWCommunity=None, snmpRetry=None, snmpTimeout=None, snmpUserName=None, snmpVersion=None, type=None, updateMgmtIPaddressList=None, userName=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds the device with given credential.
- Parameters
cliTransport (string) – Devices’s cliTransport.
computeDevice (boolean) – Devices’s computeDevice.
enablePassword (string) – Devices’s enablePassword.
extendedDiscoveryInfo (string) – Devices’s extendedDiscoveryInfo.
httpPassword (string) – Devices’s httpPassword.
httpPort (string) – Devices’s httpPort.
httpSecure (boolean) – Devices’s httpSecure.
httpUserName (string) – Devices’s httpUserName.
ipAddress (list) – Devices’s ipAddress (list of strings).
merakiOrgId (list) – Devices’s merakiOrgId (list of strings).
netconfPort (string) – Devices’s netconfPort.
password (string) – Devices’s password.
serialNumber (string) – Devices’s serialNumber.
snmpAuthPassphrase (string) – Devices’s snmpAuthPassphrase.
snmpAuthProtocol (string) – Devices’s snmpAuthProtocol.
snmpMode (string) – Devices’s snmpMode.
snmpPrivPassphrase (string) – Devices’s snmpPrivPassphrase.
snmpPrivProtocol (string) – Devices’s snmpPrivProtocol.
snmpROCommunity (string) – Devices’s snmpROCommunity.
snmpRWCommunity (string) – Devices’s snmpRWCommunity.
snmpRetry (integer) – Devices’s snmpRetry.
snmpTimeout (integer) – Devices’s snmpTimeout.
snmpUserName (string) – Devices’s snmpUserName.
snmpVersion (string) – Devices’s snmpVersion.
type (string) – Devices’s type. Available values are ‘COMPUTE_DEVICE’, ‘MERAKI_DASHBOARD’, ‘NETWORK_DEVICE’ and ‘NODATACHANGE’.
updateMgmtIPaddressList (list) – Devices’s updateMgmtIPaddressList (list of objects).
userName (string) – Devices’s userName.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_interface_details(device_id, name, headers=None, **request_parameters)[source]¶
Returns interface by specified device Id and interface name.
- Parameters
device_id (basestring) – deviceId path parameter. Device ID.
name (basestring) – name query parameter. Interface name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_count(headers=None, **request_parameters)[source]¶
Returns the count of network devices based on the filter criteria by management IP address, mac address, hostname and location name.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_interface_count_by_id(device_id, headers=None, **request_parameters)[source]¶
Returns the interface count for the given device.
- Parameters
device_id (basestring) – deviceId path parameter. Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_ospf_interfaces(headers=None, **request_parameters)[source]¶
Returns the interfaces that has OSPF enabled.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_summary(id, headers=None, **request_parameters)[source]¶
Returns brief summary of device info such as hostname, management IP address for the given device Id.
- Parameters
id (basestring) – id path parameter. Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_functional_capability_by_id(id, headers=None, **request_parameters)[source]¶
Returns functional capability with given Id.
- Parameters
id (basestring) – id path parameter. Functional Capability UUID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_polling_interval_by_id(id, headers=None, **request_parameters)[source]¶
Returns polling interval by device id.
- Parameters
id (basestring) – id path parameter. Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_isis_interfaces(headers=None, **request_parameters)[source]¶
Returns the interfaces that has ISIS enabled.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_config_by_id(network_device_id, headers=None, **request_parameters)[source]¶
Returns the device config by specified device ID.
- Parameters
network_device_id (basestring) – networkDeviceId path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_organization_list_for_meraki(id, headers=None, **request_parameters)[source]¶
Returns list of organizations for meraki dashboard.
- Parameters
id (basestring) – id path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_config_count(headers=None, **request_parameters)[source]¶
Returns the count of device configs.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- poe_details_(device_uuid, headers=None, **request_parameters)[source]¶
Returns POE details for device.
- Parameters
device_uuid (basestring) – deviceUuid path parameter. uuid of the device.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- poe_details(device_uuid, headers=None, **request_parameters)[source]¶
Returns POE details for device.
- Parameters
device_uuid (basestring) – deviceUuid path parameter. uuid of the device.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_module_count(device_id, name_list=None, operational_state_code_list=None, part_number_list=None, vendor_equipment_type_list=None, headers=None, **request_parameters)[source]¶
Returns Module Count.
- Parameters
device_id (basestring) – deviceId query parameter.
name_list (basestring, list, set, tuple) – nameList query parameter.
vendor_equipment_type_list(basestring – tuple): vendorEquipmentTypeList query parameter.
list – tuple): vendorEquipmentTypeList query parameter.
set – tuple): vendorEquipmentTypeList query parameter.
- :paramtuple): vendorEquipmentTypeList query
parameter.
- Parameters
- :paramtuple): operationalStateCodeList query
parameter.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_config_for_all_devices(headers=None, **request_parameters)[source]¶
Returns the config for all devices.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_interface_by_id(id, headers=None, **request_parameters)[source]¶
Returns the interface for the given interface ID.
- Parameters
id (basestring) – id path parameter. Interface ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_interface_info_by_id(device_id, headers=None, **request_parameters)[source]¶
Returns list of interfaces by specified device.
- Parameters
device_id (basestring) – deviceId path parameter. Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_device_role(id=None, role=None, roleSource=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates the role of the device as access, core, distribution, border router.
- Parameters
id (string) – Devices’s id.
role (string) – Devices’s role.
roleSource (string) – Devices’s roleSource.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_functional_capability_for_devices(device_id, function_name=None, headers=None, **request_parameters)[source]¶
Returns the functional-capability for given devices.
- Parameters
device_id (basestring) – deviceId query parameter. Accepts comma separated deviceid’s and return list of functional-capabilities for the given id’s. If invalid or not-found id’s are provided, null entry will be returned in the list.
function_name (basestring, list, set, tuple) – functionName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- register_device_for_wsa(macaddress=None, serial_number=None, headers=None, **request_parameters)[source]¶
Registers a device for WSA notification.
- Parameters
serial_number (basestring) – serialNumber query parameter. Serial number of the device.
macaddress (basestring) – macaddress query parameter. Mac addres of the device.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_interface_by_ip(ip_address, headers=None, **request_parameters)[source]¶
Returns list of interfaces for specified device management IP address.
- Parameters
ip_address (basestring) – ipAddress path parameter. IP address of the interface.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- export_device_list(deviceUuids=None, id=None, operationEnum=None, parameters=None, password=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Exports the selected network device to a file.
- Parameters
deviceUuids (list) – Devices’s deviceUuids (list of strings).
id (string) – Devices’s id.
operationEnum (string) – Devices’s operationEnum. Available values are ‘CREDENTIALDETAILS’ and ‘DEVICEDETAILS’.
parameters (list) – Devices’s parameters (list of strings).
password (string) – Devices’s password.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_network_device_by_ip(ip_address, headers=None, **request_parameters)[source]¶
Returns the network device by specified IP address.
- Parameters
ip_address (basestring) – ipAddress path parameter. Device IP address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_by_serial_number(serial_number, headers=None, **request_parameters)[source]¶
Returns the network device with given serial number.
- Parameters
serial_number (basestring) – serialNumber path parameter. Device serial number.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_modules(device_id, limit=None, name_list=None, offset=None, operational_state_code_list=None, part_number_list=None, vendor_equipment_type_list=None, headers=None, **request_parameters)[source]¶
Returns modules by specified device id.
- Parameters
device_id (basestring) – deviceId query parameter.
limit (basestring) – limit query parameter.
offset (basestring) – offset query parameter.
name_list (basestring, list, set, tuple) – nameList query parameter.
vendor_equipment_type_list(basestring – tuple): vendorEquipmentTypeList query parameter.
list – tuple): vendorEquipmentTypeList query parameter.
set – tuple): vendorEquipmentTypeList query parameter.
- :paramtuple): vendorEquipmentTypeList query
parameter.
- Parameters
- :paramtuple): operationalStateCodeList query
parameter.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_network_device_by_pagination_range(records_to_return, start_index, headers=None, **request_parameters)[source]¶
Returns the list of network devices for the given pagination range.
- Parameters
start_index (int) – startIndex path parameter. Start index.
records_to_return (int) – recordsToReturn path parameter. Number of records to return.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_all_interfaces(limit=None, offset=None, headers=None, **request_parameters)[source]¶
Returns all available interfaces. This endpoint can return a maximum of 500 interfaces.
- Parameters
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_wireless_lan_controller_details_by_id(id, headers=None, **request_parameters)[source]¶
Returns the wireless lan controller info with given device ID.
- Parameters
id (basestring) – id path parameter. Device ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- retrieves_all_network_devices(associated_wlc_ip=None, collection_interval=None, collection_status=None, error_code=None, family=None, hostname=None, limit=None, mac_address=None, management_ip_address=None, offset=None, platform_id=None, reachability_failure_reason=None, reachability_status=None, role=None, role_source=None, serial_number=None, series=None, software_type=None, software_version=None, type=None, up_time=None, vrf_name=None, headers=None, **request_parameters)[source]¶
Gets the list of first 500 network devices sorted lexicographically based on host name. It can be filtered using management IP address, mac address, hostname and location name. If id param is provided, it will be returning the list of network-devices for the given id’s and other request params will be ignored. In case of autocomplete request, returns the list of specified attributes.
- Parameters
vrf_name (basestring) – vrfName query parameter.
management_ip_address (basestring) – managementIpAddress query parameter.
hostname (basestring) – hostname query parameter.
mac_address (basestring) – macAddress query parameter.
family (basestring) – family query parameter.
collection_status (basestring) – collectionStatus query parameter.
collection_interval (basestring) – collectionInterval query parameter.
software_version (basestring) – softwareVersion query parameter.
software_type (basestring) – softwareType query parameter.
reachability_status (basestring) – reachabilityStatus query parameter.
reachability_failure_reason (basestring) – reachabilityFailureReason query parameter.
error_code (basestring) – errorCode query parameter.
platform_id (basestring) – platformId query parameter.
series (basestring) – series query parameter.
type (basestring) – type query parameter.
serial_number (basestring) – serialNumber query parameter.
up_time (basestring) – upTime query parameter.
role (basestring) – role query parameter.
role_source (basestring) – roleSource query parameter.
associated_wlc_ip (basestring) – associatedWlcIp query parameter.
offset (basestring) – offset query parameter.
limit (basestring) – limit query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_detail(identifier, search_by, timestamp=None, headers=None, **request_parameters)[source]¶
Returns detailed Network Device information retrieved by Mac Address, Device Name or UUID for any given point of time. .
- Parameters
timestamp (basestring) – timestamp query parameter. Epoch time(in milliseconds) when the device data is required.
search_by (basestring) – searchBy query parameter. MAC Address or Device Name value or UUID of the network device.
identifier (basestring) – identifier query parameter. One of keywords : macAddress or uuid or nwDeviceName.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- devices(device_role=None, end_time=None, health=None, limit=None, offset=None, site_id=None, start_time=None, headers=None, **request_parameters)[source]¶
Intent API for accessing DNA Assurance Device object for generating reports, creating dashboards or creating additional value added services.
- Parameters
device_role (basestring) – deviceRole query parameter. The device role (One of CORE, ACCESS, DISTRIBUTION, ROUTER, WLC, AP).
site_id (basestring) – siteId query parameter. Assurance site UUID value.
health (basestring) – health query parameter. The device overall health (One of POOR, FAIR, GOOD).
start_time (int) – startTime query parameter. UTC epoch time in milliseconds.
end_time (int) – endTime query parameter. UTC epoch time in miliseconds.
limit (int) – limit query parameter. Max number of device entries in the response (default to 50. Max at 1000).
offset (int) – offset query parameter. The offset of the first device in the returned data.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_enrichment_details(headers=None, **request_parameters)[source]¶
Enriches a given network device context (device id or device Mac Address or device management IP address) with details about the device and neighbor topology.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
discovery¶
- class Discovery[source]¶
Cisco DNA Center Discovery API (version: 2.2.1).
Wraps the DNA Center Discovery API and exposes the API as native Python methods that return native Python objects.
- get_count_of_all_discovery_jobs(headers=None, **request_parameters)[source]¶
Returns the count of all available discovery jobs.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_netconf_credentials(comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, netconfPort=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global netconf credentials.
- Parameters
comments (string) – Discovery’s comments.
credentialType (string) – Discovery’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – Discovery’s description.
id (string) – Discovery’s id.
instanceTenantId (string) – Discovery’s instanceTenantId.
instanceUuid (string) – Discovery’s instanceUuid.
netconfPort (string) – Discovery’s netconfPort.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_netconf_credentials(comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, netconfPort=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global netconf credentials.
- Parameters
comments (string) – Discovery’s comments.
credentialType (string) – Discovery’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – Discovery’s description.
id (string) – Discovery’s id.
instanceTenantId (string) – Discovery’s instanceTenantId.
instanceUuid (string) – Discovery’s instanceUuid.
netconfPort (string) – Discovery’s netconfPort.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_snmpv3_credentials(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global SNMPv3 credential.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_snmpv3_credentials(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global SNMPv3 credentials.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_snmp_write_community(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global SNMP write community.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_snmp_write_community(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global SNMP write community.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discoveries_by_range(records_to_return, start_index, headers=None, **request_parameters)[source]¶
Returns the discovery by specified range.
- Parameters
start_index (int) – startIndex path parameter. Start index.
records_to_return (int) – recordsToReturn path parameter. Number of records to return.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_network_devices_from_discovery(id, cli_status=None, http_status=None, ip_address=None, netconf_status=None, ping_status=None, snmp_status=None, sort_by=None, sort_order=None, task_id=None, headers=None, **request_parameters)[source]¶
Returns the network devices from a discovery job based on given filters. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – id path parameter. Discovery ID.
task_id (basestring) – taskId query parameter.
sort_by (basestring) – sortBy query parameter.
sort_order (basestring) – sortOrder query parameter.
ip_address (basestring, list, set, tuple) – ipAddress query parameter.
ping_status (basestring, list, set, tuple) – pingStatus query parameter.
snmp_status (basestring, list, set, tuple) – snmpStatus query parameter.
cli_status (basestring, list, set, tuple) – cliStatus query parameter.
netconf_status (basestring, list, set, tuple) – netconfStatus query parameter.
http_status (basestring, list, set, tuple) – httpStatus query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_snmp_properties(headers=None, **request_parameters)[source]¶
Returns SNMP properties.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_update_snmp_properties(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds SNMP properties.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_snmp_read_community(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global SNMP read community.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_snmp_read_community(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global SNMP read community.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discovery_by_id(id, headers=None, **request_parameters)[source]¶
Returns discovery by Discovery ID. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – id path parameter. Discovery ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_discovery_by_id(id, headers=None, **request_parameters)[source]¶
Stops the discovery for the given Discovery ID and removes it. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – id path parameter. Discovery ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_http_write_credentials(comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, password=None, port=None, secure=None, username=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global HTTP write credentials.
- Parameters
comments (string) – Discovery’s comments.
credentialType (string) – Discovery’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – Discovery’s description.
id (string) – Discovery’s id.
instanceTenantId (string) – Discovery’s instanceTenantId.
instanceUuid (string) – Discovery’s instanceUuid.
password (string) – Discovery’s password.
port (integer) – Discovery’s port.
secure (boolean) – Discovery’s secure.
username (string) – Discovery’s username.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_http_write_credentials(comments=None, credentialType=None, description=None, id=None, instanceTenantId=None, instanceUuid=None, password=None, port=None, secure=None, username=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global HTTP write credentials.
- Parameters
comments (string) – Discovery’s comments.
credentialType (string) – Discovery’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – Discovery’s description.
id (string) – Discovery’s id.
instanceTenantId (string) – Discovery’s instanceTenantId.
instanceUuid (string) – Discovery’s instanceUuid.
password (string) – Discovery’s password.
port (integer) – Discovery’s port.
secure (boolean) – Discovery’s secure.
username (string) – Discovery’s username.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- updates_discovery_by_id(attributeInfo=None, cdpLevel=None, deviceIds=None, discoveryCondition=None, discoveryStatus=None, discoveryType=None, enablePasswordList=None, globalCredentialIdList=None, httpReadCredential=None, httpWriteCredential=None, id=None, ipAddressList=None, ipFilterList=None, isAutoCdp=None, lldpLevel=None, name=None, netconfPort=None, numDevices=None, parentDiscoveryId=None, passwordList=None, preferredMgmtIPMethod=None, protocolOrder=None, retryCount=None, snmpAuthPassphrase=None, snmpAuthProtocol=None, snmpMode=None, snmpPrivPassphrase=None, snmpPrivProtocol=None, snmpRoCommunity=None, snmpRoCommunityDesc=None, snmpRwCommunity=None, snmpRwCommunityDesc=None, snmpUserName=None, timeOut=None, updateMgmtIp=None, userNameList=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Stops or starts an existing discovery.
- Parameters
attributeInfo (object) – Discovery’s attributeInfo.
cdpLevel (integer) – Discovery’s cdpLevel.
deviceIds (string) – Discovery’s deviceIds.
discoveryCondition (string) – Discovery’s discoveryCondition.
discoveryStatus (string) – Discovery’s discoveryStatus.
discoveryType (string) – Discovery’s discoveryType.
enablePasswordList (string) – Discovery’s enablePasswordList.
globalCredentialIdList (list) – Discovery’s globalCredentialIdList (list of strings).
httpReadCredential (object) – Discovery’s httpReadCredential.
httpWriteCredential (object) – Discovery’s httpWriteCredential.
id (string) – Discovery’s id.
ipAddressList (string) – Discovery’s ipAddressList.
ipFilterList (string) – Discovery’s ipFilterList.
isAutoCdp (boolean) – Discovery’s isAutoCdp.
lldpLevel (integer) – Discovery’s lldpLevel.
name (string) – Discovery’s name.
netconfPort (string) – Discovery’s netconfPort.
numDevices (integer) – Discovery’s numDevices.
parentDiscoveryId (string) – Discovery’s parentDiscoveryId.
passwordList (string) – Discovery’s passwordList.
preferredMgmtIPMethod (string) – Discovery’s preferredMgmtIPMethod.
protocolOrder (string) – Discovery’s protocolOrder.
retryCount (integer) – Discovery’s retryCount.
snmpAuthPassphrase (string) – Discovery’s snmpAuthPassphrase.
snmpAuthProtocol (string) – Discovery’s snmpAuthProtocol.
snmpMode (string) – Discovery’s snmpMode.
snmpPrivPassphrase (string) – Discovery’s snmpPrivPassphrase.
snmpPrivProtocol (string) – Discovery’s snmpPrivProtocol.
snmpRoCommunity (string) – Discovery’s snmpRoCommunity.
snmpRoCommunityDesc (string) – Discovery’s snmpRoCommunityDesc.
snmpRwCommunity (string) – Discovery’s snmpRwCommunity.
snmpRwCommunityDesc (string) – Discovery’s snmpRwCommunityDesc.
snmpUserName (string) – Discovery’s snmpUserName.
timeOut (integer) – Discovery’s timeOut.
updateMgmtIp (boolean) – Discovery’s updateMgmtIp.
userNameList (string) – Discovery’s userNameList.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- start_discovery(cdpLevel=None, discoveryType=None, enablePasswordList=None, globalCredentialIdList=None, httpReadCredential=None, httpWriteCredential=None, ipAddressList=None, ipFilterList=None, lldpLevel=None, name=None, netconfPort=None, passwordList=None, preferredMgmtIPMethod=None, protocolOrder=None, retry=None, snmpAuthPassphrase=None, snmpAuthProtocol=None, snmpMode=None, snmpPrivPassphrase=None, snmpPrivProtocol=None, snmpROCommunity=None, snmpROCommunityDesc=None, snmpRWCommunity=None, snmpRWCommunityDesc=None, snmpUserName=None, snmpVersion=None, timeout=None, userNameList=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Initiates discovery with the given parameters.
- Parameters
cdpLevel (integer) – Discovery’s cdpLevel.
discoveryType (string) – Discovery’s discoveryType.
enablePasswordList (list) – Discovery’s enablePasswordList (list of strings).
globalCredentialIdList (list) – Discovery’s globalCredentialIdList (list of strings).
httpReadCredential (object) – Discovery’s httpReadCredential.
httpWriteCredential (object) – Discovery’s httpWriteCredential.
ipAddressList (string) – Discovery’s ipAddressList.
ipFilterList (list) – Discovery’s ipFilterList (list of strings).
lldpLevel (integer) – Discovery’s lldpLevel.
name (string) – Discovery’s name.
netconfPort (string) – Discovery’s netconfPort.
passwordList (list) – Discovery’s passwordList (list of strings).
preferredMgmtIPMethod (string) – Discovery’s preferredMgmtIPMethod.
protocolOrder (string) – Discovery’s protocolOrder.
retry (integer) – Discovery’s retry.
snmpAuthPassphrase (string) – Discovery’s snmpAuthPassphrase.
snmpAuthProtocol (string) – Discovery’s snmpAuthProtocol.
snmpMode (string) – Discovery’s snmpMode.
snmpPrivPassphrase (string) – Discovery’s snmpPrivPassphrase.
snmpPrivProtocol (string) – Discovery’s snmpPrivProtocol.
snmpROCommunity (string) – Discovery’s snmpROCommunity.
snmpROCommunityDesc (string) – Discovery’s snmpROCommunityDesc.
snmpRWCommunity (string) – Discovery’s snmpRWCommunity.
snmpRWCommunityDesc (string) – Discovery’s snmpRWCommunityDesc.
snmpUserName (string) – Discovery’s snmpUserName.
snmpVersion (string) – Discovery’s snmpVersion.
timeout (integer) – Discovery’s timeout.
userNameList (list) – Discovery’s userNameList (list of strings).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_all_discovery(headers=None, **request_parameters)[source]¶
Stops all the discoveries and removes them.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_credential_sub_type_by_credential_id(id, headers=None, **request_parameters)[source]¶
Returns the credential sub type for the given Id.
- Parameters
id (basestring) – id path parameter. Global Credential ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_global_credentials(global_credential_id, siteUuids=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Update global credential for network devices in site(s).
- Parameters
siteUuids (list) – Discovery’s siteUuids (list of strings).
global_credential_id (basestring) – globalCredentialId path parameter. Global credential Uuid.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_global_credentials_by_id(global_credential_id, headers=None, **request_parameters)[source]¶
Deletes global credential for the given ID.
- Parameters
global_credential_id (basestring) – globalCredentialId path parameter. ID of global-credential.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_http_read_credential(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global HTTP Read credential.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_http_read_credentials(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds HTTP read credentials.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_cli_credentials(comments=None, credentialType=None, description=None, enablePassword=None, id=None, instanceTenantId=None, instanceUuid=None, password=None, username=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates global CLI credentials.
- Parameters
comments (string) – Discovery’s comments.
credentialType (string) – Discovery’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – Discovery’s description.
enablePassword (string) – Discovery’s enablePassword.
id (string) – Discovery’s id.
instanceTenantId (string) – Discovery’s instanceTenantId.
instanceUuid (string) – Discovery’s instanceUuid.
password (string) – Discovery’s password.
username (string) – Discovery’s username.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_cli_credentials(comments=None, credentialType=None, description=None, enablePassword=None, id=None, instanceTenantId=None, instanceUuid=None, password=None, username=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds global CLI credential.
- Parameters
comments (string) – Discovery’s comments.
credentialType (string) – Discovery’s credentialType. Available values are ‘GLOBAL’ and ‘APP’.
description (string) – Discovery’s description.
enablePassword (string) – Discovery’s enablePassword.
id (string) – Discovery’s id.
instanceTenantId (string) – Discovery’s instanceTenantId.
instanceUuid (string) – Discovery’s instanceUuid.
password (string) – Discovery’s password.
username (string) – Discovery’s username.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_list_of_discoveries_by_discovery_id(id, ip_address=None, limit=None, offset=None, headers=None, **request_parameters)[source]¶
Returns the list of discovery jobs for the given Discovery ID. The results can be optionally filtered based on IP. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – id path parameter. Discovery ID.
offset (int) – offset query parameter.
limit (int) – limit query parameter.
ip_address (basestring) – ipAddress query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discovery_jobs_by_ip(ip_address, limit=None, name=None, offset=None, headers=None, **request_parameters)[source]¶
Returns the list of discovery jobs for the given IP.
- Parameters
offset (int) – offset query parameter.
limit (int) – limit query parameter.
ip_address (basestring) – ipAddress query parameter.
name (basestring) – name query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_devices_discovered_by_id(id, task_id=None, headers=None, **request_parameters)[source]¶
Returns the count of network devices discovered in the given discovery. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – id path parameter. Discovery ID.
task_id (basestring) – taskId query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discovered_devices_by_range(id, records_to_return, start_index, task_id=None, headers=None, **request_parameters)[source]¶
Returns the network devices discovered for the given discovery and for the given range. The maximum number of records that can be retrieved is 500. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – id path parameter. Discovery ID.
start_index (int) – startIndex path parameter. Start index.
records_to_return (int) – recordsToReturn path parameter. Number of records to return.
task_id (basestring) – taskId query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_discovery_by_specified_range(records_to_delete, start_index, headers=None, **request_parameters)[source]¶
Stops discovery for the given range and removes them.
- Parameters
start_index (int) – startIndex path parameter. Start index.
records_to_delete (int) – recordsToDelete path parameter. Number of records to delete.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_discovered_network_devices_by_discovery_id(id, task_id=None, headers=None, **request_parameters)[source]¶
Returns the network devices discovered for the given Discovery ID. Discovery ID can be obtained using the “Get Discoveries by range” API.
- Parameters
id (basestring) – id path parameter. Discovery ID.
task_id (basestring) – taskId query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_global_credentials(credential_sub_type, order=None, sort_by=None, headers=None, **request_parameters)[source]¶
Returns global credential for the given credential sub type.
- Parameters
credential_sub_type (basestring) – credentialSubType query parameter. Credential type as CLI / SNMPV2_READ_COMMUNITY / SNMPV2_WRITE_COMMUNITY / SNMPV3 / HTTP_WRITE / HTTP_READ / NETCONF.
sort_by (basestring) – sortBy query parameter.
order (basestring) – order query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
event_management¶
- class EventManagement[source]¶
Cisco DNA Center Event Management API (version: 2.2.1).
Wraps the DNA Center Event Management API and exposes the API as native Python methods that return native Python objects.
- count_of_event_subscriptions(event_ids, headers=None, **request_parameters)[source]¶
Returns the Count of EventSubscriptions.
- Parameters
event_ids (basestring) – eventIds query parameter. List of subscriptions related to the respective eventIds.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- count_of_notifications(category=None, domain=None, end_time=None, event_ids=None, severity=None, source=None, start_time=None, sub_domain=None, type=None, headers=None, **request_parameters)[source]¶
Get the Count of Published Notifications.
- Parameters
event_ids (basestring) – eventIds query parameter. The registered EventId should be provided.
start_time (int) – startTime query parameter. Start Time in milliseconds.
end_time (int) – endTime query parameter. End Time in milliseconds.
category (basestring) – category query parameter.
type (basestring) – type query parameter.
severity (basestring) – severity query parameter.
domain (basestring) – domain query parameter.
sub_domain (basestring) – subDomain query parameter. Sub Domain.
source (basestring) – source query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_syslog_subscription_details(connector_type, instance_id=None, name=None, headers=None, **request_parameters)[source]¶
Gets the list of subscription details for specified connectorType.
- Parameters
connector_type (basestring) – connectorType query parameter. Connector Type [SYSLOG].
name (basestring) – name query parameter. Name of the specific configuration.
instance_id (basestring) – instanceId query parameter. Instance Id of the specific configuration.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_email_subscription_details(connector_type, instance_id=None, name=None, headers=None, **request_parameters)[source]¶
Gets the list of subscription details for specified connectorType.
- Parameters
connector_type (basestring) – connectorType query parameter. Connector Type [EMAIL].
name (basestring) – name query parameter. Name of the specific configuration.
instance_id (basestring) – instanceId query parameter. Instance Id of the specific configuration.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_email_event_subscriptions(event_ids=None, limit=None, offset=None, order=None, sort_by=None, headers=None, **request_parameters)[source]¶
Gets the list of email Subscriptions’s based on provided offset and limit.
- Parameters
event_ids (basestring) – eventIds query parameter. List of email subscriptions related to the respective eventIds (Comma separated event ids).
offset (int) – offset query parameter. The number of Subscriptions’s to offset in the resultset whose default value 0.
limit (int) – limit query parameter. The number of Subscriptions’s to limit in the resultset whose default value 10.
sort_by (basestring) – sortBy query parameter. SortBy field name.
order (basestring) – order query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_email_event_subscription(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Update Email Subscription Endpoint for list of registered events.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_email_event_subscription(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Create Email Subscription Endpoint for list of registered events.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_events(tags, event_id=None, limit=None, offset=None, order=None, sort_by=None, headers=None, **request_parameters)[source]¶
Gets the list of registered Events with provided eventIds or tags as mandatory.
- Parameters
event_id (basestring) – eventId query parameter. The registered EventId should be provided.
tags (basestring) – tags query parameter. The registered Tags should be provided.
offset (int) – offset query parameter. The number of Registries to offset in the resultset whose default value 0.
limit (int) – limit query parameter. The number of Registries to limit in the resultset whose default value 10.
sort_by (basestring) – sortBy query parameter. SortBy field name.
order (basestring) – order query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_auditlog_summary(category=None, context=None, description=None, device_id=None, domain=None, end_time=None, event_hierarchy=None, event_id=None, instance_id=None, is_parent_only=None, is_system_events=None, name=None, parent_instance_id=None, severity=None, site_id=None, source=None, start_time=None, sub_domain=None, user_id=None, headers=None, **request_parameters)[source]¶
Get Audit Log Summary from the Event-Hub.
- Parameters
parent_instance_id (basestring) – parentInstanceId query parameter. Parent Audit Log record’s instanceID.
is_parent_only (bool) – isParentOnly query parameter. Parameter to filter parent only audit- logs.
instance_id (basestring) – instanceId query parameter. InstanceID of the Audit Log.
name (basestring) – name query parameter. Audit Log notification event name.
event_id (basestring) – eventId query parameter. Audit Log notification’s event ID. .
category (basestring) – category query parameter. Audit Log notification’s event category. Supported values: INFO, WARN, ERROR, ALERT, TASK_PROGRESS, TASK_FAILURE, TASK_COMPLETE, COMMAND, QUERY, CONVERSATION.
severity (basestring) – severity query parameter. Audit Log notification’s event severity. Supported values: 1, 2, 3, 4, 5.
domain (basestring) – domain query parameter. Audit Log notification’s event domain.
sub_domain (basestring) – subDomain query parameter. Audit Log notification’s event sub-domain.
source (basestring) – source query parameter. Audit Log notification’s event source.
user_id (basestring) – userId query parameter. Audit Log notification’s event userId.
context (basestring) – context query parameter. Audit Log notification’s event correlationId.
event_hierarchy (basestring) – eventHierarchy query parameter. Audit Log notification’s event eventHierarchy. Example: “US.CA.San Jose” OR “US.CA” OR “CA.San Jose” Delimiter for hierarchy separation is “.”.
site_id (basestring) – siteId query parameter. Audit Log notification’s siteId.
device_id (basestring) – deviceId query parameter. Audit Log notification’s deviceId.
is_system_events (bool) – isSystemEvents query parameter. Parameter to filter system generated audit-logs.
description (basestring) – description query parameter. String full/partial search (Provided input string is case insensitively matched for records).
start_time (int) – startTime query parameter. Start Time in milliseconds since Epoch Eg. 1597950637211 (when provided endTime is mandatory).
end_time (int) – endTime query parameter. End Time in milliseconds since Epoch Eg. 1597961437211 (when provided startTime is mandatory).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_event_subscriptions(event_ids=None, limit=None, offset=None, order=None, sort_by=None, headers=None, **request_parameters)[source]¶
Gets the list of Subscriptions’s based on provided offset and limit.
- Parameters
event_ids (basestring) – eventIds query parameter. List of subscriptions related to the respective eventIds.
offset (int) – offset query parameter. The number of Subscriptions’s to offset in the resultset whose default value 0.
limit (int) – limit query parameter. The number of Subscriptions’s to limit in the resultset whose default value 10.
sort_by (basestring) – sortBy query parameter. SortBy field name.
order (basestring) – order query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_event_subscriptions(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Update SubscriptionEndpoint to list of registered events.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_event_subscriptions(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Subscribe SubscriptionEndpoint to list of registered events.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_event_subscriptions(subscriptions, headers=None, **request_parameters)[source]¶
Delete EventSubscriptions.
- Parameters
subscriptions (basestring) – subscriptions query parameter. List of EventSubscriptionId’s for removal.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_syslog_event_subscriptions(event_ids=None, limit=None, offset=None, order=None, sort_by=None, headers=None, **request_parameters)[source]¶
Gets the list of Syslog Subscriptions’s based on provided offset and limit.
- Parameters
event_ids (basestring) – eventIds query parameter. List of subscriptions related to the respective eventIds (Comma separated event ids).
offset (int) – offset query parameter. The number of Subscriptions’s to offset in the resultset whose default value 0.
limit (int) – limit query parameter. The number of Subscriptions’s to limit in the resultset whose default value 10.
sort_by (basestring) – sortBy query parameter. SortBy field name.
order (basestring) – order query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_syslog_event_subscription(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Update Syslog Subscription Endpoint for list of registered events.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_syslog_event_subscription(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Create Syslog Subscription Endpoint for list of registered events.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- count_of_events(tags, event_id=None, headers=None, **request_parameters)[source]¶
Get the count of registered events with provided eventIds or tags as mandatory.
- Parameters
event_id (basestring) – eventId query parameter. The registered EventId should be provided.
tags (basestring) – tags query parameter. The registered Tags should be provided.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_eventartifacts(event_ids=None, limit=None, offset=None, order=None, search=None, sort_by=None, tags=None, headers=None, **request_parameters)[source]¶
Gets the list of artifacts based on provided offset and limit.
- Parameters
event_ids (basestring) – eventIds query parameter. List of eventIds.
tags (basestring) – tags query parameter. Tags defined.
offset (int) – offset query parameter. Record start offset.
limit (int) – limit query parameter. # of records to return in result set.
sort_by (basestring) – sortBy query parameter. Sort by field.
order (basestring) – order query parameter. sorting order (asc/desc).
search (basestring) – search query parameter. findd matches in name, description, eventId, type, category.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_notifications(category=None, domain=None, end_time=None, event_ids=None, limit=None, offset=None, order=None, severity=None, sort_by=None, source=None, start_time=None, sub_domain=None, type=None, headers=None, **request_parameters)[source]¶
Get the list of Published Notifications.
- Parameters
event_ids (basestring) – eventIds query parameter. The registered EventId should be provided.
start_time (int) – startTime query parameter. Start Time in milliseconds.
end_time (int) – endTime query parameter. End Time in milliseconds.
category (basestring) – category query parameter.
type (basestring) – type query parameter.
severity (basestring) – severity query parameter.
domain (basestring) – domain query parameter.
sub_domain (basestring) – subDomain query parameter. Sub Domain.
source (basestring) – source query parameter.
offset (int) – offset query parameter. Start Offset.
limit (int) – limit query parameter. # of records.
sort_by (basestring) – sortBy query parameter. Sort By column.
order (basestring) – order query parameter. Ascending/Descending order [asc/desc].
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_auditlog_records(category=None, context=None, description=None, device_id=None, domain=None, end_time=None, event_hierarchy=None, event_id=None, instance_id=None, is_system_events=None, limit=None, name=None, offset=None, order=None, parent_instance_id=None, severity=None, site_id=None, sort_by=None, source=None, start_time=None, sub_domain=None, user_id=None, headers=None, **request_parameters)[source]¶
Get Audit Log Event instances from the Event-Hub .
- Parameters
parent_instance_id (basestring) – parentInstanceId query parameter. Parent Audit Log record’s instanceID.
instance_id (basestring) – instanceId query parameter. InstanceID of the Audit Log.
name (basestring) – name query parameter. Audit Log notification event name.
event_id (basestring) – eventId query parameter. Audit Log notification’s event ID. .
category (basestring) – category query parameter. Audit Log notification’s event category. Supported values: INFO, WARN, ERROR, ALERT, TASK_PROGRESS, TASK_FAILURE, TASK_COMPLETE, COMMAND, QUERY, CONVERSATION.
severity (basestring) – severity query parameter. Audit Log notification’s event severity. Supported values: 1, 2, 3, 4, 5.
domain (basestring) – domain query parameter. Audit Log notification’s event domain.
sub_domain (basestring) – subDomain query parameter. Audit Log notification’s event sub-domain.
source (basestring) – source query parameter. Audit Log notification’s event source.
user_id (basestring) – userId query parameter. Audit Log notification’s event userId.
context (basestring) – context query parameter. Audit Log notification’s event correlationId.
event_hierarchy (basestring) – eventHierarchy query parameter. Audit Log notification’s event eventHierarchy. Example: “US.CA.San Jose” OR “US.CA” OR “CA.San Jose” Delimiter for hierarchy separation is “.”.
site_id (basestring) – siteId query parameter. Audit Log notification’s siteId.
device_id (basestring) – deviceId query parameter. Audit Log notification’s deviceId.
is_system_events (bool) – isSystemEvents query parameter. Parameter to filter system generated audit-logs.
description (basestring) – description query parameter. String full/partial search (Provided input string is case insensitively matched for records).
offset (int) – offset query parameter. Position of a particular Audit Log record in the data. .
limit (int) – limit query parameter. Number of Audit Log records to be returned per page.
start_time (int) – startTime query parameter. Start Time in milliseconds since Epoch Eg. 1597950637211 (when provided endTime is mandatory).
end_time (int) – endTime query parameter. End Time in milliseconds since Epoch Eg. 1597961437211 (when provided startTime is mandatory).
sort_by (basestring) – sortBy query parameter. Sort the Audit Logs by certain fields. Supported values are event notification header attributes.
order (basestring) – order query parameter. Order of the sorted Audit Log records. Default value is desc by timestamp. Supported values: asc, desc.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_rest_webhook_event_subscriptions(event_ids=None, limit=None, offset=None, order=None, sort_by=None, headers=None, **request_parameters)[source]¶
Gets the list of Rest/Webhook Subscriptions’s based on provided offset and limit.
- Parameters
event_ids (basestring) – eventIds query parameter. List of subscriptions related to the respective eventIds (Comma separated event ids).
offset (int) – offset query parameter. The number of Subscriptions’s to offset in the resultset whose default value 0.
limit (int) – limit query parameter. The number of Subscriptions’s to limit in the resultset whose default value 10.
sort_by (basestring) – sortBy query parameter. SortBy field name.
order (basestring) – order query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_rest_webhook_event_subscription(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Update Rest/Webhook Subscription Endpoint for list of registered events.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_rest_webhook_event_subscription(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Create Rest/Webhook Subscription Endpoint for list of registered events.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_auditlog_parent_records(category=None, context=None, description=None, device_id=None, domain=None, end_time=None, event_hierarchy=None, event_id=None, instance_id=None, is_system_events=None, limit=None, name=None, offset=None, order=None, severity=None, site_id=None, sort_by=None, source=None, start_time=None, sub_domain=None, user_id=None, headers=None, **request_parameters)[source]¶
Get Parent Audit Log Event instances from the Event-Hub .
- Parameters
instance_id (basestring) – instanceId query parameter. InstanceID of the Audit Log.
name (basestring) – name query parameter. Audit Log notification event name.
event_id (basestring) – eventId query parameter. Audit Log notification’s event ID. .
category (basestring) – category query parameter. Audit Log notification’s event category. Supported values: INFO, WARN, ERROR, ALERT, TASK_PROGRESS, TASK_FAILURE, TASK_COMPLETE, COMMAND, QUERY, CONVERSATION.
severity (basestring) – severity query parameter. Audit Log notification’s event severity. Supported values: 1, 2, 3, 4, 5.
domain (basestring) – domain query parameter. Audit Log notification’s event domain.
sub_domain (basestring) – subDomain query parameter. Audit Log notification’s event sub-domain.
source (basestring) – source query parameter. Audit Log notification’s event source.
user_id (basestring) – userId query parameter. Audit Log notification’s event userId.
context (basestring) – context query parameter. Audit Log notification’s event correlationId.
event_hierarchy (basestring) – eventHierarchy query parameter. Audit Log notification’s event eventHierarchy. Example: “US.CA.San Jose” OR “US.CA” OR “CA.San Jose” Delimiter for hierarchy separation is “.”.
site_id (basestring) – siteId query parameter. Audit Log notification’s siteId.
device_id (basestring) – deviceId query parameter. Audit Log notification’s deviceId.
is_system_events (bool) – isSystemEvents query parameter. Parameter to filter system generated audit-logs.
description (basestring) – description query parameter. String full/partial search (Provided input string is case insensitively matched for records).
offset (int) – offset query parameter. Position of a particular Audit Log record in the data. .
limit (int) – limit query parameter. Number of Audit Log records to be returned per page.
start_time (int) – startTime query parameter. Start Time in milliseconds since Epoch Eg. 1597950637211 (when provided endTime is mandatory).
end_time (int) – endTime query parameter. End Time in milliseconds since Epoch Eg. 1597961437211 (when provided startTime is mandatory).
sort_by (basestring) – sortBy query parameter. Sort the Audit Logs by certain fields. Supported values are event notification header attributes.
order (basestring) – order query parameter. Order of the sorted Audit Log records. Default value is desc by timestamp. Supported values: asc, desc.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- eventartifact_count(headers=None, **request_parameters)[source]¶
Get the count of registered event artifacts with provided eventIds or tags as mandatory.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_rest_webhook_subscription_details(connector_type, instance_id=None, name=None, headers=None, **request_parameters)[source]¶
Gets the list of subscription details for specified connectorType.
- Parameters
connector_type (basestring) – connectorType query parameter. Connector Type [REST].
name (basestring) – name query parameter. Name of the specific configuration.
instance_id (basestring) – instanceId query parameter. Instance Id of the specific configuration.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_status_api_for_events(execution_id, headers=None, **request_parameters)[source]¶
Get the Status of events API calls with provided executionId as mandatory path parameter.
- Parameters
execution_id (basestring) – executionId path parameter. Execution ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
file¶
- class File[source]¶
Cisco DNA Center File API (version: 2.2.1).
Wraps the DNA Center File API and exposes the API as native Python methods that return native Python objects.
- get_list_of_available_namespaces(headers=None, **request_parameters)[source]¶
Returns list of available namespaces.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_list_of_files(name_space, headers=None, **request_parameters)[source]¶
Returns list of files under a specific namespace.
- Parameters
name_space (basestring) – nameSpace path parameter. A listing of fileId’s.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- download_a_file_by_fileid(file_id, dirpath=None, save_file=None, headers=None, **request_parameters)[source]¶
Downloads a file specified by fileId.
- Parameters
file_id (basestring) – fileId path parameter. File Identification number.
dirpath (basestring) – Directory absolute path. Defaults to os.getcwd().
save_file (bool) – Enable or disable automatic file creation of raw response.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
HTTP Response container. For more information check the urlib3 documentation
- Return type
urllib3.response.HTTPResponse
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
DownloadFailure – If was not able to download the raw
response to a file. –
itsm¶
- class Itsm[source]¶
Cisco DNA Center ITSM API (version: 2.2.1).
Wraps the DNA Center ITSM API and exposes the API as native Python methods that return native Python objects.
- get_failed_itsm_events(instance_id=None, headers=None, **request_parameters)[source]¶
Used to retrieve the list of integration events that failed to create tickets in ITSM.
- Parameters
instance_id (basestring) – instanceId query parameter. Instance Id of the failed event as in the Runtime Dashboard.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- retry_integration_events(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Allows retry of multiple failed ITSM event instances. The retry request payload can be given as a list of strings: [“instance1”,”instance2”,”instance3”,..] A minimum of one instance Id is mandatory. The list of failed event instance Ids can be retrieved using the ‘Get Failed ITSM Events’ API in the ‘instanceId’ attribute.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_cmdb_sync_status(date=None, status=None, headers=None, **request_parameters)[source]¶
This API allows to retrieve the detail of CMDB sync status.It accepts two query parameter “status”,”date”.The supported values for status field are “Success”,”Failed”,”Unknown” and date field should be in “YYYY-MM-DD” format. By default all the cmdb sync status will be send as response and based on the query parameter filtered detail will be send as response.
- Parameters
status (basestring) – status query parameter. Supported values are “Success”,”Failed” and “Unknown”. Providing other values will result in all the available sync job status.
date (basestring) – date query parameter. Provide date in “YYYY-MM-DD” format.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
issues¶
- class Issues[source]¶
Cisco DNA Center Issues API (version: 2.2.1).
Wraps the DNA Center Issues API and exposes the API as native Python methods that return native Python objects.
- issues(ai_driven=None, device_id=None, end_time=None, issue_status=None, mac_address=None, priority=None, site_id=None, start_time=None, headers=None, **request_parameters)[source]¶
Intent API to get a list of global issues, issues for a specific device, or issue for a specific client device’s MAC address.
- Parameters
start_time (int) – startTime query parameter. Starting epoch time in milliseconds of query time window.
end_time (int) – endTime query parameter. Ending epoch time in milliseconds of query time window.
site_id (basestring) – siteId query parameter. Assurance UUID value of the site in the issue content.
device_id (basestring) – deviceId query parameter. Assurance UUID value of the device in the issue content.
mac_address (basestring) – macAddress query parameter. Client’s device MAC address of the issue (format xx:xx:xx:xx:xx:xx).
priority (basestring) – priority query parameter. The issue’s priority value (One of P1, P2, P3, or P4)(Use only when macAddress and deviceId are not provided).
ai_driven (basestring) – aiDriven query parameter. The issue’s AI driven value (Yes or No)(Use only when macAddress and deviceId are not provided).
issue_status (basestring) – issueStatus query parameter. The issue’s status value (One of ACTIVE, IGNORED, RESOLVED) (Use only when macAddress and deviceId are not provided).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_issue_enrichment_details(headers=None, **request_parameters)[source]¶
Enriches a given network issue context (an issue id or end user’s Mac Address) with details about the issue(s), impacted hosts and suggested actions for remediation.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
network_settings¶
- class NetworkSettings[source]¶
Cisco DNA Center Network Settings API (version: 2.2.1).
Wraps the DNA Center Network Settings API and exposes the API as native Python methods that return native Python objects.
- get_global_pool(limit=None, offset=None, headers=None, **request_parameters)[source]¶
API to get global pool.
- Parameters
offset (basestring) – offset query parameter. offset/starting row.
limit (basestring) – limit query parameter. No of Global Pools to be retrieved.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_global_pool(settings=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to update global pool.
- Parameters
settings (object) – Network Settings’s settings.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_global_pool(settings=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to create global pool.
- Parameters
settings (object) – Network Settings’s settings.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_global_ip_pool(id, headers=None, **request_parameters)[source]¶
API to delete global IP pool.
- Parameters
id (basestring) – id path parameter. global pool id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_device_credential(id, headers=None, **request_parameters)[source]¶
Delete device credential.
- Parameters
id (basestring) – id path parameter. global credential id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_network(site_id=None, headers=None, **request_parameters)[source]¶
API to get DHCP and DNS center server details.
- Parameters
site_id (basestring) – siteId query parameter. Site id to get the network settings associated with the site.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_reserve_ip_subpool(limit=None, offset=None, site_id=None, headers=None, **request_parameters)[source]¶
API to get the ip subpool info.
- Parameters
site_id (basestring) – siteId query parameter. site id to get the reserve ip associated with the site.
offset (basestring) – offset query parameter. offset/starting row.
limit (basestring) – limit query parameter. No of Global Pools to be retrieved.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_reserve_ip_subpool(id, site_id, ipv4DhcpServers=None, ipv4DnsServers=None, ipv6AddressSpace=None, ipv6DhcpServers=None, ipv6DnsServers=None, ipv6GateWay=None, ipv6GlobalPool=None, ipv6Prefix=None, ipv6PrefixLength=None, ipv6Subnet=None, ipv6TotalHost=None, name=None, slaacSupport=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to update ip subpool from the global pool.
- Parameters
ipv4DhcpServers (list) – Network Settings’s ipv4DhcpServers (list of strings).
ipv4DnsServers (list) – Network Settings’s ipv4DnsServers (list of strings).
ipv6AddressSpace (boolean) – Network Settings’s ipv6AddressSpace.
ipv6DhcpServers (list) – Network Settings’s ipv6DhcpServers (list of strings).
ipv6DnsServers (list) – Network Settings’s ipv6DnsServers (list of strings).
ipv6GateWay (string) – Network Settings’s ipv6GateWay.
ipv6GlobalPool (string) – Network Settings’s ipv6GlobalPool.
ipv6Prefix (boolean) – Network Settings’s ipv6Prefix.
ipv6PrefixLength (integer) – Network Settings’s ipv6PrefixLength.
ipv6Subnet (string) – Network Settings’s ipv6Subnet.
ipv6TotalHost (integer) – Network Settings’s ipv6TotalHost.
name (string) – Network Settings’s name.
slaacSupport (boolean) – Network Settings’s slaacSupport.
site_id (basestring) – siteId path parameter. Site id of site to update sub pool.
id (basestring) – id query parameter. Id of subpool to be associated with the site.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- reserve_ip_subpool(site_id, ipv4DhcpServers=None, ipv4DnsServers=None, ipv4GateWay=None, ipv4GlobalPool=None, ipv4Prefix=None, ipv4PrefixLength=None, ipv4Subnet=None, ipv4TotalHost=None, ipv6AddressSpace=None, ipv6DhcpServers=None, ipv6DnsServers=None, ipv6GateWay=None, ipv6GlobalPool=None, ipv6Prefix=None, ipv6PrefixLength=None, ipv6Subnet=None, ipv6TotalHost=None, name=None, slaacSupport=None, type=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to reserve an ip subpool from the global pool.
- Parameters
ipv4DhcpServers (list) – Network Settings’s ipv4DhcpServers (list of strings).
ipv4DnsServers (list) – Network Settings’s ipv4DnsServers (list of strings).
ipv4GateWay (string) – Network Settings’s ipv4GateWay.
ipv4GlobalPool (string) – Network Settings’s ipv4GlobalPool.
ipv4Prefix (boolean) – Network Settings’s ipv4Prefix.
ipv4PrefixLength (integer) – Network Settings’s ipv4PrefixLength.
ipv4Subnet (string) – Network Settings’s ipv4Subnet.
ipv4TotalHost (integer) – Network Settings’s ipv4TotalHost.
ipv6AddressSpace (boolean) – Network Settings’s ipv6AddressSpace.
ipv6DhcpServers (list) – Network Settings’s ipv6DhcpServers (list of strings).
ipv6DnsServers (list) – Network Settings’s ipv6DnsServers (list of strings).
ipv6GateWay (string) – Network Settings’s ipv6GateWay.
ipv6GlobalPool (string) – Network Settings’s ipv6GlobalPool.
ipv6Prefix (boolean) – Network Settings’s ipv6Prefix.
ipv6PrefixLength (integer) – Network Settings’s ipv6PrefixLength.
ipv6Subnet (string) – Network Settings’s ipv6Subnet.
ipv6TotalHost (integer) – Network Settings’s ipv6TotalHost.
name (string) – Network Settings’s name.
slaacSupport (boolean) – Network Settings’s slaacSupport.
type (string) – Network Settings’s type. Available values are ‘Generic’, ‘LAN’, ‘WAN’, ‘management’ and ‘service’.
site_id (basestring) – siteId path parameter. Site id to reserve the ip sub pool.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_credential_details(site_id=None, headers=None, **request_parameters)[source]¶
API to get device credential details.
- Parameters
site_id (basestring) – siteId query parameter. Site id to retrieve the credential details associated with the site.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_device_credentials(settings=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to update device credentials.
- Parameters
settings (object) – Network Settings’s settings.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_device_credentials(settings=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to create device credentials.
- Parameters
settings (object) – Network Settings’s settings.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_sp_profile(sp_profile_name, headers=None, **request_parameters)[source]¶
API to delete Service Provider profile (QoS).
- Parameters
sp_profile_name (basestring) – sp-profile-name path parameter. sp profile name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_service_provider_details(headers=None, **request_parameters)[source]¶
API to get service provider details (QoS).
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_sp_profile(settings=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to update SP profile.
- Parameters
settings (object) – Network Settings’s settings.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_sp_profile(settings=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to create service provider profile(QOS).
- Parameters
settings (object) – Network Settings’s settings.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_network(site_id, settings=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to update network for DHCP and DNS center server settings.
- Parameters
settings (object) – Network Settings’s settings.
site_id (basestring) – siteId path parameter. Site id to update the network settings which is associated with the site.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_network(site_id, settings=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to create a network for DHCP and DNS center server settings.
- Parameters
settings (object) – Network Settings’s settings.
site_id (basestring) – siteId path parameter. Site id to which site details to associate with the network settings.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- assign_credential_to_site(site_id, cliId=None, httpRead=None, httpWrite=None, snmpV2ReadId=None, snmpV2WriteId=None, snmpV3Id=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Assign Device Credential To Site .
- Parameters
cliId (string) – Network Settings’s cliId.
httpRead (string) – Network Settings’s httpRead.
httpWrite (string) – Network Settings’s httpWrite.
snmpV2ReadId (string) – Network Settings’s snmpV2ReadId.
snmpV2WriteId (string) – Network Settings’s snmpV2WriteId.
snmpV3Id (string) – Network Settings’s snmpV3Id.
site_id (basestring) – siteId path parameter. site id to assign credential.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- release_reserve_ip_subpool(id, headers=None, **request_parameters)[source]¶
API to delete the reserved ip subpool.
- Parameters
id (basestring) – id path parameter. Id of reserve ip subpool to be deleted.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
path_trace¶
- class PathTrace[source]¶
Cisco DNA Center Path Trace API (version: 2.2.1).
Wraps the DNA Center Path Trace API and exposes the API as native Python methods that return native Python objects.
- retrives_all_previous_pathtraces_summary(dest_ip=None, dest_port=None, gt_create_time=None, last_update_time=None, limit=None, lt_create_time=None, offset=None, order=None, periodic_refresh=None, protocol=None, sort_by=None, source_ip=None, source_port=None, status=None, task_id=None, headers=None, **request_parameters)[source]¶
Returns a summary of all flow analyses stored. Results can be filtered by specified parameters.
- Parameters
periodic_refresh (bool) – periodicRefresh query parameter. Is analysis periodically refreshed?.
source_ip (basestring) – sourceIP query parameter. Source IP address.
dest_ip (basestring) – destIP query parameter. Destination IP adress.
source_port (basestring) – sourcePort query parameter. Source port.
dest_port (basestring) – destPort query parameter. Destination port.
gt_create_time (basestring) – gtCreateTime query parameter. Analyses requested after this time.
lt_create_time (basestring) – ltCreateTime query parameter. Analyses requested before this time.
protocol (basestring) – protocol query parameter.
status (basestring) – status query parameter.
task_id (basestring) – taskId query parameter. Task ID.
last_update_time (basestring) – lastUpdateTime query parameter. Last update time.
limit (basestring) – limit query parameter. Number of resources returned.
offset (basestring) – offset query parameter. Start index of resources returned (1-based).
order (basestring) – order query parameter. Order by this field.
sort_by (basestring) – sortBy query parameter. Sort by this field.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- initiate_a_new_pathtrace(controlPath=None, destIP=None, destPort=None, inclusions=None, periodicRefresh=None, protocol=None, sourceIP=None, sourcePort=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Initiates a new flow analysis with periodic refresh and stat collection options. Returns a request id and a task id to get results and follow progress.
- Parameters
controlPath (boolean) – Path Trace’s controlPath.
destIP (string) – Path Trace’s destIP.
destPort (string) – Path Trace’s destPort.
inclusions (list) – Path Trace’s inclusions (list of strings).
periodicRefresh (boolean) – Path Trace’s periodicRefresh.
protocol (string) – Path Trace’s protocol.
sourceIP (string) – Path Trace’s sourceIP.
sourcePort (string) – Path Trace’s sourcePort.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- retrieves_previous_pathtrace(flow_analysis_id, headers=None, **request_parameters)[source]¶
Returns result of a previously requested flow analysis by its Flow Analysis id.
- Parameters
flow_analysis_id (basestring) – flowAnalysisId path parameter. Flow analysis request id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- deletes_pathtrace_by_id(flow_analysis_id, headers=None, **request_parameters)[source]¶
Deletes a flow analysis request by its id.
- Parameters
flow_analysis_id (basestring) – flowAnalysisId path parameter. Flow analysis request id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
reports¶
- class Reports[source]¶
Cisco DNA Center Reports API (version: 2.2.1).
Wraps the DNA Center Reports API and exposes the API as native Python methods that return native Python objects.
- get_views_for_a_given_view_group(view_group_id, headers=None, **request_parameters)[source]¶
Gives a list of summary of all views in a viewgroup. Use “Get all view groups” API to get the viewGroupIds (required as a query param for this API) for available viewgroups.
- Parameters
view_group_id (basestring) – viewGroupId path parameter. viewGroupId of viewgroup.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_view_details_for_a_given_view_group_and_view(view_group_id, view_id, headers=None, **request_parameters)[source]¶
Gives complete information of the view that is required to configure a report. Use “Get views for a given view group” API to get the viewIds (required as a query param for this API) for available views.
- Parameters
view_group_id (basestring) – viewGroupId path parameter. viewGroupId of viewgroup.
view_id (basestring) – viewId path parameter. view id of view.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_a_scheduled_report(report_id, headers=None, **request_parameters)[source]¶
Get scheduled report configuration by reportId.
- Parameters
report_id (basestring) – reportId path parameter. reportId of report.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_a_scheduled_report(report_id, headers=None, **request_parameters)[source]¶
Delete a scheduled report configuration. Deletes the report executions also.
- Parameters
report_id (basestring) – reportId path parameter. reportId of report.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_list_of_scheduled_reports(view_group_id=None, view_id=None, headers=None, **request_parameters)[source]¶
Get list of scheduled report configurations.
- Parameters
view_group_id (basestring) – viewGroupId query parameter. viewGroupId of viewgroup for report.
view_id (basestring) – viewId query parameter. viewId of view for report.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_or_schedule_a_report(deliveries=None, name=None, schedule=None, tags=None, view=None, viewGroupId=None, viewGroupVersion=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Create/Schedule a report configuration. Use “Get view details for a given view group & view” API to get the metadata required to configure a report.
- Parameters
deliveries (list) – Reports’s deliveries (list of objects).
name (string) – Reports’s name.
schedule (object) – Reports’s schedule.
tags (list) – Reports’s tags (list of strings).
view (object) – Reports’s view.
viewGroupId (string) – Reports’s viewGroupId.
viewGroupVersion (string) – Reports’s viewGroupVersion.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_all_view_groups(headers=None, **request_parameters)[source]¶
Gives a list of summary of all view groups.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_all_execution_details_for_a_given_report(report_id, headers=None, **request_parameters)[source]¶
Get details of all executions for a given report.
- Parameters
report_id (basestring) – reportId path parameter. reportId of report.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- download_report_content(execution_id, report_id, headers=None, **request_parameters)[source]¶
Returns report content. Save the response to a file by converting the response data as a blob and setting the file format available from content-disposition response header.
- Parameters
report_id (basestring) – reportId path parameter. reportId of report.
execution_id (basestring) – executionId path parameter. executionId of report execution.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
sda¶
- class Sda[source]¶
Cisco DNA Center SDA API (version: 2.2.1).
Wraps the DNA Center SDA API and exposes the API as native Python methods that return native Python objects.
- get_port_assignment_for_access_point(device_ip, interface_name, headers=None, **request_parameters)[source]¶
Get Port assignment for access point in SDA Fabric.
- Parameters
device_ip (basestring) – device-ip query parameter.
interface_name (basestring) – interfaceName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_port_assignment_for_access_point(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add Port assignment for access point in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_port_assignment_for_access_point(device_ip, interface_name, headers=None, **request_parameters)[source]¶
Delete Port assignment for access point in SDA Fabric.
- Parameters
device_ip (basestring) – device-ip query parameter.
interface_name (basestring) – interfaceName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_info(device_ipaddress, headers=None, **request_parameters)[source]¶
Get device info from SDA Fabric.
- Parameters
device_ipaddress (basestring) – deviceIPAddress query parameter. Device IP Address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_sda_fabric_info(fabric_name, headers=None, **request_parameters)[source]¶
Get SDA Fabric Info.
- Parameters
fabric_name (basestring) – fabricName query parameter. Fabric Name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_fabric(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_sda_fabric(fabric_name, headers=None, **request_parameters)[source]¶
Delete SDA Fabric.
- Parameters
fabric_name (basestring) – fabricName query parameter. Fabric Name.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_edge_device(device_ipaddress, headers=None, **request_parameters)[source]¶
Get edge device from SDA Fabric.
- Parameters
device_ipaddress (basestring) – deviceIPAddress query parameter. Device IP Address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_edge_device(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add edge device in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_edge_device(device_ipaddress, headers=None, **request_parameters)[source]¶
Delete edge device from SDA Fabric.
- Parameters
device_ipaddress (basestring) – deviceIPAddress query parameter. Device IP Address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_ip_pool_from_sda_virtual_network(ip_pool_name, virtual_network_name, headers=None, **request_parameters)[source]¶
Get IP Pool from SDA Virtual Network.
- Parameters
ip_pool_name (basestring) – ipPoolName query parameter.
virtual_network_name (basestring) – virtualNetworkName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_ip_pool_in_sda_virtual_network(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add IP Pool in SDA Virtual Network.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_ip_pool_from_sda_virtual_network(ip_pool_name, virtual_network_name, headers=None, **request_parameters)[source]¶
Delete IP Pool from SDA Virtual Network.
- Parameters
ip_pool_name (basestring) – ipPoolName query parameter.
virtual_network_name (basestring) – virtualNetworkName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_vn(site_name_hierarchy, virtual_network_name, headers=None, **request_parameters)[source]¶
Get virtual network (VN) from SDA Fabric.
- Parameters
virtual_network_name (basestring) – virtualNetworkName query parameter.
site_name_hierarchy (basestring) – siteNameHierarchy query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_vn(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add virtual network (VN) in SDA Fabric .
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_vn(site_name_hierarchy, virtual_network_name, headers=None, **request_parameters)[source]¶
Delete virtual network (VN) from SDA Fabric .
- Parameters
virtual_network_name (basestring) – virtualNetworkName query parameter.
site_name_hierarchy (basestring) – siteNameHierarchy query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_default_authentication_profile(site_name_hierarchy, headers=None, **request_parameters)[source]¶
Get default authentication profile from SDA Fabric.
- Parameters
site_name_hierarchy (basestring) – siteNameHierarchy query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_default_authentication_profile(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Update default authentication profile in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_default_authentication_profile(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add default authentication profile in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_default_authentication_profile(site_name_hierarchy, headers=None, **request_parameters)[source]¶
Add default authentication profile in SDA Fabric.
- Parameters
site_name_hierarchy (basestring) – siteNameHierarchy query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_site(site_name_hierarchy, headers=None, **request_parameters)[source]¶
Get Site info from SDA Fabric.
- Parameters
site_name_hierarchy (basestring) – siteNameHierarchy query parameter. Site Name Hierarchy.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_site(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add Site in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_site(site_name_hierarchy, headers=None, **request_parameters)[source]¶
Delete Site from SDA Fabric.
- Parameters
site_name_hierarchy (basestring) – siteNameHierarchy query parameter. Site Name Hierarchy.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_sda_fabric_count(headers=None, **request_parameters)[source]¶
Get SDA Fabric Count.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_port_assignment_for_user_device(device_ip, interface_name, headers=None, **request_parameters)[source]¶
Get Port assignment for user device in SDA Fabric.
- Parameters
device_ip (basestring) – device-ip query parameter.
interface_name (basestring) – interfaceName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_port_assignment_for_user_device(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add Port assignment for user device in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_port_assignment_for_user_device(device_ip, interface_name, headers=None, **request_parameters)[source]¶
Delete Port assignment for user device in SDA Fabric.
- Parameters
device_ip (basestring) – device-ip query parameter.
interface_name (basestring) – interfaceName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_role_in_sda_fabric(device_management_ip_address, headers=None, **request_parameters)[source]¶
Get device role in SDA Fabric.
- Parameters
device_management_ip_address (basestring) – deviceManagementIpAddress query parameter. Device Management IP Address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- gets_border_device_detail(device_ipaddress, headers=None, **request_parameters)[source]¶
Gets border device detail from SDA Fabric.
- Parameters
device_ipaddress (basestring) – deviceIPAddress query parameter. Device IP Address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- adds_border_device(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds border device in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- deletes_border_device(device_ipaddress, headers=None, **request_parameters)[source]¶
Deletes border device from SDA Fabric.
- Parameters
device_ipaddress (basestring) – deviceIPAddress query parameter. Device IP Address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_control_plane_device(device_ipaddress, headers=None, **request_parameters)[source]¶
Get control plane device from SDA Fabric.
- Parameters
device_ipaddress (basestring) – deviceIPAddress query parameter. Device IP Address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_control_plane_device(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Add control plane device in SDA Fabric.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_control_plane_device(device_ipaddress, headers=None, **request_parameters)[source]¶
Delete control plane device in SDA Fabric.
- Parameters
device_ipaddress (basestring) – deviceIPAddress query parameter. Device IP Address.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
security_advisories¶
- class SecurityAdvisories[source]¶
Cisco DNA Center Security Advisories API (version: 2.2.1).
Wraps the DNA Center Security Advisories API and exposes the API as native Python methods that return native Python objects.
- get_advisories_summary(headers=None, **request_parameters)[source]¶
Retrieves summary of advisories on the network.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_advisories_per_device(device_id, headers=None, **request_parameters)[source]¶
Retrieves list of advisories for a device.
- Parameters
device_id (basestring) – deviceId path parameter. Device instance UUID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_advisories_list(headers=None, **request_parameters)[source]¶
Retrieves list of advisories on the network.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_advisory_ids_per_device(device_id, headers=None, **request_parameters)[source]¶
Retrieves list of advisory IDs for a device.
- Parameters
device_id (basestring) – deviceId path parameter. Device instance UUID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_devices_per_advisory(advisory_id, headers=None, **request_parameters)[source]¶
Retrieves list of devices for an advisory.
- Parameters
advisory_id (basestring) – advisoryId path parameter. Advisory ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
sensors¶
- class Sensors[source]¶
Cisco DNA Center Sensors API (version: 2.2.1).
Wraps the DNA Center Sensors API and exposes the API as native Python methods that return native Python objects.
- sensors(site_id=None, headers=None, **request_parameters)[source]¶
Intent API to get a list of SENSOR devices.
- Parameters
site_id (basestring) – siteId query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_sensor_test_template(apCoverage=None, connection=None, modelVersion=None, name=None, ssids=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Intent API to create a SENSOR test template with a new SSID, existing SSID, or both new and existing SSID.
- Parameters
apCoverage (list) – Sensors’s apCoverage (list of objects).
connection (string) – Sensors’s connection.
modelVersion (integer) – Sensors’s modelVersion.
name (string) – Sensors’s name.
ssids (list) – Sensors’s ssids (list of objects).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_sensor_test(template_name=None, headers=None, **request_parameters)[source]¶
Intent API to delete an existing SENSOR test template.
- Parameters
template_name (basestring) – templateName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- duplicate_sensor_test_template(newTemplateName=None, templateName=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Intent API to duplicate an existing SENSOR test template.
- Parameters
newTemplateName (string) – Sensors’s newTemplateName.
templateName (string) – Sensors’s templateName.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- edit_sensor_test_template(locationInfoList=None, schedule=None, templateName=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Intent API to deploy, schedule, or edit and existing SENSOR test template.
- Parameters
locationInfoList (list) – Sensors’s locationInfoList (list of objects).
schedule (object) – Sensors’s schedule.
templateName (string) – Sensors’s templateName.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- run_now_sensor_test(templateName=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Intent API to run a deployed SENSOR test.
- Parameters
templateName (string) – Sensors’s templateName.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
site_design¶
- class SiteDesign[source]¶
Cisco DNA Center Site Design API (version: 2.2.1).
Wraps the DNA Center Site Design API and exposes the API as native Python methods that return native Python objects.
- get_nfv_profile(id, limit=None, name=None, offset=None, headers=None, **request_parameters)[source]¶
API to get NFV network profile.
- Parameters
id (basestring) – id path parameter. ID of network profile to retrieve.
offset (basestring) – offset query parameter. offset/starting row.
limit (basestring) – limit query parameter. Number of profile to be retrieved.
name (basestring) – name query parameter. Name of network profile to be retrieved.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_nfv_profile(id, device=None, name=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to update a NFV Network profile.
- Parameters
device (list) – Site Design’s device (list of objects).
id (basestring) – id path parameter. Id of the NFV profile to be updated.
name (basestring) – name query parameter. Name of the profile to be updated.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- nfv_provisioning_detail(device_ip=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Checks the provisioning detail of an ENCS device including log information.
- Parameters
device_ip (string) – Site Design’s device_ip.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- provision_nfv(provisioning=None, siteProfile=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Design and Provision single/multi NFV device with given site/area/building/floor .
- Parameters
provisioning (list) – Site Design’s provisioning (list of objects).
siteProfile (list) – Site Design’s siteProfile (list of objects).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_nfv_profile(device=None, profileName=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
API to create network profile for different NFV topologies.
- Parameters
device (list) – Site Design’s device (list of objects).
profileName (string) – Site Design’s profileName.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_nfv_profile(id, name=None, headers=None, **request_parameters)[source]¶
API to delete nfv network profile.
- Parameters
id (basestring) – id path parameter. Id of nfv network profile to delete. .
name (basestring) – name query parameter. Nameof nfv network profile to delete. .
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_device_details_by_ip(device_ip, headers=None, **request_parameters)[source]¶
Returns provisioning device information for the specified IP address.
- Parameters
device_ip (basestring) – deviceIp query parameter. Device to which the provisioning detail has to be retrieved.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
sites¶
- class Sites[source]¶
Cisco DNA Center Sites API (version: 2.2.1).
Wraps the DNA Center Sites API and exposes the API as native Python methods that return native Python objects.
- assign_device_to_site(site_id, device=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Assigns list of devices to a site.
- Parameters
device (list) – Sites’s device (list of objects).
site_id (basestring) – siteId path parameter. Site id to which site the device to assign.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_site_health(timestamp=None, headers=None, **request_parameters)[source]¶
Returns Overall Health information for all sites.
- Parameters
timestamp (basestring) – timestamp query parameter. Epoch time(in milliseconds) when the Site Hierarchy data is required.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_site(limit=None, name=None, offset=None, site_id=None, type=None, headers=None, **request_parameters)[source]¶
Get site using siteNameHierarchy/siteId/type ,return all sites if these parameters are not given as input.
- Parameters
name (basestring) – name query parameter. siteNameHierarchy (ex: global/groupName).
site_id (basestring) – siteId query parameter. Site id to which site details to retrieve.
type (basestring) – type query parameter. type (ex: area, building, floor).
offset (basestring) – offset query parameter. offset/starting row.
limit (basestring) – limit query parameter. Number of sites to be retrieved.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_site(site=None, type=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates site with area/building/floor with specified hierarchy.
- Parameters
site (object) – Sites’s site.
type (string) – Sites’s type. Available values are ‘area’, ‘building’ and ‘floor’.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_site_count(site_id=None, headers=None, **request_parameters)[source]¶
API to get site count .
- Parameters
site_id (basestring) – siteId query parameter. Site id to retrieve site count.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_site(site_id, site=None, type=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Update site area/building/floor with specified hierarchy and new values.
- Parameters
site (object) – Sites’s site.
type (string) – Sites’s type. Available values are ‘area’, ‘building’ and ‘floor’.
site_id (basestring) – siteId path parameter. Site id to which site details to be updated.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_site(site_id, headers=None, **request_parameters)[source]¶
Delete site with area/building/floor by siteId.
- Parameters
site_id (basestring) – siteId path parameter. Site id to which site details to be deleted.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_membership(site_id, device_family=None, limit=None, offset=None, serial_number=None, headers=None, **request_parameters)[source]¶
Getting the site children details and device details.
- Parameters
site_id (basestring) – siteId path parameter. Site id to retrieve device associated with the site.
offset (basestring) – offset query parameter. offset/starting row.
limit (basestring) – limit query parameter. Number of sites to be retrieved.
device_family (basestring) – deviceFamily query parameter. Device family name .
serial_number (basestring) – serialNumber query parameter. Device serial number.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
software_image_management_swim¶
- class SoftwareImageManagementSwim[source]¶
Cisco DNA Center Software Image Management (SWIM) API (version: 2.2.1).
Wraps the DNA Center Software Image Management (SWIM) API and exposes the API as native Python methods that return native Python objects.
- get_software_image_details(application_type=None, created_time=None, family=None, image_integrity_status=None, image_name=None, image_series=None, image_size_greater_than=None, image_size_lesser_than=None, image_uuid=None, is_cco_latest=None, is_cco_recommended=None, is_tagged_golden=None, limit=None, name=None, offset=None, sort_by=None, sort_order=None, version=None, headers=None, **request_parameters)[source]¶
Returns software image list based on a filter criteria. For example: “filterbyName = cat3k%”.
- Parameters
image_uuid (basestring) – imageUuid query parameter.
name (basestring) – name query parameter.
family (basestring) – family query parameter.
application_type (basestring) – applicationType query parameter.
image_integrity_status (basestring) – imageIntegrityStatus query parameter. imageIntegrityStatus FAILURE, UNKNOWN, VERIFIED.
version (basestring) – version query parameter. software Image Version.
image_series (basestring) – imageSeries query parameter. image Series.
image_name (basestring) – imageName query parameter. image Name.
is_tagged_golden (bool) – isTaggedGolden query parameter. is Tagged Golden.
is_cco_recommended (bool) – isCCORecommended query parameter. is recommended from cisco.com.
is_cco_latest (bool) – isCCOLatest query parameter. is latest from cisco.com.
created_time (int) – createdTime query parameter. time in milliseconds (epoch format).
image_size_greater_than (int) – imageSizeGreaterThan query parameter. size in bytes.
image_size_lesser_than (int) – imageSizeLesserThan query parameter. size in bytes.
sort_by (basestring) – sortBy query parameter. sort results by this field.
sort_order (basestring) – sortOrder query parameter. sort order ‘asc’ or ‘des’. Default is asc.
limit (int) – limit query parameter.
offset (int) – offset query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- import_local_software_image(multipart_fields, multipart_monitor_callback, is_third_party=None, third_party_application_type=None, third_party_image_family=None, third_party_vendor=None, headers=None, **request_parameters)[source]¶
Fetches a software image from local file system and uploads to DNA Center. Supported software image files extensions are bin, img, tar, smu, pie, aes, iso, ova, tar_gz and qcow2.
The following code gives an example of the multipart_fields.
multipart_fields={'file': ('file.zip', open('file.zip', 'rb')} multipart_fields={'file': ('file.txt', open('file.txt', 'rb'), 'text/plain', {'X-My-Header': 'my-value'})} multipart_fields=[('images', ('foo.png', open('foo.png', 'rb'), 'image/png')), ('images', ('bar.png', open('bar.png', 'rb'), 'image/png'))]
The following example demonstrates how to use multipart_monitor_callback=create_callback to create a progress bar using clint.
from clint.textui.progress import Bar def create_callback(encoder): encoder_len = encoder.len bar = Bar(expected_size=encoder_len, filled_char="=") def callback(monitor): bar.show(monitor.bytes_read) return callback
- Parameters
is_third_party (bool) – isThirdParty query parameter. Third party Image check.
third_party_vendor (basestring) – thirdPartyVendor query parameter. Third Party Vendor.
third_party_image_family (basestring) – thirdPartyImageFamily query parameter. Third Party image family.
third_party_application_type (basestring) – thirdPartyApplicationType query parameter. Third Party Application Type.
multipart_fields (dict) – Fields from which to create a multipart/form-data body.
multipart_monitor_callback (function) – function used to monitor the progress of the upload.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- trigger_software_image_distribution(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Distributes a software image on a given device. Software image must be imported successfully into DNA Center before it can be distributed.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- import_software_image_via_url(schedule_at=None, schedule_desc=None, schedule_origin=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Fetches a software image from remote file system (using URL for HTTP/FTP) and uploads to DNA Center. Supported image files extensions are bin, img, tar, smu, pie, aes, iso, ova, tar_gz and qcow2.
- Parameters
schedule_at (basestring) – scheduleAt query parameter. Epoch Time (The number of milli-seconds since January 1 1970 UTC) at which the distribution should be scheduled (Optional) .
schedule_desc (basestring) – scheduleDesc query parameter. Custom Description (Optional).
schedule_origin (basestring) – scheduleOrigin query parameter. Originator of this call (Optional).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- trigger_software_image_activation(schedule_validate=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Activates a software image on a given device. Software image must be present in the device flash.
- Parameters
schedule_validate (bool) – scheduleValidate query parameter. scheduleValidate, validates data before schedule (Optional).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
tag¶
- class Tag[source]¶
Cisco DNA Center Tag API (version: 2.2.1).
Wraps the DNA Center Tag API and exposes the API as native Python methods that return native Python objects.
- get_tag_members_by_id(id, member_type, level=None, limit=None, member_association_type=None, offset=None, headers=None, **request_parameters)[source]¶
Returns tag members specified by id.
- Parameters
id (basestring) – id path parameter. Tag ID.
member_type (basestring) – memberType query parameter. Entity type of the member. Possible values can be retrieved by using /tag/member/type API.
offset (basestring) – offset query parameter. Used for pagination. It indicates the starting row number out of available member records.
limit (basestring) – limit query parameter. Used to Number of maximum members to return in the result.
member_association_type (basestring) – memberAssociationType query parameter. Indicates how the member is associated with the tag. Possible values and description. 1) DYNAMIC : The member is associated to the tag through rules. 2) STATIC – The member is associated to the tag manually. 3) MIXED – The member is associated manually and also satisfies the rule defined for the tag.
level (basestring) – level query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- add_members_to_the_tag(id, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Adds members to the tag specified by id.
- Parameters
id (basestring) – id path parameter. Tag ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag(additional_info_attributes=None, additional_info_name_space=None, field=None, level=None, limit=None, name=None, offset=None, order=None, size=None, sort_by=None, system_tag=None, headers=None, **request_parameters)[source]¶
Returns the tags for given filter criteria.
- Parameters
name (basestring) – name query parameter. Tag name is mandatory when filter operation is used.
additional_info_name_space (basestring) – additionalInfo.nameSpace query parameter.
additional_info_attributes (basestring) – additionalInfo.attributes query parameter.
level (basestring) – level query parameter.
offset (basestring) – offset query parameter.
limit (basestring) – limit query parameter.
size (basestring) – size query parameter. size in kilobytes(KB).
field (basestring) – field query parameter. Available field names are :’name,id,parentId,type, additionalInfo.nameSpace,additionalInfo. attributes’.
sort_by (basestring) – sortBy query parameter. Only supported attribute is name. SortyBy is mandatory when order is used.
order (basestring) – order query parameter. Available values are asc and des.
system_tag (basestring) – systemTag query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_tag(description=None, dynamicRules=None, id=None, instanceTenantId=None, name=None, systemTag=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates a tag specified by id.
- Parameters
description (string) – Tag’s description.
dynamicRules (list) – Tag’s dynamicRules (list of objects).
id (string) – Tag’s id.
instanceTenantId (string) – Tag’s instanceTenantId.
name (string) – Tag’s name.
systemTag (boolean) – Tag’s systemTag.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_tag(description=None, dynamicRules=None, id=None, instanceTenantId=None, name=None, systemTag=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates tag with specified tag attributes.
- Parameters
description (string) – Tag’s description.
dynamicRules (list) – Tag’s dynamicRules (list of objects).
id (string) – Tag’s id.
instanceTenantId (string) – Tag’s instanceTenantId.
name (string) – Tag’s name.
systemTag (boolean) – Tag’s systemTag.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag_member_count(id, member_type, level=None, member_association_type=None, headers=None, **request_parameters)[source]¶
Returns the number of members in a given tag.
- Parameters
id (basestring) – id path parameter. Tag ID.
member_type (basestring) – memberType query parameter.
member_association_type (basestring) – memberAssociationType query parameter.
level (basestring) – level query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag_by_id(id, headers=None, **request_parameters)[source]¶
Returns tag specified by Id.
- Parameters
id (basestring) – id path parameter. Tag ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_tag(id, headers=None, **request_parameters)[source]¶
Deletes a tag specified by id.
- Parameters
id (basestring) – id path parameter. Tag ID.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- updates_tag_membership(memberToTags=None, memberType=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates tag membership. As part of the request payload through this API, only the specified members are added / retained to the given input tags. Possible values of memberType attribute in the request payload can be queried by using the /tag/member/type API.
- Parameters
memberToTags (list) – Tag’s memberToTags (list of objects).
memberType (string) – Tag’s memberType.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag_resource_types(headers=None, **request_parameters)[source]¶
Returns list of supported resource types.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tag_count(attribute_name=None, level=None, name=None, name_space=None, size=None, system_tag=None, headers=None, **request_parameters)[source]¶
Returns tag count.
- Parameters
name (basestring) – name query parameter.
name_space (basestring) – nameSpace query parameter.
attribute_name (basestring) – attributeName query parameter.
level (basestring) – level query parameter.
size (basestring) – size query parameter. size in kilobytes(KB).
system_tag (basestring) – systemTag query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- remove_tag_member(id, member_id, headers=None, **request_parameters)[source]¶
Removes Tag member from the tag specified by id.
- Parameters
id (basestring) – id path parameter. Tag ID.
member_id (basestring) – memberId path parameter. TagMember id to be removed from tag.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
task¶
- class Task[source]¶
Cisco DNA Center Task API (version: 2.2.1).
Wraps the DNA Center Task API and exposes the API as native Python methods that return native Python objects.
- get_task_count(data=None, end_time=None, error_code=None, failure_reason=None, is_error=None, parent_id=None, progress=None, service_type=None, start_time=None, username=None, headers=None, **request_parameters)[source]¶
Returns Task count.
- Parameters
start_time (basestring) – startTime query parameter. This is the epoch start time from which tasks need to be fetched.
end_time (basestring) – endTime query parameter. This is the epoch end time upto which audit records need to be fetched.
data (basestring) – data query parameter. Fetch tasks that contains this data.
error_code (basestring) – errorCode query parameter. Fetch tasks that have this error code.
service_type (basestring) – serviceType query parameter. Fetch tasks with this service type.
username (basestring) – username query parameter. Fetch tasks with this username.
progress (basestring) – progress query parameter. Fetch tasks that contains this progress.
is_error (basestring) – isError query parameter. Fetch tasks ended as success or failure. Valid values: true, false.
failure_reason (basestring) – failureReason query parameter. Fetch tasks that contains this failure reason.
parent_id (basestring) – parentId query parameter. Fetch tasks that have this parent Id.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_task_by_id(task_id, headers=None, **request_parameters)[source]¶
Returns a task by specified id.
- Parameters
task_id (basestring) – taskId path parameter. UUID of the Task.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_task_by_operationid(limit, offset, operation_id, headers=None, **request_parameters)[source]¶
Returns root tasks associated with an Operationid.
- Parameters
operation_id (basestring) – operationId path parameter.
offset (int) – offset path parameter. Index, minimum value is 0.
limit (int) – limit path parameter. The maximum value of {limit} supported is 500. Base 1 indexing for {limit}, minimum value is 1.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_tasks(data=None, end_time=None, error_code=None, failure_reason=None, is_error=None, limit=None, offset=None, order=None, parent_id=None, progress=None, service_type=None, sort_by=None, start_time=None, username=None, headers=None, **request_parameters)[source]¶
Returns task(s) based on filter criteria.
- Parameters
start_time (basestring) – startTime query parameter. This is the epoch start time from which tasks need to be fetched.
end_time (basestring) – endTime query parameter. This is the epoch end time upto which audit records need to be fetched.
data (basestring) – data query parameter. Fetch tasks that contains this data.
error_code (basestring) – errorCode query parameter. Fetch tasks that have this error code.
service_type (basestring) – serviceType query parameter. Fetch tasks with this service type.
username (basestring) – username query parameter. Fetch tasks with this username.
progress (basestring) – progress query parameter. Fetch tasks that contains this progress.
is_error (basestring) – isError query parameter. Fetch tasks ended as success or failure. Valid values: true, false.
failure_reason (basestring) – failureReason query parameter. Fetch tasks that contains this failure reason.
parent_id (basestring) – parentId query parameter. Fetch tasks that have this parent Id.
offset (basestring) – offset query parameter.
limit (basestring) – limit query parameter.
sort_by (basestring) – sortBy query parameter. Sort results by this field.
order (basestring) – order query parameter. Sort order asc or dsc.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_task_tree(task_id, headers=None, **request_parameters)[source]¶
Returns a task with its children tasks by based on their id.
- Parameters
task_id (basestring) – taskId path parameter. UUID of the Task.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
topology¶
- class Topology[source]¶
Cisco DNA Center Topology API (version: 2.2.1).
Wraps the DNA Center Topology API and exposes the API as native Python methods that return native Python objects.
- get_vlan_details(headers=None, **request_parameters)[source]¶
Returns the list of VLAN names.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_site_topology(headers=None, **request_parameters)[source]¶
Returns site topology.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_physical_topology(node_type=None, headers=None, **request_parameters)[source]¶
Returns the raw physical topology by specified criteria of nodeType.
- Parameters
node_type (basestring) – nodeType query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_topology_details(vlan_id, headers=None, **request_parameters)[source]¶
Returns Layer 2 network topology by specified VLAN ID.
- Parameters
vlan_id (basestring) – vlanID path parameter. Vlan Name for e.g Vlan1, Vlan23 etc.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_l3_topology_details(topology_type, headers=None, **request_parameters)[source]¶
Returns the Layer 3 network topology by routing protocol.
- Parameters
topology_type (basestring) – topologyType path parameter. Type of topology(OSPF,ISIS,etc).
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_overall_network_health(timestamp=None, headers=None, **request_parameters)[source]¶
Returns Overall Network Health information by Device category (Access, Distribution, Core, Router, Wireless) for any given point of time.
- Parameters
timestamp (basestring) – timestamp query parameter. Epoch time(in milliseconds) when the Network health data is required.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
users¶
- class Users[source]¶
Cisco DNA Center Users API (version: 2.2.1).
Wraps the DNA Center Users API and exposes the API as native Python methods that return native Python objects.
- get_user_enrichment_details(headers=None, **request_parameters)[source]¶
Enriches a given network End User context (a network user-id or end user’s device Mac Address) with details about the user and devices that the user is connected to.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
wireless¶
- class Wireless[source]¶
Cisco DNA Center Wireless API (version: 2.2.1).
Wraps the DNA Center Wireless API and exposes the API as native Python methods that return native Python objects.
- retrieve_rf_profiles(rf_profile_name=None, headers=None, **request_parameters)[source]¶
Retrieve all RF profiles.
- Parameters
rf_profile_name (basestring) – rf-profile-name query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_or_update_rf_profile(channelWidth=None, defaultRfProfile=None, enableBrownField=None, enableCustom=None, enableRadioTypeA=None, enableRadioTypeB=None, name=None, radioTypeAProperties=None, radioTypeBProperties=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Create or Update RF profile.
- Parameters
channelWidth (string) – Wireless’s channelWidth.
defaultRfProfile (boolean) – Wireless’s defaultRfProfile.
enableBrownField (boolean) – Wireless’s enableBrownField.
enableCustom (boolean) – Wireless’s enableCustom.
enableRadioTypeA (boolean) – Wireless’s enableRadioTypeA.
enableRadioTypeB (boolean) – Wireless’s enableRadioTypeB.
name (string) – Wireless’s name.
radioTypeAProperties (object) – Wireless’s radioTypeAProperties.
radioTypeBProperties (object) – Wireless’s radioTypeBProperties.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_and_provision_ssid(enableFabric=None, flexConnect=None, managedAPLocations=None, ssidDetails=None, ssidType=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates SSID, updates the SSID to the corresponding site profiles and provision it to the devices matching the given sites.
- Parameters
enableFabric (boolean) – Wireless’s enableFabric.
flexConnect (object) – Wireless’s flexConnect.
managedAPLocations (list) – Wireless’s managedAPLocations (list of strings).
ssidDetails (object) – Wireless’s ssidDetails.
ssidType (string) – Wireless’s ssidType. Available values are ‘Guest’ and ‘Enterprise’.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_rf_profiles(rf_profile_name, headers=None, **request_parameters)[source]¶
Delete RF profile(s).
- Parameters
rf_profile_name (basestring) – rf-profile-name path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_enterprise_ssid(ssid_name=None, headers=None, **request_parameters)[source]¶
Gets either one or all the enterprise SSID.
- Parameters
ssid_name (basestring) – ssidName query parameter. Enter the enterprise SSID name that needs to be retrieved. If not entered, all the enterprise SSIDs will be retrieved.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_enterprise_ssid(enableBroadcastSSID=None, enableFastLane=None, enableMACFiltering=None, fastTransition=None, name=None, passphrase=None, radioPolicy=None, securityLevel=None, trafficType=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates enterprise SSID.
- Parameters
enableBroadcastSSID (boolean) – Wireless’s enableBroadcastSSID.
enableFastLane (boolean) – Wireless’s enableFastLane.
enableMACFiltering (boolean) – Wireless’s enableMACFiltering.
fastTransition (string) – Wireless’s fastTransition. Available values are ‘Adaptive’, ‘Enable’ and ‘Disable’.
name (string) – Wireless’s name.
passphrase (string) – Wireless’s passphrase.
radioPolicy (string) – Wireless’s radioPolicy. Available values are ‘Dual band operation (2.4GHz and 5GHz)’, ‘Dual band operation with band select’, ‘5GHz only’ and ‘2.4GHz only’.
securityLevel (string) – Wireless’s securityLevel. Available values are ‘WPA2_ENTERPRISE’, ‘WPA2_PERSONAL’ and ‘OPEN’.
trafficType (string) – Wireless’s trafficType. Available values are ‘voicedata’ and ‘data’.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- get_wireless_profile(profile_name=None, headers=None, **request_parameters)[source]¶
Gets either one or all the wireless network profiles if no name is provided for network-profile.
- Parameters
profile_name (basestring) – profileName query parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. A list of MyDict objects. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- update_wireless_profile(profileDetails=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates the wireless Network Profile with updated details provided. All sites to be present in the network profile should be provided.
- Parameters
profileDetails (object) – Wireless’s profileDetails.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- create_wireless_profile(profileDetails=None, headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Creates Wireless Network Profile on DNAC and associates sites and SSIDs to it.
- Parameters
profileDetails (object) – Wireless’s profileDetails.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (dict) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- provision_update(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Updates wireless provisioning.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- provision(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Provision wireless devices.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- sensor_test_results(end_time=None, site_id=None, start_time=None, test_failure_by=None, headers=None, **request_parameters)[source]¶
Intent API to get SENSOR test result summary.
- Parameters
site_id (basestring) – siteId query parameter. Assurance site UUID.
start_time (int) – startTime query parameter. The epoch time in milliseconds.
end_time (int) – endTime query parameter. The epoch time in milliseconds.
test_failure_by (basestring) – testFailureBy query parameter. Obtain failure statistics group by “area”, “building”, or “floor”.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_enterprise_ssid(ssid_name, headers=None, **request_parameters)[source]¶
Deletes given enterprise SSID.
- Parameters
ssid_name (basestring) – ssidName path parameter. Enter the SSID name to be deleted.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_wireless_profile(wireless_profile_name, headers=None, **request_parameters)[source]¶
Delete the Wireless Profile from DNAC whose name is provided.
- Parameters
wireless_profile_name (basestring) – wirelessProfileName path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- ap_provision(headers=None, payload=None, active_validation=True, **request_parameters)[source]¶
Provision wireless Access points.
- Parameters
headers (dict) – Dictionary of HTTP Headers to send with the Request .
payload (list) – A JSON serializable Python object to send in the body of the Request.
active_validation (bool) – Enable/Disable payload validation. Defaults to True.
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
- delete_ssid_and_provision_it_to_devices(managed_aplocations, ssid_name, headers=None, **request_parameters)[source]¶
Removes SSID or WLAN from the network profile, reprovision the device(s) and deletes the SSID or WLAN from DNA Center.
- Parameters
ssid_name (basestring) – ssidName path parameter.
managed_aplocations (basestring) – managedAPLocations path parameter.
headers (dict) – Dictionary of HTTP Headers to send with the Request .
**request_parameters – Additional request parameters (provides support for parameters that may be added in the future).
- Returns
JSON response. Access the object’s properties by using the dot notation or the bracket notation.
- Return type
- Raises
TypeError – If the parameter types are incorrect.
MalformedRequest – If the request body created is invalid.
ApiError – If the DNA Center cloud returns an error.
DNA Center Data Object¶
MyDict¶
- class MyDict[source]¶
A Python _dict_ subclass which tries to act like JavaScript objects, so you can use the dot notation (.) to access members of the object. If the member doesn’t exist yet then it’s created when you assign something to it. Brackets notation (d[‘foo’]) is also possible.
Exceptions¶
- exception dnacentersdkException[source]¶
Bases:
Exception
Base class for all dnacentersdk package exceptions.
- exception AccessTokenError[source]¶
Bases:
dnacentersdk.exceptions.dnacentersdkException
Raised when an incorrect DNA Center Access Token has been provided.
- exception VersionError[source]¶
Bases:
dnacentersdk.exceptions.dnacentersdkException
Raised when an incorrect DNA Center version has been provided.
- exception ApiError[source]¶
Bases:
dnacentersdk.exceptions.dnacentersdkException
Errors returned in response to requests sent to the DNA Center APIs.
Several data attributes are available for inspection.
- response¶
The
requests.Response
object returned from the API call.
- request¶
The
requests.PreparedRequest
of the API call.
- status_code¶
The HTTP status code from the API response.
- status¶
The HTTP status from the API response.
- details¶
The parsed JSON details from the API response.
- message¶
The error message from the parsed API response.
- description¶
A description of the HTTP Response Code from the API docs.
- exception RateLimitError[source]¶
Bases:
dnacentersdk.exceptions.ApiError
Cisco DNA Center Rate-Limit exceeded Error.
Raised when a rate-limit exceeded message is received and the request will not be retried.
- retry_after¶
The Retry-After time period (in seconds) provided by DNA Center.
Defaults to 15 seconds if the response Retry-After header isn’t present in the response headers, and defaults to a minimum wait time of 1 second if DNA Center returns a Retry-After header of 0 seconds.
- exception RateLimitWarning[source]¶
Bases:
UserWarning
Cisco DNA Center rate-limit exceeded warning.
Raised when a rate-limit exceeded message is received and the request will be retried.
- retry_after¶
The Retry-After time period (in seconds) provided by DNA Center.
Defaults to 15 seconds if the response Retry-After header isn’t present in the response headers, and defaults to a minimum wait time of 1 second if DNA Center returns a Retry-After header of 0 seconds.
- exception MalformedRequest[source]¶
Bases:
dnacentersdk.exceptions.dnacentersdkException
Raised when a malformed request is received from DNA Center user.
- exception DownloadFailure[source]¶
Bases:
dnacentersdk.exceptions.dnacentersdkException
Errors returned in response to requests sent to the DNA Center APIs with stream=True.
Several data attributes are available for inspection.
- response¶
The
requests.Response
object returned from the API call.
- request¶
The
requests.PreparedRequest
of the API call.
- status_code¶
The HTTP status code from the API response.
- status¶
The HTTP status from the API response.
- original_error¶
The original exception
- raw¶
The raw value of the API response
Copyright (c) 2019-2021 Cisco Systems.