Ask Your Question

REST/restconf API XML/JSON documentation

asked 2015-09-10 08:15:10 -0700

headamage gravatar image

updated 2015-09-10 08:26:05 -0700

Can someone help me find the place where all the REST API commands and options are documented so I can learn what the various settings do? I have spent a whole week looking for this and I haven't found anything and on top of that most of the examples in the wiki simply don't work and without the documentation there is no way of troubleshooting. I all I want is to find out what all the available options are when setting up flows so I can start building the flows I need without trying to guess what is happening through templates and other people's examples.

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted

answered 2015-09-10 11:32:54 -0700

Mandeep gravatar image

Install apidocs (feature:install odl-mdsal-apidocs) and explorer all rest APIs via Rest API Explorer. This will have all available APIs with proper documentation (assuming corresponding YANG has proper descriptions).

For more details about API Doc explorer refer api Doc explorer

edit flag offensive delete publish link more


Thanks, I have already done that. The problem I am having is that I can find the structures and options in there but nothing explains what the options do. For example installHw is supposed to install the flow on the switch. But setting it to false still activates the flow, so what's the point?

headamage ( 2015-09-10 11:54:02 -0700 )edit

Most of these "options" are openflow related and will depend on what the switch does with it. Of course, you'll have to have the flows proper when you push to the controller, which will then *try* to push to the switch.

jamoluhrsen ( 2015-09-10 15:59:27 -0700 )edit

answered 2015-09-10 11:06:26 -0700

updated 2015-09-10 14:47:07 -0700

All the rest API are dynamically generated from yang models. So try to understand how to access the data store and invoking the rpcs using the restconf.

Try to understand in this way rest api ==> restconf ==> mdsal (data store and rpcs) .

I would suggest to read the the restconf documentation:

Then try to use and understand the rest openflow plugin apis:

Then you can explore the opendaylight models and use them using the rest apis. Following is the list of models:

edit flag offensive delete publish link more


thanks, the last two links don't work but I have gone through all these. In fact they caused me a lot of problems because many of the examples in there actually have mistakes. For example ethernet is set to 45 instead of 0x0800. It doesn't help a beginner at all when documentation is such a mess.

headamage ( 2015-09-10 11:59:55 -0700 )edit

I have updated the links, if you find any mistakes in the wiki please update it. It will help all of us. :)

subhash ( 2015-09-10 14:48:49 -0700 )edit

I'm not sure what installHw is doing. Looking at the code, I think it might not be used. you should send an email to to ask about that.

jamoluhrsen ( 2015-09-10 15:56:12 -0700 )edit

can you link to the page that shows an ethertype of 45? The types I see on the EndtoEnd Flows link is using 2048 (decimal of 0x0800) which is ip.

jamoluhrsen ( 2015-09-10 15:56:56 -0700 )edit Have a look at the above link. I initiall wanted a specific flow between src and dst so i used that example flow.

headamage ( 2015-09-10 16:14:05 -0700 )edit

answered 2016-05-16 06:50:19 -0700

medox gravatar image

updated 2016-05-20 04:10:13 -0700

hello i think i have the same problem and this is a related question with an accepted answer How to use Rest API curl command in php

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-09-10 08:15:10 -0700

Seen: 4,170 times

Last updated: May 20 '16