SlideShare a Scribd company logo
DevNet @
DevNet @
API Deep Dive: APIC EM Rest API
DevNet-1007
Adam Radford – Distinguished Systems Engineer
© 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @
Agenda
• Introduction
• Quick Tour
• Use cases
© 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @
Common Policy will Drive End-to-End Solutions
4
Consistent Policy Across Cloud, DC, WAN and Access
Cloud Data Center WAN Access
Application Network Profile
SLA, Security, QoS, Load Balancing
User/Things Network Profile
QoS, Security, SLA, Device
APIC APICAPIC APIC
© 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @
Introducing Cisco APIC Enterprise Module
Advanced Visualization
for low risk SDN adoption
Elastic Services
for scalability &
HA
Existing & New Installations
Catalyst, ISR, ASR
Agile
Integration Model
Network Abstraction and Automation
APIC
Masking Network Complexity, Exposing Network Intelligence.
© 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @
Cisco APIC Enterprise Module Architecture
Abstracts Network Devices to Mask Complexity
Treat Network as a System
Exposes Network Intelligence
For Business Innovation
Cisco APIC Enterprise Module
Cisco and Third Party Applications
Network Devices
Catalyst, ASR, ISR
Network Info
Database
Policy
Infrastructure
Automation
REST API
Southbound Interface: CLI
Security QoS IWAN Network PnP
© 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @
APIC-EM: Services Layered View
NB REST API
Pxgrid Client +
LDAP client
Radius Proxy +
LDAP client
Inventory
Topology
Policy Analysis
PnP
Network
Discovery
Network
Programmer
Policy
Programmer
(QoS, ACL)
Network
Tapping
Easy QoS
Network Events
Policy Manager
Conflict Detection and
Resolution
(BI and NI)
Business Intent to
Network Intent
Conversion
NETWORK
MODEL
DEVICE
MODEL
DEVICE
INTERFACE
Application
Visibility
PfR
APIC-EMServicesAPIC-EMApps
IWAN Services
APIC-EM Services
IWAN Services
Basic Services for Controller Availability
Inventory
Visualizer
Topology
Visualizer
Application
Visualizer
Discovery
Easy QoS
Visualizer
Compliance
Check
ACL
Visualizer
Network PnP
Network
Tapping
Visualizer
Policy
Manager
DevNet @
Quick Tour APIC-EM API
© 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @
RESTful services exposed
© 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @
Understanding the tables
{"id": "7895a45f-47aa-42ee-9d06-c66d3b784594",
"hostname": "SDN-BRANCH-3750-STACK",
"managementIpAddress": "40.0.2.18",
"macAddress": "1C:DF:0F:08:20:C2",
"type": "SWITCH",
"vendor": "Cisco",
"family": "C3750X",
"serialNumber": "FDO1432K0MC",
"platformId": "WS-C3750X-48P",
"softwareVersion": "15.2(1)E2",
"imageName": "c3750e-universalk9-mz.152-1.E2.bin",
"upTime": "26 weeks, 3 hours, 8 minutes",
"memorySize": "262144K",
"interfaceCount": "109",
"role": "Access",
"roleSource": "auto",
"lineCardCount": "5",
"lineCardId": "3220b22a-a74c-4f9e-9898-
c9afc01dc5dd,9ef0da99-963c-4289-9087-7f861c969ea3,e5b911e4-
2c1c-4a95-9214-dd9877dd2b92,f5996432-3c89-4045-ac8b-
46a6bf873845",
"lastUpdated": "2014-09-29 16:19:17.627273-07",
"portRange": "FastEthernet0, Vlan1, GigabitEthernet1/0/1-48,
GigabitEthernet1/1/1-4, GigabitEthernet2/0/1-48,
GigabitEthernet2/1/1-4, TenGigabitEthernet1/1/1-2,
TenGigabitEthernet2/1/1-2",
"avgUpdateFrequency": 300,
"numUpdates": 30,
"reachabilityStatus": "In Progress",
"reachabilityFailureReason": "Unreachable"
}, Cisco Confidential
{
"id": "8f41bef8-698c-4701-af14-471e910ed9ff",
"hostMac": "00:50:56:8A:27:A3",
"hostIp": "40.0.5.12",
"hostType": "WIRED",
"connectedNetworkDeviceId": "7895a45f-47aa-42ee-9d06-
c66d3b784594",
"connectedNetworkDeviceIpAddress": "40.0.2.18",
"connectedInterfaceId": "30bb14c1-8fb6-45c4-8f6d-5b845a7f448c",
"connectedInterfaceName": "GigabitEthernet2/0/2",
"vlanId": "1",
"lastUpdated": "September 29, 2014 1:54:13 PM PDT",
"numUpdates": 1,
"userStatus": "Active",
"source": 200
},
$python host.py | sort
© 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @
Understanding topology
• Nodes
Cisco Confidential
"deviceType": "SWITCH",
"label": "SDN-BRANCH-3750-STACK",
"id": "7895a45f-47aa-42ee-9d06-c66d3b784594",  /network-device
"nodeType": "device",
"deviceType": "WIRED",
"label": "40.0.5.12",
"id": "8f41bef8-698c-4701-af14-471e910ed9ff",  /host
"nodeType": "host",
"source": "7895a45f-47aa-42ee-9d06-c66d3b784594",
"startPortID": "30bb14c1-8fb6-45c4-8f6d-5b845a7f448c",
"target": "8f41bef8-698c-4701-af14-471e910ed9ff",
"endPortID": "",
"linkStatus": "UP"
• Links
https://test-apic/api/v0/topology/physical-topology
© 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @
/acl/trace
/routing-path
/application /qos
App -> Class -> Mapping (cvd)
Queuing on interfaces
Bandwidth allocation to classes
QoS Marking
/policy
/network-
device/{tags}
/host
/user
ACL
QoS Marking
Traffic Redirection
Path verification
ACL -> App mapping
REST API Structure - Policy
12
© 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @
Policy Construct
DevNet @
API Use cases
© 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @
Three Classes of Use Case
Cisco Confidential
NetOps Net Integration Net Innovation
"HOW" to "WHAT"
Cultural change: "TEST and VERIFY"  "TRUST"
© 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @
Tags - Adding
https://test-apic/api/v0/network-device/tag POST
{"networkDeviceId" : "7895a45f-47aa-42ee-9d06-c66d3b784594", "tag" :
"branch"}
© 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @
Automating Tagging..
$ ./tag_device.py BRANCH +branch
Adding tag: branch to device SDN-BRANCH-3750-STACK(7895a45f-47aa-42ee-9d06-c66d3b784594)
202
TAGGED {u'url': u'/api/v0/task/3e934c30-43f1-4157-b4e8-a4291ba6c198', u'taskId':
u'3e934c30-43f1-4157-b4e8-a4291ba6c198'}
Adding tag: branch to device SDN-BRANCH-3850-TB1(526c8fc6-f732-41a9-9faf-5876293a2e8c)
202
TAGGED {u'url': u'/api/v0/task/3714ef69-11ef-411b-945f-db52bba47db0', u'taskId':
u'3714ef69-11ef-411b-945f-db52bba47db0'}
Adding tag: branch to device SDN-BRANCH-ASR1002(cceaf2fe-c3d9-4d37-bf14-fba071c27d6e)
202
TAGGED {u'url': u'/api/v0/task/8c85d4cf-6bc7-40b8-8616-938af7a446b1', u'taskId':
u'8c85d4cf-6bc7-40b8-8616-938af7a446b1'}
Adding tag: branch to device SDN-BRANCH-C4K(a36bc35a-94ed-4b2c-a66c-e46dddd5e037)
202
TAGGED {u'url': u'/api/v0/task/dfa84ff2-d92a-4fea-9e7a-707bf3d18cb1', u'taskId':
u'dfa84ff2-d92a-4fea-9e7a-707bf3d18cb1'}
© 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @
IPAM - All Subnets
{
"id": "5bcc0bc0-c7bd-458d-9ad6-b606970017cf",
"deviceId": "526c8fc6-f732-41a9-9faf-5876293a2e8c",
"interfaceType": "Physical",
"portName": "GigabitEthernet1/0/5",
"portType": "Gigabit Ethernet",
"portMode": "routed",
"connectorType": "RJ-45",
"macAddress": "18:9C:5D:16:FC:E4",
"ipv4Address": "40.0.3.1",
"ipv4Mask": "30",
"serialNo": "FOC1743X0CJ",
"pid": "WS-C3850-48P",
"status": "down",
"vendor": "Cisco",
"lastUpdated": "2014-09-29 16:17:14.995619-07",
"duplex": false,
"avgUpdateFrequency": 180,
"numUpdates": 49,
"speed": 1000000
}
{
"id": "2fdb927f-a5a7-47b2-bbed-8499c1c12105",
"deviceId": "526c8fc6-f732-41a9-9faf-5876293a2e8c",
"interfaceType": "Physical",
"portName": "GigabitEthernet1/0/4",
"portType": "Gigabit Ethernet",
"portMode": "routed",
"connectorType": "RJ-45",
"macAddress": "18:9C:5D:16:FC:F6",
"ipv4Address": "40.0.2.5",
"ipv4Mask": "30",
"serialNo": "FOC1743X0CJ",
"pid": "WS-C3850-48P",
"status": "up",
"vendor": "Cisco",
"connectedNeighbor": "a632c6e8-89bf-4949-8e4d-a249105f2c7c",
"lastUpdated": "2014-09-29 16:17:14.980705-07",
"connectedNeighborType": "Network_Device",
"ospfSupport": true,
"duplex": true,
"avgUpdateFrequency": 180,
"numUpdates": 49,
"speed": 1000000
}
https://test-apic/api/v0/interface GET
$python all-interfaces.py | sort
© 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @
Netops
• Previous examples
– Access to datastore
– Find/filter/report etc
• routing-path  similar to topology
– /routing-path/{src}/{dst}
– /routing-path/40.0.0.15/40.0.5.12
Cisco Confidential
© 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @
Path has nodes and links
"nodes": [
{
"deviceType": "WIRED",
"label": "40.0.0.15",
"id": "51a75ce9-d5c9-4fe2-95a0-6fc01410e201",
"nodeType": "host"
},{
"deviceType": "SWITCH",
"label": "SDN-CAMPUS-C3850",
"id": "f8c3fc68-cd26-4576-bcec-51f9b578f71e",
"nodeType": "device",
}
........
Some nodes removed
...........
{
"deviceType": "SWITCH",
"label": "SDN-BRANCH-3750-STACK",
"id": "7895a45f-47aa-42ee-9d06-c66d3b784594",
"nodeType": "device",
},
{
"deviceType": "WIRED",
"label": "40.0.5.12",
"id": "8f41bef8-698c-4701-af14-471e910ed9ff",
"nodeType": "host"
}
* NOTE: Some attributed removed
Cisco Confidential
"links":{
"source": "51a75ce9-d5c9-4fe2-95a0-6fc01410e201",
"startPortID": "",
"target": "f8c3fc68-cd26-4576-bcec-51f9b578f71e",
"endPortID": "16e94527-33fd-4968-a0d7-0f7265b72904",
"linkStatus": "UP"
}, {
"id": "459d7b7b-01c3-449a-841d-489e0250b8da",
"source": "f8c3fc68-cd26-4576-bcec-51f9b578f71e",
"startPortID": "0e841ab3-6192-4514-9736-d3ef63ed67f5",
"target": "e5f93514-3ae5-4109-8b52-b9fa876e1eae",
"endPortID": "02b1a0a6-3772-4b71-b2da-6d7cd87a5ec2",
"linkStatus": "UP"
},
….... …………
Some nodes removed
……………………….
{
"source": "7895a45f-47aa-42ee-9d06-c66d3b784594",
"startPortID": "30bb14c1-8fb6-45c4-8f6d-5b845a7f448c",
"target": "8f41bef8-698c-4701-af14-471e910ed9ff",
"endPortID": "",
"linkStatus": "UP"
}
$python show-path.py
© 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @
Netops
ACL
– Get ACL for a Device
https://test-apic/api/v0/acl/device/cceaf2fe-c3d9-4d37-bf14-fba071c27d6e
– Get ACL for Interface GigabitEthernet0/0/0
https://test-apic/api/v0/acl/interface/ad8c543b-c698-468b-bb64-e0a418d6c517
• Check for consistency of an ACL
https://test-apic/api/v0/acl/conflict/dea7a366-4cdd-4006-ad51-27f0a0b2fb40
Cisco Confidential
$python check-acl.py
© 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @
Combine PATH with ACL
https://test-apic/api/v0/acl/trace POST
{
"destIp": "40.0.0.15",
"sourceIp": "40.0.0.12",
"applicationId": "46de799b-7f51-4a5e-8d08-46e2e78ff619",
"interfaceIds": [
"",
"16e94527-33fd-4968-a0d7-0f7265b72904",
"4556c2eb-0df4-41b3-8558-05f04be02fe0",
"" ]
}
Cisco Confidential
$python show-path-acl.pyContent-Type = application/json
© 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @
Combine PATH with ACL
https://test-apic/api/v0/acl/trace POST
{
"destIp": "40.0.0.15",
"sourceIp": "40.0.5.12",
"applicationId": "46de799b-7f51-4a5e-8d08-46e2e78ff619",
"interfaceIds": ["",
"16e94527-33fd-4968-a0d7-0f7265b72904",
"0e841ab3-6192-4514-9736-d3ef63ed67f5",
"02b1a0a6-3772-4b71-b2da-6d7cd87a5ec2",
"54683dd7-1c17-41f6-b7ac-47935d20fe3f",
"a8c71f5e-dd31-457f-8160-556b91dd6320",
"87bb850b-6223-4540-8729-ff4c276097ea",
"82481ce8-fe7b-493f-9ca1-0390bfa71be0",
"ad8c543b-c698-468b-bb64-e0a418d6c517",
"c4a8fe79-fa1b-4349-ac37-90146554f0ff",
"2fdb927f-a5a7-47b2-bbed-8499c1c12105",
"d3054716-73ed-4a6c-89c9-095ebe7f3445",
"42a5e927-1ed6-4483-bd66-555d9d6d2f89",
"86ff5af0-4c5a-46e1-9edb-8aa3df5e9d95",
"30bb14c1-8fb6-45c4-8f6d-5b845a7f448c",""]
}
Cisco Confidential
$python show-path-acl.pyContent-Type = application/json
© 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @
Result:
"devices": [ {
"deviceName": "SDN-CAMPUS-C3850",
"deviceId": "f8c3fc68-cd26-4576-bcec-51f9b578f71e",
"deviceType": "SWITCH",
"deviceRole": "Access",
"deviceIp": "40.0.0.3",
"interfaces": [{
"interfaceName": "GigabitEthernet1/0/12",
"interfaceId": "16e94527-33fd-4968-a0d7-0f7265b72904",
"aclName": null,
"aclId": null,
"ingress": true,
"blockType": "none",
"relevantAces": [],
"implicitDenies": []
},{
"interfaceName": "GigabitEthernet1/0/1",
"interfaceId": "0e841ab3-6192-4514-9736-d3ef63ed67f5",
"aclName": null,
"aclId": null,
"ingress": false,
"blockType": "none",
"relevantAces": [],
"implicitDenies": []
}]
},
{ "interfaceName": "GigabitEthernet0/0/0",
"interfaceId": "ad8c543b-c698-468b-bb64-e0a418d6c517",
"aclName": "one_big_acl_for_conflict",
"aclId": "dea7a366-4cdd-4006-ad51-27f0a0b2fb40",
"ingress": false,
"blockType": "complete",
"relevantAces": [{
"aceIndex": 10,
"ace": {
"id": "f175c041-da1f-46cd-b9a6-0a4df6b5e15c",
"aclId": "dea7a366-4cdd-4006-ad51-27f0a0b2fb40",
"priority": 100, "action": "DENY", "protocol": "TCP",
"srcAddr": null,"srcAddrMask": "32",
"srcPort": 0,
"srcPortUpper": 0,
"destAddr": null, "destAddrMask": "32",
"destPort": 458,
"destPortUpper": 458,
"dscp": 0,
"attributeInfo": {}
},
"sourcePortInfoList": [],
"destPortInfoList": [
{
"protocol": "tcp",
"ports": "458"
} ]},
© 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @
Applications
{
"id": "46de799b-7f51-4a5e-8d08-46e2e78ff619",
"applicationGroup": "other",
"category": "voice-and-video",
"subCategory": "consumer-video-streaming",
"encrypted": "false",
"p2pTechnology": "false",
"tunnel": "false",
"name": "appleqtc",
"enabled": "true",
"nbarId": "92",
"engineId": "3",
"globalId": "L4:458",
"selectorId": "458",
"helpString": "apple quick time",
"longDescription": "Apple QuickTime is an extensible proprietary multimedia framework developed by Apple Inc.,
capable of handling various formats of digital video, picture, sound, panoramic images, and interactivity.
QuickTime is available for Windows XP and later, as well as Mac OS X Leopard and later operating systems.",
"appProtocol": "tcp/udp",
"tcpPorts": "458",
"udpPorts": "458",
"references": "http://www.apple.com/quicktime/",
"url": "",
"valid": true
}
© 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @
Reference
© 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @
Integration(s)
• Collaboration – Phase 1 – (lower trust threshold)
Marking -> voice clients
E.g. UCM, Citrix
• Security – Phase 2 – (higher trust threshold)
Copy --- lower
Deny – higher (e.g. SourceFire)
Cisco Confidential
© 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @
Policy based QoS
https://test-apic/api/v0/policy POST
{
"policyOwner": "Admin",
"networkUser": {"userIdentifiers":["40.0.0.15"],"applications":[{"raw": "12340;UDP"}]},
"actionProperty": {"priorityLevel": "46"},
"actions": [ "PERMIT"],
"policyName": "voice:audio:40.0.0.15"
}
Cisco Confidential
$python set-qos.py < qos-input-small.txt
{
"response": {
"taskId": "f5c07be7-ae8e-4350-80b0-1971874803c8",
"url": "/api/v0/task/f5c07be7-ae8e-4350-80b0-1971874803c8"
},
"version": "0.0"
}
© 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @
Task for Policy creation - success
https://adam-gv/api/v0/task/4bd6767d-b332-4d20-b689-05473833e0c8 GET
{
"response": {
"id": "4bd6767d-b332-4d20-b689-05473833e0c8",
"rootId": "4bd6767d-b332-4d20-b689-05473833e0c8",
"serviceType": "Policy Service",
"progress": "767952d1-e5b5-4c9f-bcca-02e3e6515210",
"startTime": 1409885977316,
"endTime": 1409885985944
},
"version": "0.0"
}
© 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @
Task for Policy creation - failure
https://test-apic/api/v0/task/f5c07be7-ae8e-4350-80b0-1971874803c8 GET
"response": {
"id": "f5c07be7-ae8e-4350-80b0-1971874803c8",
"rootId": "f5c07be7-ae8e-4350-80b0-1971874803c8",
"serviceType": "Policy Service",
"progress": "Policy Creation Failed",
"errorCode": "PartialSuccess",
"failureReason": "04ea2f11-1e9d-435a-9db2-ded3fbcd732f: Inactive Policy - Interfaces
where this policy needs to be programmed are not within the same policy scope. Hence skipping
policy creation for this policy.",
"isError": true,
"startTime": 1412425907975,
"endTime": 1412425910331
},
© 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @
Policy for Security
https://test-apic/api/v0/policy POST
{
"policyName": "deny_some",
"policyOwner": "Admin",
"actions": ["DENY"],
"networkUser": {"userIdentifiers": ["40.0.0.15"]},
"resource": {"userIdentifiers": ["10.10.20.3"], "applications":[{"raw":
"81;TCP"}]}
}
Cisco Confidential
Sourcefire use case.
<<<<<THIS CAN BE DANGEROUS IN A SHARED LAB>>>>
Remove "resource" components (10.10.4.2)
1) deny tcp host 40.0.0.15 host 10.10.20.3 eq 81
2) deny tcp host 40.0.0.15 any eq 81
3) deny ip host 40.0.0.15 any
© 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @
For more information…
• SDN BOF 1:30PM classroom
• Other Sessions
– DevNet-1044 – Create Hello World with APIC-EM
Thank you.
DevNet @
Join us on DevNet at developer.cisco.com
Follow DevNet on Twitter: @ciscodevnet
API Deep Dive: APIC EM Rest API

More Related Content

What's hot (20)

PDF
CCIE Service Provider
Cisco Canada
 
PPTX
Getting Started: Developing Tropo Applications
Cisco DevNet
 
PPTX
WAN Automation Engine API Deep Dive
Cisco DevNet
 
PDF
TechWiseTV Workshop: Catalyst Switching Programmability
Robb Boyd
 
PDF
Ocs F5 Bigip Bestpractices
Thiago Gutierri
 
PDF
Cloud and On Premises Collaboration Security Explained
Cisco Canada
 
PPTX
Rome 2017: Building advanced voice assistants and chat bots
Cisco DevNet
 
PPTX
Cisco's Open Device Programmability Strategy: Open Discussion
Cisco DevNet
 
PPTX
Cisco Spark & Tropo API Workshop
Cisco DevNet
 
PDF
NSO: Network Service Orchestrator enabled by Tail-f Hands-on Lab
Cisco Canada
 
PDF
Cisco Intelligent Branch - Enabling the Next Generation Branch
Cisco Canada
 
PDF
Network Function Virtualization (NFV) using IOS-XR
Cisco Canada
 
PDF
Cisco Managed Private Cloud in Your Data Center: Public cloud experience on ...
Cisco DevNet
 
PPTX
How to Build Advanced Voice Assistants and Chatbots
Cisco DevNet
 
PDF
Cisco Connect Toronto 2017 - Optimizing your client's Wi-Fi Experience
Cisco Canada
 
PPTX
ACI Hands-on Lab
Cisco Canada
 
PDF
Rap installation updated
Aruba, a Hewlett Packard Enterprise company
 
PPTX
Sem cis collab
Lino Quivén
 
PPTX
Creating Complete Test Environments in the Cloud
Erika Barron
 
PDF
Meraki Cloud Networking Workshop
Cisco Canada
 
CCIE Service Provider
Cisco Canada
 
Getting Started: Developing Tropo Applications
Cisco DevNet
 
WAN Automation Engine API Deep Dive
Cisco DevNet
 
TechWiseTV Workshop: Catalyst Switching Programmability
Robb Boyd
 
Ocs F5 Bigip Bestpractices
Thiago Gutierri
 
Cloud and On Premises Collaboration Security Explained
Cisco Canada
 
Rome 2017: Building advanced voice assistants and chat bots
Cisco DevNet
 
Cisco's Open Device Programmability Strategy: Open Discussion
Cisco DevNet
 
Cisco Spark & Tropo API Workshop
Cisco DevNet
 
NSO: Network Service Orchestrator enabled by Tail-f Hands-on Lab
Cisco Canada
 
Cisco Intelligent Branch - Enabling the Next Generation Branch
Cisco Canada
 
Network Function Virtualization (NFV) using IOS-XR
Cisco Canada
 
Cisco Managed Private Cloud in Your Data Center: Public cloud experience on ...
Cisco DevNet
 
How to Build Advanced Voice Assistants and Chatbots
Cisco DevNet
 
Cisco Connect Toronto 2017 - Optimizing your client's Wi-Fi Experience
Cisco Canada
 
ACI Hands-on Lab
Cisco Canada
 
Sem cis collab
Lino Quivén
 
Creating Complete Test Environments in the Cloud
Erika Barron
 
Meraki Cloud Networking Workshop
Cisco Canada
 

Viewers also liked (18)

PDF
SDN in the Enterprise: APIC Enterprise Module
Cisco Canada
 
PDF
Cisco Application Policy Infrastructure Controller Enterprise Module (APIC-EM...
Cisco Canada
 
PDF
Reducing Cost with DNA Automation
Cisco Canada
 
PPT
Location Day Hackathon Dec 6 2013 Final
Lars Lundqvist
 
PPTX
Link_NwkingforDevOps
Vikas Deolaliker
 
PPT
Dynamic Data Centers - Taking it to the next level
sanvmibj
 
PDF
API イントロダクション APIC-EM, Prime Infrastructure & CMX
npsg
 
PDF
Cisco IWAN – Intelligent Connectivity for Today’s Reality
Cisco Canada
 
PDF
SDN in the Enterprise
Cisco Canada
 
PDF
Cisco Intelligent WAN (IWAN) Solution
Cisco Russia
 
PDF
Amplify Hybrid WAN ROI with SD-WAN - VeloCloud
VeloCloud Networks, Inc.
 
PDF
Gotomeeting vs Webex: Comprehensive Analysis
georgesmith_omr
 
PDF
Application Centric Infrastructure (ACI), the policy driven data centre
Cisco Canada
 
PDF
Cisco Data Center Orchestration Solution
Cisco Canada
 
PPTX
TechWiseTV Workshop: APIC-EM
Robb Boyd
 
PPTX
Vxlan control plane and routing
Wilfredzeng
 
PDF
Verizon Managed SD-WAN with Cisco IWAN
Cisco Enterprise Networks
 
PDF
Enterprise WAN Evolution with SD-WAN
Toshal Dudhwala
 
SDN in the Enterprise: APIC Enterprise Module
Cisco Canada
 
Cisco Application Policy Infrastructure Controller Enterprise Module (APIC-EM...
Cisco Canada
 
Reducing Cost with DNA Automation
Cisco Canada
 
Location Day Hackathon Dec 6 2013 Final
Lars Lundqvist
 
Link_NwkingforDevOps
Vikas Deolaliker
 
Dynamic Data Centers - Taking it to the next level
sanvmibj
 
API イントロダクション APIC-EM, Prime Infrastructure & CMX
npsg
 
Cisco IWAN – Intelligent Connectivity for Today’s Reality
Cisco Canada
 
SDN in the Enterprise
Cisco Canada
 
Cisco Intelligent WAN (IWAN) Solution
Cisco Russia
 
Amplify Hybrid WAN ROI with SD-WAN - VeloCloud
VeloCloud Networks, Inc.
 
Gotomeeting vs Webex: Comprehensive Analysis
georgesmith_omr
 
Application Centric Infrastructure (ACI), the policy driven data centre
Cisco Canada
 
Cisco Data Center Orchestration Solution
Cisco Canada
 
TechWiseTV Workshop: APIC-EM
Robb Boyd
 
Vxlan control plane and routing
Wilfredzeng
 
Verizon Managed SD-WAN with Cisco IWAN
Cisco Enterprise Networks
 
Enterprise WAN Evolution with SD-WAN
Toshal Dudhwala
 
Ad

Similar to API Deep Dive: APIC EM Rest API (20)

PPTX
DevNet Express - Spark & Tropo API - Lisbon May 2016
Cisco DevNet
 
PPTX
How APIs are Transforming Cisco Solutions and Catalyzing an Innovation Ecosystem
Cisco DevNet
 
PDF
Cisco connect winnipeg 2018 unlocking business value with network programma...
Cisco Canada
 
PDF
Brkaci 1002
ccherel
 
PDF
Why Automate the Network?
Hank Preston
 
PPTX
Enterprise Application to Infrastructure Integration -- SDN Apps
Cisco DevNet
 
PPTX
[Cisco Connect 2018 - Vietnam] Cisco connect 2018 sanjay - cisco sda v1.0-h...
Nur Shiqim Chok
 
PDF
Cisco Connect 2018 Malaysia - SDNNFV telco data center transformation
NetworkCollaborators
 
PPTX
Cisco APIs: An Interactive Assistant for the Web2Day Developer Conference
Cisco DevNet
 
PPTX
Cisco Connect 2018 Indonesia - software-defined access-a transformational ap...
NetworkCollaborators
 
PDF
Cisco Connect Toronto 2018 DevNet Overview
Cisco Canada
 
PPTX
Aci programmability
Cisco DevNet
 
PDF
Introduction to ACI APIs
Cisco DevNet
 
PDF
How Cisco Provides World-Class Technology Conference Experiences Using Automa...
InfluxData
 
PDF
Next Generation Campus Switching: Are You Ready
Cisco Canada
 
PDF
Cisco Digital Network Architecture Deeper Dive From The Gates To The Gui
Cisco Canada
 
PDF
Cisco Digital Network Architecture – Deeper Dive, “From the Gates to the GUI
Cisco Canada
 
PDF
DEVNET-1155 Branch Virtualization
Cisco DevNet
 
PDF
Introduction to SDN and Network Programmability - BRKRST-1014 | 2017/Las Vegas
Bruno Teixeira
 
PDF
Cisco Connect 2018 Singapore - Cisco Software Defined Access
NetworkCollaborators
 
DevNet Express - Spark & Tropo API - Lisbon May 2016
Cisco DevNet
 
How APIs are Transforming Cisco Solutions and Catalyzing an Innovation Ecosystem
Cisco DevNet
 
Cisco connect winnipeg 2018 unlocking business value with network programma...
Cisco Canada
 
Brkaci 1002
ccherel
 
Why Automate the Network?
Hank Preston
 
Enterprise Application to Infrastructure Integration -- SDN Apps
Cisco DevNet
 
[Cisco Connect 2018 - Vietnam] Cisco connect 2018 sanjay - cisco sda v1.0-h...
Nur Shiqim Chok
 
Cisco Connect 2018 Malaysia - SDNNFV telco data center transformation
NetworkCollaborators
 
Cisco APIs: An Interactive Assistant for the Web2Day Developer Conference
Cisco DevNet
 
Cisco Connect 2018 Indonesia - software-defined access-a transformational ap...
NetworkCollaborators
 
Cisco Connect Toronto 2018 DevNet Overview
Cisco Canada
 
Aci programmability
Cisco DevNet
 
Introduction to ACI APIs
Cisco DevNet
 
How Cisco Provides World-Class Technology Conference Experiences Using Automa...
InfluxData
 
Next Generation Campus Switching: Are You Ready
Cisco Canada
 
Cisco Digital Network Architecture Deeper Dive From The Gates To The Gui
Cisco Canada
 
Cisco Digital Network Architecture – Deeper Dive, “From the Gates to the GUI
Cisco Canada
 
DEVNET-1155 Branch Virtualization
Cisco DevNet
 
Introduction to SDN and Network Programmability - BRKRST-1014 | 2017/Las Vegas
Bruno Teixeira
 
Cisco Connect 2018 Singapore - Cisco Software Defined Access
NetworkCollaborators
 
Ad

More from Cisco DevNet (18)

PPTX
How to Contribute to Ansible
Cisco DevNet
 
PPTX
Cisco Spark and Tropo and the Programmable Web
Cisco DevNet
 
PPTX
Device Programmability with Cisco Plug-n-Play Solution
Cisco DevNet
 
PPTX
Application Visibility and Experience through Flexible Netflow
Cisco DevNet
 
PPTX
Open Device Programmability: Hands-on Intro to RESTCONF (and a bit of NETCONF)
Cisco DevNet
 
PPTX
NETCONF & YANG Enablement of Network Devices
Cisco DevNet
 
PPTX
OpenStack Enabling DevOps
Cisco DevNet
 
PPTX
NetDevOps for the Network Dude: How to get started with API's, Ansible and Py...
Cisco DevNet
 
PPTX
Coding 102 REST API Basics Using Spark
Cisco DevNet
 
PPTX
DevNet @TAG - Spark & Tropo APIs - Milan/Rome May 2016
Cisco DevNet
 
PDF
Choosing PaaS: Cisco and Open Source Options: an overview
Cisco DevNet
 
PDF
Doing Business with Tropo
Cisco DevNet
 
PDF
Introduction to the DevNet Sandbox and IVT
Cisco DevNet
 
PDF
Introduction to Fog
Cisco DevNet
 
PDF
CSTA - Cisco Security Technical Alliances, New Ecosystem Program Built on the...
Cisco DevNet
 
PDF
Flare: an overview
Cisco DevNet
 
PDF
Enabling Fast IT using Containers, Microservices and DAVROS models: an overview
Cisco DevNet
 
PDF
Starting the DevOps Train
Cisco DevNet
 
How to Contribute to Ansible
Cisco DevNet
 
Cisco Spark and Tropo and the Programmable Web
Cisco DevNet
 
Device Programmability with Cisco Plug-n-Play Solution
Cisco DevNet
 
Application Visibility and Experience through Flexible Netflow
Cisco DevNet
 
Open Device Programmability: Hands-on Intro to RESTCONF (and a bit of NETCONF)
Cisco DevNet
 
NETCONF & YANG Enablement of Network Devices
Cisco DevNet
 
OpenStack Enabling DevOps
Cisco DevNet
 
NetDevOps for the Network Dude: How to get started with API's, Ansible and Py...
Cisco DevNet
 
Coding 102 REST API Basics Using Spark
Cisco DevNet
 
DevNet @TAG - Spark & Tropo APIs - Milan/Rome May 2016
Cisco DevNet
 
Choosing PaaS: Cisco and Open Source Options: an overview
Cisco DevNet
 
Doing Business with Tropo
Cisco DevNet
 
Introduction to the DevNet Sandbox and IVT
Cisco DevNet
 
Introduction to Fog
Cisco DevNet
 
CSTA - Cisco Security Technical Alliances, New Ecosystem Program Built on the...
Cisco DevNet
 
Flare: an overview
Cisco DevNet
 
Enabling Fast IT using Containers, Microservices and DAVROS models: an overview
Cisco DevNet
 
Starting the DevOps Train
Cisco DevNet
 

Recently uploaded (20)

PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
July Patch Tuesday
Ivanti
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PDF
Advancing WebDriver BiDi support in WebKit
Igalia
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
July Patch Tuesday
Ivanti
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
Advancing WebDriver BiDi support in WebKit
Igalia
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
Biography of Daniel Podor.pdf
Daniel Podor
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 

API Deep Dive: APIC EM Rest API

  • 2. DevNet @ API Deep Dive: APIC EM Rest API DevNet-1007 Adam Radford – Distinguished Systems Engineer
  • 3. © 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @ Agenda • Introduction • Quick Tour • Use cases
  • 4. © 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @ Common Policy will Drive End-to-End Solutions 4 Consistent Policy Across Cloud, DC, WAN and Access Cloud Data Center WAN Access Application Network Profile SLA, Security, QoS, Load Balancing User/Things Network Profile QoS, Security, SLA, Device APIC APICAPIC APIC
  • 5. © 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @ Introducing Cisco APIC Enterprise Module Advanced Visualization for low risk SDN adoption Elastic Services for scalability & HA Existing & New Installations Catalyst, ISR, ASR Agile Integration Model Network Abstraction and Automation APIC Masking Network Complexity, Exposing Network Intelligence.
  • 6. © 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @ Cisco APIC Enterprise Module Architecture Abstracts Network Devices to Mask Complexity Treat Network as a System Exposes Network Intelligence For Business Innovation Cisco APIC Enterprise Module Cisco and Third Party Applications Network Devices Catalyst, ASR, ISR Network Info Database Policy Infrastructure Automation REST API Southbound Interface: CLI Security QoS IWAN Network PnP
  • 7. © 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @ APIC-EM: Services Layered View NB REST API Pxgrid Client + LDAP client Radius Proxy + LDAP client Inventory Topology Policy Analysis PnP Network Discovery Network Programmer Policy Programmer (QoS, ACL) Network Tapping Easy QoS Network Events Policy Manager Conflict Detection and Resolution (BI and NI) Business Intent to Network Intent Conversion NETWORK MODEL DEVICE MODEL DEVICE INTERFACE Application Visibility PfR APIC-EMServicesAPIC-EMApps IWAN Services APIC-EM Services IWAN Services Basic Services for Controller Availability Inventory Visualizer Topology Visualizer Application Visualizer Discovery Easy QoS Visualizer Compliance Check ACL Visualizer Network PnP Network Tapping Visualizer Policy Manager
  • 8. DevNet @ Quick Tour APIC-EM API
  • 9. © 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @ RESTful services exposed
  • 10. © 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @ Understanding the tables {"id": "7895a45f-47aa-42ee-9d06-c66d3b784594", "hostname": "SDN-BRANCH-3750-STACK", "managementIpAddress": "40.0.2.18", "macAddress": "1C:DF:0F:08:20:C2", "type": "SWITCH", "vendor": "Cisco", "family": "C3750X", "serialNumber": "FDO1432K0MC", "platformId": "WS-C3750X-48P", "softwareVersion": "15.2(1)E2", "imageName": "c3750e-universalk9-mz.152-1.E2.bin", "upTime": "26 weeks, 3 hours, 8 minutes", "memorySize": "262144K", "interfaceCount": "109", "role": "Access", "roleSource": "auto", "lineCardCount": "5", "lineCardId": "3220b22a-a74c-4f9e-9898- c9afc01dc5dd,9ef0da99-963c-4289-9087-7f861c969ea3,e5b911e4- 2c1c-4a95-9214-dd9877dd2b92,f5996432-3c89-4045-ac8b- 46a6bf873845", "lastUpdated": "2014-09-29 16:19:17.627273-07", "portRange": "FastEthernet0, Vlan1, GigabitEthernet1/0/1-48, GigabitEthernet1/1/1-4, GigabitEthernet2/0/1-48, GigabitEthernet2/1/1-4, TenGigabitEthernet1/1/1-2, TenGigabitEthernet2/1/1-2", "avgUpdateFrequency": 300, "numUpdates": 30, "reachabilityStatus": "In Progress", "reachabilityFailureReason": "Unreachable" }, Cisco Confidential { "id": "8f41bef8-698c-4701-af14-471e910ed9ff", "hostMac": "00:50:56:8A:27:A3", "hostIp": "40.0.5.12", "hostType": "WIRED", "connectedNetworkDeviceId": "7895a45f-47aa-42ee-9d06- c66d3b784594", "connectedNetworkDeviceIpAddress": "40.0.2.18", "connectedInterfaceId": "30bb14c1-8fb6-45c4-8f6d-5b845a7f448c", "connectedInterfaceName": "GigabitEthernet2/0/2", "vlanId": "1", "lastUpdated": "September 29, 2014 1:54:13 PM PDT", "numUpdates": 1, "userStatus": "Active", "source": 200 }, $python host.py | sort
  • 11. © 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @ Understanding topology • Nodes Cisco Confidential "deviceType": "SWITCH", "label": "SDN-BRANCH-3750-STACK", "id": "7895a45f-47aa-42ee-9d06-c66d3b784594",  /network-device "nodeType": "device", "deviceType": "WIRED", "label": "40.0.5.12", "id": "8f41bef8-698c-4701-af14-471e910ed9ff",  /host "nodeType": "host", "source": "7895a45f-47aa-42ee-9d06-c66d3b784594", "startPortID": "30bb14c1-8fb6-45c4-8f6d-5b845a7f448c", "target": "8f41bef8-698c-4701-af14-471e910ed9ff", "endPortID": "", "linkStatus": "UP" • Links https://test-apic/api/v0/topology/physical-topology
  • 12. © 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @ /acl/trace /routing-path /application /qos App -> Class -> Mapping (cvd) Queuing on interfaces Bandwidth allocation to classes QoS Marking /policy /network- device/{tags} /host /user ACL QoS Marking Traffic Redirection Path verification ACL -> App mapping REST API Structure - Policy 12
  • 13. © 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @ Policy Construct
  • 15. © 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @ Three Classes of Use Case Cisco Confidential NetOps Net Integration Net Innovation "HOW" to "WHAT" Cultural change: "TEST and VERIFY"  "TRUST"
  • 16. © 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @ Tags - Adding https://test-apic/api/v0/network-device/tag POST {"networkDeviceId" : "7895a45f-47aa-42ee-9d06-c66d3b784594", "tag" : "branch"}
  • 17. © 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @ Automating Tagging.. $ ./tag_device.py BRANCH +branch Adding tag: branch to device SDN-BRANCH-3750-STACK(7895a45f-47aa-42ee-9d06-c66d3b784594) 202 TAGGED {u'url': u'/api/v0/task/3e934c30-43f1-4157-b4e8-a4291ba6c198', u'taskId': u'3e934c30-43f1-4157-b4e8-a4291ba6c198'} Adding tag: branch to device SDN-BRANCH-3850-TB1(526c8fc6-f732-41a9-9faf-5876293a2e8c) 202 TAGGED {u'url': u'/api/v0/task/3714ef69-11ef-411b-945f-db52bba47db0', u'taskId': u'3714ef69-11ef-411b-945f-db52bba47db0'} Adding tag: branch to device SDN-BRANCH-ASR1002(cceaf2fe-c3d9-4d37-bf14-fba071c27d6e) 202 TAGGED {u'url': u'/api/v0/task/8c85d4cf-6bc7-40b8-8616-938af7a446b1', u'taskId': u'8c85d4cf-6bc7-40b8-8616-938af7a446b1'} Adding tag: branch to device SDN-BRANCH-C4K(a36bc35a-94ed-4b2c-a66c-e46dddd5e037) 202 TAGGED {u'url': u'/api/v0/task/dfa84ff2-d92a-4fea-9e7a-707bf3d18cb1', u'taskId': u'dfa84ff2-d92a-4fea-9e7a-707bf3d18cb1'}
  • 18. © 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @ IPAM - All Subnets { "id": "5bcc0bc0-c7bd-458d-9ad6-b606970017cf", "deviceId": "526c8fc6-f732-41a9-9faf-5876293a2e8c", "interfaceType": "Physical", "portName": "GigabitEthernet1/0/5", "portType": "Gigabit Ethernet", "portMode": "routed", "connectorType": "RJ-45", "macAddress": "18:9C:5D:16:FC:E4", "ipv4Address": "40.0.3.1", "ipv4Mask": "30", "serialNo": "FOC1743X0CJ", "pid": "WS-C3850-48P", "status": "down", "vendor": "Cisco", "lastUpdated": "2014-09-29 16:17:14.995619-07", "duplex": false, "avgUpdateFrequency": 180, "numUpdates": 49, "speed": 1000000 } { "id": "2fdb927f-a5a7-47b2-bbed-8499c1c12105", "deviceId": "526c8fc6-f732-41a9-9faf-5876293a2e8c", "interfaceType": "Physical", "portName": "GigabitEthernet1/0/4", "portType": "Gigabit Ethernet", "portMode": "routed", "connectorType": "RJ-45", "macAddress": "18:9C:5D:16:FC:F6", "ipv4Address": "40.0.2.5", "ipv4Mask": "30", "serialNo": "FOC1743X0CJ", "pid": "WS-C3850-48P", "status": "up", "vendor": "Cisco", "connectedNeighbor": "a632c6e8-89bf-4949-8e4d-a249105f2c7c", "lastUpdated": "2014-09-29 16:17:14.980705-07", "connectedNeighborType": "Network_Device", "ospfSupport": true, "duplex": true, "avgUpdateFrequency": 180, "numUpdates": 49, "speed": 1000000 } https://test-apic/api/v0/interface GET $python all-interfaces.py | sort
  • 19. © 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @ Netops • Previous examples – Access to datastore – Find/filter/report etc • routing-path  similar to topology – /routing-path/{src}/{dst} – /routing-path/40.0.0.15/40.0.5.12 Cisco Confidential
  • 20. © 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @ Path has nodes and links "nodes": [ { "deviceType": "WIRED", "label": "40.0.0.15", "id": "51a75ce9-d5c9-4fe2-95a0-6fc01410e201", "nodeType": "host" },{ "deviceType": "SWITCH", "label": "SDN-CAMPUS-C3850", "id": "f8c3fc68-cd26-4576-bcec-51f9b578f71e", "nodeType": "device", } ........ Some nodes removed ........... { "deviceType": "SWITCH", "label": "SDN-BRANCH-3750-STACK", "id": "7895a45f-47aa-42ee-9d06-c66d3b784594", "nodeType": "device", }, { "deviceType": "WIRED", "label": "40.0.5.12", "id": "8f41bef8-698c-4701-af14-471e910ed9ff", "nodeType": "host" } * NOTE: Some attributed removed Cisco Confidential "links":{ "source": "51a75ce9-d5c9-4fe2-95a0-6fc01410e201", "startPortID": "", "target": "f8c3fc68-cd26-4576-bcec-51f9b578f71e", "endPortID": "16e94527-33fd-4968-a0d7-0f7265b72904", "linkStatus": "UP" }, { "id": "459d7b7b-01c3-449a-841d-489e0250b8da", "source": "f8c3fc68-cd26-4576-bcec-51f9b578f71e", "startPortID": "0e841ab3-6192-4514-9736-d3ef63ed67f5", "target": "e5f93514-3ae5-4109-8b52-b9fa876e1eae", "endPortID": "02b1a0a6-3772-4b71-b2da-6d7cd87a5ec2", "linkStatus": "UP" }, ….... ………… Some nodes removed ………………………. { "source": "7895a45f-47aa-42ee-9d06-c66d3b784594", "startPortID": "30bb14c1-8fb6-45c4-8f6d-5b845a7f448c", "target": "8f41bef8-698c-4701-af14-471e910ed9ff", "endPortID": "", "linkStatus": "UP" } $python show-path.py
  • 21. © 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @ Netops ACL – Get ACL for a Device https://test-apic/api/v0/acl/device/cceaf2fe-c3d9-4d37-bf14-fba071c27d6e – Get ACL for Interface GigabitEthernet0/0/0 https://test-apic/api/v0/acl/interface/ad8c543b-c698-468b-bb64-e0a418d6c517 • Check for consistency of an ACL https://test-apic/api/v0/acl/conflict/dea7a366-4cdd-4006-ad51-27f0a0b2fb40 Cisco Confidential $python check-acl.py
  • 22. © 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @ Combine PATH with ACL https://test-apic/api/v0/acl/trace POST { "destIp": "40.0.0.15", "sourceIp": "40.0.0.12", "applicationId": "46de799b-7f51-4a5e-8d08-46e2e78ff619", "interfaceIds": [ "", "16e94527-33fd-4968-a0d7-0f7265b72904", "4556c2eb-0df4-41b3-8558-05f04be02fe0", "" ] } Cisco Confidential $python show-path-acl.pyContent-Type = application/json
  • 23. © 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @ Combine PATH with ACL https://test-apic/api/v0/acl/trace POST { "destIp": "40.0.0.15", "sourceIp": "40.0.5.12", "applicationId": "46de799b-7f51-4a5e-8d08-46e2e78ff619", "interfaceIds": ["", "16e94527-33fd-4968-a0d7-0f7265b72904", "0e841ab3-6192-4514-9736-d3ef63ed67f5", "02b1a0a6-3772-4b71-b2da-6d7cd87a5ec2", "54683dd7-1c17-41f6-b7ac-47935d20fe3f", "a8c71f5e-dd31-457f-8160-556b91dd6320", "87bb850b-6223-4540-8729-ff4c276097ea", "82481ce8-fe7b-493f-9ca1-0390bfa71be0", "ad8c543b-c698-468b-bb64-e0a418d6c517", "c4a8fe79-fa1b-4349-ac37-90146554f0ff", "2fdb927f-a5a7-47b2-bbed-8499c1c12105", "d3054716-73ed-4a6c-89c9-095ebe7f3445", "42a5e927-1ed6-4483-bd66-555d9d6d2f89", "86ff5af0-4c5a-46e1-9edb-8aa3df5e9d95", "30bb14c1-8fb6-45c4-8f6d-5b845a7f448c",""] } Cisco Confidential $python show-path-acl.pyContent-Type = application/json
  • 24. © 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @ Result: "devices": [ { "deviceName": "SDN-CAMPUS-C3850", "deviceId": "f8c3fc68-cd26-4576-bcec-51f9b578f71e", "deviceType": "SWITCH", "deviceRole": "Access", "deviceIp": "40.0.0.3", "interfaces": [{ "interfaceName": "GigabitEthernet1/0/12", "interfaceId": "16e94527-33fd-4968-a0d7-0f7265b72904", "aclName": null, "aclId": null, "ingress": true, "blockType": "none", "relevantAces": [], "implicitDenies": [] },{ "interfaceName": "GigabitEthernet1/0/1", "interfaceId": "0e841ab3-6192-4514-9736-d3ef63ed67f5", "aclName": null, "aclId": null, "ingress": false, "blockType": "none", "relevantAces": [], "implicitDenies": [] }] }, { "interfaceName": "GigabitEthernet0/0/0", "interfaceId": "ad8c543b-c698-468b-bb64-e0a418d6c517", "aclName": "one_big_acl_for_conflict", "aclId": "dea7a366-4cdd-4006-ad51-27f0a0b2fb40", "ingress": false, "blockType": "complete", "relevantAces": [{ "aceIndex": 10, "ace": { "id": "f175c041-da1f-46cd-b9a6-0a4df6b5e15c", "aclId": "dea7a366-4cdd-4006-ad51-27f0a0b2fb40", "priority": 100, "action": "DENY", "protocol": "TCP", "srcAddr": null,"srcAddrMask": "32", "srcPort": 0, "srcPortUpper": 0, "destAddr": null, "destAddrMask": "32", "destPort": 458, "destPortUpper": 458, "dscp": 0, "attributeInfo": {} }, "sourcePortInfoList": [], "destPortInfoList": [ { "protocol": "tcp", "ports": "458" } ]},
  • 25. © 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @ Applications { "id": "46de799b-7f51-4a5e-8d08-46e2e78ff619", "applicationGroup": "other", "category": "voice-and-video", "subCategory": "consumer-video-streaming", "encrypted": "false", "p2pTechnology": "false", "tunnel": "false", "name": "appleqtc", "enabled": "true", "nbarId": "92", "engineId": "3", "globalId": "L4:458", "selectorId": "458", "helpString": "apple quick time", "longDescription": "Apple QuickTime is an extensible proprietary multimedia framework developed by Apple Inc., capable of handling various formats of digital video, picture, sound, panoramic images, and interactivity. QuickTime is available for Windows XP and later, as well as Mac OS X Leopard and later operating systems.", "appProtocol": "tcp/udp", "tcpPorts": "458", "udpPorts": "458", "references": "http://www.apple.com/quicktime/", "url": "", "valid": true }
  • 26. © 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @ Reference
  • 27. © 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @ Integration(s) • Collaboration – Phase 1 – (lower trust threshold) Marking -> voice clients E.g. UCM, Citrix • Security – Phase 2 – (higher trust threshold) Copy --- lower Deny – higher (e.g. SourceFire) Cisco Confidential
  • 28. © 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @ Policy based QoS https://test-apic/api/v0/policy POST { "policyOwner": "Admin", "networkUser": {"userIdentifiers":["40.0.0.15"],"applications":[{"raw": "12340;UDP"}]}, "actionProperty": {"priorityLevel": "46"}, "actions": [ "PERMIT"], "policyName": "voice:audio:40.0.0.15" } Cisco Confidential $python set-qos.py < qos-input-small.txt { "response": { "taskId": "f5c07be7-ae8e-4350-80b0-1971874803c8", "url": "/api/v0/task/f5c07be7-ae8e-4350-80b0-1971874803c8" }, "version": "0.0" }
  • 29. © 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @ Task for Policy creation - success https://adam-gv/api/v0/task/4bd6767d-b332-4d20-b689-05473833e0c8 GET { "response": { "id": "4bd6767d-b332-4d20-b689-05473833e0c8", "rootId": "4bd6767d-b332-4d20-b689-05473833e0c8", "serviceType": "Policy Service", "progress": "767952d1-e5b5-4c9f-bcca-02e3e6515210", "startTime": 1409885977316, "endTime": 1409885985944 }, "version": "0.0" }
  • 30. © 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @ Task for Policy creation - failure https://test-apic/api/v0/task/f5c07be7-ae8e-4350-80b0-1971874803c8 GET "response": { "id": "f5c07be7-ae8e-4350-80b0-1971874803c8", "rootId": "f5c07be7-ae8e-4350-80b0-1971874803c8", "serviceType": "Policy Service", "progress": "Policy Creation Failed", "errorCode": "PartialSuccess", "failureReason": "04ea2f11-1e9d-435a-9db2-ded3fbcd732f: Inactive Policy - Interfaces where this policy needs to be programmed are not within the same policy scope. Hence skipping policy creation for this policy.", "isError": true, "startTime": 1412425907975, "endTime": 1412425910331 },
  • 31. © 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @ Policy for Security https://test-apic/api/v0/policy POST { "policyName": "deny_some", "policyOwner": "Admin", "actions": ["DENY"], "networkUser": {"userIdentifiers": ["40.0.0.15"]}, "resource": {"userIdentifiers": ["10.10.20.3"], "applications":[{"raw": "81;TCP"}]} } Cisco Confidential Sourcefire use case. <<<<<THIS CAN BE DANGEROUS IN A SHARED LAB>>>> Remove "resource" components (10.10.4.2) 1) deny tcp host 40.0.0.15 host 10.10.20.3 eq 81 2) deny tcp host 40.0.0.15 any eq 81 3) deny ip host 40.0.0.15 any
  • 32. © 2014 Cisco and/or its affiliates. All rights reserved.Presentation_ID Cisco Public DevNet @ For more information… • SDN BOF 1:30PM classroom • Other Sessions – DevNet-1044 – Create Hello World with APIC-EM
  • 33. Thank you. DevNet @ Join us on DevNet at developer.cisco.com Follow DevNet on Twitter: @ciscodevnet