The following is the summary of the ONOS REST API.
Please note that the all endpoints need to be prefixed with: http://<controller IP>:8181/onos/v1/
Example: http://127.0.0.1:8181/onos/v1/devices if ONOS is running on your local machine.
The entries in bold are currently implemented.
Device
GET /devices | Lists all infrastructure devices. |
GET /devices/{deviceId} | Lists details of a specific infrastructure device. |
GET /devices/{deviceId}/ports | Lists ports of a specific infrastructure device. |
POST /devices | Creates a new infrastructure device into inventory (future). |
PUT /devices/{deviceId} | Updates a device - attributes, availability, mastership. |
DELETE /devices/{deviceId} | Deletes an infrastructure device from inventory. |
Link
GET /links | Lists all infrastructure links. |
GET /links/{linkId} | Lists details of a links. |
POST /links | Creates a new infrastructure link into inventory (future). |
PUT /links/{linkId} | Updates a link - attributes, e.g. type. |
DELETE /link/{linkId} | Deletes an infrastructure link from inventory. |
Host
GET /hosts | Lists all end-stations hosts. |
GET /hosts/{hostId} | Lists details of a specific end-station host specified by the host ID. |
GET /hosts/{mac}/{vlan} | Lists details of a specific end-station host specified by the host MAC address and VLan Id. |
POST /hosts | Creates a new end-station host into inventory (future). |
PUT /hosts/{hostId} | Updates an end-station host - attributes, e.g. IP, location. |
DELETE /hosts/{hostId} | Deletes an end-station host from inventory. |
Topology
GET /topology | Gets overview of the current topology. |
GET /topology/clusters | Gets list of topology cluster overviews. |
GET /topology/cluster/{clusterId} | Gets overview of a specific topology cluster. |
GET /topology/cluster/{clusterId}/devices | Gets infrastructure devices that belong to the specified topology cluster. |
GET /topology/cluster/{clusterId}/links | Gets infrastructure links that belong to the specified topology cluster. |
GET /topology/broadcast/{connectPoint} | Gets indication whether the given point permits broadcast. |
GET /topology/infrastructure/{connectPoint} | Gets indication whether the given point belongs to network infrastructure. |
Path
GET /paths/{srcDeviceId}/{dstDeviceId} | Gets set of pre-computed shortest paths between the specified source and destination devices. |
GET /paths/{srcHostId}/{dstHostId}[?avoidSharedRisks=[true|false]] | Gets set of pre-computed shortest paths between the specified source and destination end-stations. If ‘avoidSharedRisks’ optional parameter is present or set to true, return only those paths that do not share the same link or intermediate infrastructure devices and links. |
Flow
GET /flows/{deviceId} | Gets list of flow rules applied to the specified infrastructure device. |
GET /flows/{deviceId}/{flowId} | Gets details of a specified flow rule. |
GET /flows | Gets details of all flow rules in the system. |
POST /flows/ | Applies batch of flow rule operations; this includes add/remove operations. |
POST /flows/{deviceId} | Applies a new flow rule on the specified device. |
DELETE /flows/{deviceId}/{flowId} | Deletes a flow rule from the specified device. |
GET /flows/link/{linkId} | Gets aggregate statistics for all flows traversing the given link. |
Intent
GET /intent/{intent-id} | Gets the details for the given Intent object. |
GET /intents | Gets a collection containing all the Intent objects currently in the system. |
POST /intent | Creates a new Intent object. |
POST /intents | Creates a batch of Intent objects (pending -may not be included in finalized API). |
DELETE /intent/{Intent-id} | Removes an intent from the system. |
Previous : Appendix A : List of ONOS Test Scripts (onos-* scripts)
Next : Appendix C : Source Tree Organization