Ask is moving to Stack Overflow and Serverfault.com! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode

0

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

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

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
0

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

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

Comments

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 -0800 )edit
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

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

Seen: 281 times

Last updated: May 18 '15