The Floodlight REST API
...
An example REST call is:
Code Block | ||||
---|---|---|---|---|
| ||||
curl http://192.168.110.2:8080/wm/core/controller/switches/json
|
...
URI | Method | Description | Arguments |
---|---|---|---|
/wm/core/switch/all/<statType>/json | GET | Retrieve aggregate stats across all switches | statType: port, queue, flow, aggregate, desc, table, features |
/wm/core/switch/<switchId>/<statType>/json | GET | Retrieve per switch stats | switchId: Valid Switch DPID (XX:XX:XX:XX:XX:XX:XX:XX) |
/wm/core/controller/switches/json | GET | List of all switch DPIDs connected to the controller | none |
/wm/core/controller/summary/json | GET | Controller summary (# of Switches, # of Links, etc) | none |
/wm/core/counter/<counterTitle>/json | GET | List of global traffic counters in the controller (across all switches) | counterTitle: "all" or something of the form <DPID>_<COUNTER_NAME>_<SUB_CATEGORY> |
/wm/core/counter/<switchId>/<counterName>/json | GET | List of traffic counters per switch | switchId: Valid Switch DPID |
/wm/core/memory/json | GET | Current controller memory usage | none |
/wm/core/health/json | GET | Status/Health of REST API | none |
/wm/core/systensystem/uptime/json | GET | Controller uptime | none |
/wm/topology/links/json | GET | List all the inter-switch links. Note that these are only for switches connected to the same controller. This is not available in the 0.8 release. | none |
/wm/topology/switchclusters/json | GET | List of all switch clusters connected to the controller. This is not available in the 0.8 release. | none |
/wm/topology/external-links/json | GET | Show "external" links, i.e., multi-hop links discovered by BDDP instead of LLDP packets | none |
/wm/topology/links/json | GET | Show DIRECT and TUNNEL links discovered based on LLDP packets | none |
/wm/device/ | GET | List of all devices tracked by the controller. This includes MACs, IPs, and attachment points. | Passed as GET parameters: mac (colon-separated hex-encoded), ipv4 (dotted decimal), vlan, dpid attachment point DPID (colon-separated hex-encoded) and port the attachment point port. |
/wm/staticflowentrypusher/json | POST/DELETE | Add/Delete static flow | HTTP POST data (add flow), HTTP DELETE (for deletion) |
/wm/staticflowentrypusher/list/<switch>/json | GET | List static flows for a switch or all switches | switch: Valid Switch DPID (XX:XX:XX:XX:XX:XX:XX:XX) or "all" |
/wm/staticflowentrypusher/clear/<switch>/json | GET | Clear static flows for a switch or all switches | switch: Valid Switch DPID (XX:XX:XX:XX:XX:XX:XX:XX) or "all" |
More information available on How to Use Static Flow Pusher API |
|
|
|
/networkService/v1.1/tenants/<tenant>/networks/<network> | PUT/POST/DELETE | Creates a new virtual network. Name and ID are required, gateway is optional. | URI argument: tenant: Currently ignored. network: ID (not name) of the network |
/networkService/v1.1/tenants/<tenant>/networks/<network>/ports/<port>/attachment | PUT/DELETE | Attaches a host to a virtual network. | URI argument: tenant: Currently ignored. network: ID (not name) of the network. port: Logical port name |
/networkService/v1.1/tenants/<tenant>/networks | GET | Shows all networks and their gateway, ID, and hosts mac in json format. | URI argument: tenant: Currently ignored. |
More information available on Virtual Network Filter REST API |
|
|
|
/wm/firewall/module/<op>/json | GET |
| query the status of, enable, and disable the firewall |
/wm/firewall/rules/json | GET/POST/DELETE | GET: None | List all existing rules in json format |
More information available on Firewall REST API |
|
|
|
For Floodlight developers, check out how to add new REST APIs to Floodlight services at How to Add Services to a Module.