Ask Your Question

How to add a rest api in app development, not a restconf api?

asked 2015-05-17 18:43:10 -0700

freshunter gravatar image

Can someone direct me to documentation for how to add REST API in a custom app in ODL? Now I could add restconf POST api by defining the rpc interface in yang file. But I'd like to know how to add a GET/PUT/DELETE rest api in my app. Thanks for advance.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-05-18 03:36:37 -0700

rmohamed gravatar image

Using container, it will expose get/put/delete API. You can check toaster example (toaster.yang), will get more idea.

container toaster { }

Thanks, rmohamed

edit flag offensive delete publish link more


rmohamed, thanks. I'd like to process the GET/DELETE... request myself. I understand the call flow like this: the container definition generates the API, but the request will directlly change the datastore and myside will get the change by the datachange event, that's not what I want. Am I right?

freshunter ( 2015-05-19 01:27:58 -0700 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-05-17 18:43:10 -0700

Seen: 279 times

Last updated: May 18 '15