APIs In Action -Cisco DNA Center Platform

Transcription

APIs in Action - Cisco DNA Center PlatformGet creative with Cisco DNA Assurance dataSaurav PrasadTechnical Marketing, Cisco Systems@theSauravPrasad

Saurav PrasadPrincipal Engineer, Technical Marketing, Cisco SystemsSaurav has been with the Cisco DNA Centertechnical marketing team for the last 4 years.His focus area has been programmability andintegrations. He has co-authored couple ofbooks on Cisco Software-Defined Access andCisco DNA Assurance.Saurav is a Cisco Live Distinguished Speaker.

What is Cisco DNA Center?Network ControllerAssurance and Analytics Real-time Closed Loop ControllerSingle pane of glass for all devices Granular visibilityVerify intent of network settingsPredict and resolve issues Simplified workflowsReduce time spent troubleshooting Analytics driven Run Book Automation Automation Device Lifecycle ManagementProgrammability Zero-touch deployments & RMA APIs, Webhooks, DaaS and SDKs Secure Software Image Management DevNet Ecosystem and Partner Exchange Rolling Updates for Zero Down Time IT Ecosystem Integration Rogue Device Management 3rd Party Device SupportPolicy and Segmentation Application and Security Policy Macro and Micro SegmentationNetwork Access Services (w/Cisco ISE) Cisco DNA CenterPhysical and Virtual InfrastructureMulti-Domain Integration Simplifying Intent-based Networkingacross the multi-domain network Consistent Policy across SD-Access, SDWAN and SD-Data Centers (ACI)

Cisco DNA Center PlatformIntent APIsNetwork OnboardingNetwork AutomationNetwork Assuranceand AnalyticsNetwork OperationsPolicyDaaS &PushNotificationsITEco-SystemIntegrationsBulk Data Export(JSON, CSV & TDE)Event Notifications viaWebhooks(Assurance, AI/MLIssues, System etc.)IT Service MgmtSIEMIP Address MgmtReportingWireless PlanningIncident ManagementDeveloperEnablementPython SDKAnsible ModulesSandbox EnvironmentLearning Labs3rd Party DeviceSupport SDK

Cisco DNA Assurance & AnalyticsNetwork telemetry andcontextual dataComplex eventprocessingCorrelated insightsSuggestedremediationTracerouteSyslog NetflowAAATelnetRouterDHCPWirelessCLIIPSLA DNS PingSNMP IPAM lientsBaselineVisibility:Personalized baseliningInsight:Intelligent NetworkKnowledge BaseOver 150 Actionable insightsClient Applications Wireless Switching RoutingAction:Accelerated remediation

Data ExternalizationIntent-based REST API’sAPI (and its underlying construct)operates at a higher level ofabstractionEvent NotificationsAsynchronous notifications whenan issue of interest occurs.Bulk Data ExportScheduled periodic bulk export ofdata in multiple data consumptionformats

Intent-based REST APIs

Cisco DNA Center – API Docs

Cisco DNA Center – API AuthenticationStep 1: Request service token§ A Session Token is required for Cisco DNA CenterIntent REST API calls1) Use the POST /auth/token API Call to generate token2) Copy ticket and add to X-Auth-Token Header3) Use in subsequent API callsStep 2: API response with token information§ Intent REST APIs use the JSON format for exchange ofdata between the controller and the REST application(API consumer)Step 3: Add ticket to the X-Auth-Token headerPOSThttps:// DNAC-IP /dna/system/api/v1/auth/token

Cisco DNA Assurance & Analytics - APIsSite HealthNetwork DeviceHealthClient HealthCisco DNAAssuranceApplication t/api/v1/issues

Network Inventory & Topology APIsNetwork Inventory/network-device/interface/network-device/ opology/physical-topologyCisco gy/l2/ {vlanID}/topology/l3/ {topologyType}

Site/Network Health - GUI

Site/Network Health - API

Site/Network Health – API response{"response": [{"siteName": "Pleasanton","siteId": Id": " All Sites","parentSiteName": " All Sites","siteType": "area","latitude": null,"longitude": null,"healthyNetworkDevicePercentage": 75,"healthyClientsPercentage": 50,"clientHealthWired": 100,"clientHealthWireless": 0,"numberOfClients": 4,"numberOfNetworkDevice": 4,"networkHealthAverage": 75,"networkHealthAccess": null,"networkHealthCore": null,"networkHealthDistribution": null,"networkHealthRouter": 100,"networkHealthWireless": 67,"networkHealthOthers": null,"numberOfWiredClients": 2,"numberOfWirelessClients": 2,"totalNumberOfConnectedWiredClients": null,"totalNumberOfActiveWirelessClients": null, .snip. .snip. {"siteName": " All Sites","siteId": " All Sites","parentSiteId": null,"parentSiteName": null,"siteType": "area","latitude": null,"longitude": null,"healthyNetworkDevicePercentage": 84,"healthyClientsPercentage": 90,"clientHealthWired": 100,"clientHealthWireless": 89,"numberOfClients": 169,"numberOfNetworkDevice": 32,"networkHealthAverage": 84,"networkHealthAccess": 71,"networkHealthCore": 100,"networkHealthDistribution": null,"networkHealthRouter": 100,"networkHealthWireless": 84,"networkHealthOthers": null,"numberOfWiredClients": 17,"numberOfWirelessClients": 152,"totalNumberOfConnectedWiredClients": null,"totalNumberOfActiveWirelessClients": null,"wiredGoodClients": 17, .snip.

Client Health - GUI

Client Health - API

Site/Network Health – API response{"response": [{"siteId": "global","scoreDetail": [{"scoreCategory": {"scoreCategory": "CLIENT TYPE","value": "ALL"},"scoreValue": 85,"clientCount": 198,"clientUniqueCount": 198,"starttime": 1579910400000,"endtime": 1579910700000},{"scoreCategory": {"scoreCategory": "CLIENT TYPE","value": "WIRED"},"scoreValue": 100,"clientCount": 20,"clientUniqueCount": 20,"starttime": 1579910400000,"endtime": 1579910700000,"scoreList": [ .snip. {"scoreCategory": {"scoreCategory": "CLIENT TYPE","value": "WIRELESS"},"scoreValue": 83,"clientCount": 178,"clientUniqueCount": 178,"starttime": 1579910400000,"endtime": 1579910700000,"scoreList": [{"scoreCategory": {"scoreCategory": "SCORE TYPE","value": "POOR"},"scoreValue": -1,"clientCount": 15,"clientUniqueCount": 0,"starttime": 1579910400000,"endtime": 1579910700000,"scoreList": [{"scoreCategory": {"scoreCategory":"deviceType", .snip.

Event Notifications viaWebhooks

Event Notifications - WebhooksNetworkInfrastructureSwitchingRoutingEvent ssuranceBusinessUse lessNotificationMethodDNAC SystemLoggingManagedServicesCisco DNA Center

Events Catalog

Event Destinations

Event Notifications Webhook Schema{REST SchemaEvent Header"instanceId": "String","eventId": "String","name": "String","namespace": "String","description": "String","type": "String","category": "String","severity": "Number","timestamp": "Number /*Time in epoch milliseconds*/","domain": "String","subDomain": "String","source": "String","context": "String /*Default null*/","details": "Object","version": "String /*Default null*/","tags": "Array /*Default empty and Currently Not in use*/","ciscoDnaEventLink": "String","note": "String","tntId": "String /*Default null and Currently Not in use*/","tenantId": "String /*Default null*/"Event Details}Event Details{"Type": " eventSource ","Assurance Issue Details": "Switch deviceName Interface interfaceName is flapping","Assurance Issue Priority": " priority ","Device": " eventUniqueId ","Assurance Issue Name": "Interface interfaceName is Flapping on Network Device entityId ","Assurance Issue Category": " category ","Assurance Issue Status": " status "}

Sample Response payloadEvent HeaderEvent Details

Event Notifications e11111Cisco DNA CenterPlatformDestinationSettingsCisco DNA CenterEvents Catalog UIEvent SettingsAPICisco DNAAssurance,Automation&System IssuesWebhooksEmailExternalIntegrations(ITSM)Issue detailsClient detailsDevice detailsIssue attributeupdates (such asstatus or severity)

Bulk Data Export

Cisco DNA Assurance Objects (Data Sets)Bulk Data Extract - WorkflowReporting ToolRemote Host/NFSNetworkInfrastructureDeviceDNA ReportsData LakeClientApplicationIssuesCisco DNAAssurance DataStoresScheduleFiltersCollectGenerate& NotifyExportPurge Data collected, sorted and made available based on scheduling Data filtering capability for all data sets Data export formats includes JSON, Tableau TDE data file, CSVfile, etc.

Bulk Data Extract – How-to?

Bulk Data Extract – How-to?Select Report ScopeSelect File TypeReport ScheduleNotification Method

Bulk Data Extract – Webhook payload{"Event Id": "bc736b16-70eb-44e2-8459-dba4ec84a1e3","Event Timestamp": 1600306311512,"Event Name": "Report [Access Point Report - AP - Sep 16 2020 at 06 30 pm] - Success","Event Type": "APP","Cisco DNA Center Event Context link. **This link is active only in the context of CiscoDNA Center. You must have necessary permissions to login": "https://172.28.97.216/datasets-reports?report-tab list&list-tab my-reports&data-set-id 2566c7e0-8edf-4798-b898632730226152&execution-id 523ec3ba-5295-41f6-b0dc-d29a61b3eb13","Event Details": {"name": "Report [Access Point Report - AP - Sep 16 2020 at 06 30 pm]","status": "Success","status update @": "Thu Sep 17 01:31:51 UTC 2020"}}

Resources

Cisco DNA Center Platform Portalhttps://developer.cisco.com/dnacenter/

Resources - Developer #!api-quick-start

Resources - Python SDK & Sample hub.com/cisco-en-programmability

Code latforms/dnac/

Principal Engineer, Technical Marketing, Cisco Systems Saurav has been with the Cisco DNA Center technical marketing team for the last 4 years. His focus area has been programmability and integrations. He has co-authored couple of books on Cisco Software-Defined Access and Cisco DNA Assurance. Saurav is a Cisco Live Distinguished Speaker.