# Can RESTCONF be utilised as backed for Web development

**URL:** <https://dmap-community.ductus.global/t/can-restconf-be-utilised-as-backed-for-web-development/2892>\
**Category:** Other Northbound Interfaces\
**Created:** [January 20, 2020, 11:35pm UTC](https://dmap-community.ductus.global/t/can-restconf-be-utilised-as-backed-for-web-development/2892 "2020-01-20T23:35:27Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![skbits](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@skbits](https://dmap-community.ductus.global/u/skbits)\
**Post date:** [January 20, 2020, 11:35pm UTC](https://dmap-community.ductus.global/t/can-restconf-be-utilised-as-backed-for-web-development/2892/1 "2020-01-20T23:35:27Z")

</div>

I understand from the confd user guide that JSON RPC is being provided as an interface for web development. But, am just checking to know if RESTCONF APIs can directly be interacted to make the UI development easy.

---

<div class="post-metadata">

**Author:** ![cohult](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/cohult/32/221_2.png) [@cohult](https://dmap-community.ductus.global/u/cohult)\
**Post date:** [January 21, 2020, 11:32am UTC](https://dmap-community.ductus.global/t/can-restconf-be-utilised-as-backed-for-web-development/2892/2 "2020-01-21T11:32:26Z")

</div>

Anything can be done in software, but you would make it difficult for yourself.  
In summary, the JSON-RPC API focus on WebUI interaction (used by a human being) with ConfD, while the RESTCONF API target REST machine-to-machine point-to-point communication.

Just browse the man page for the JSON-RPC API for 5 minutes and you will find things like for example:

- JSON-RPC support the candidate datastore. RESTCONF does not. (e.g. pre-validate configuration in the candidate before a commit to the running datastore)
- The cookie based authentication that creates sessions and transactions in sessions. RESTCONF has no session concept, so each PUT/PATCH/DELETE/YANG patch will be a commit, while with JSON-RPC you can make changes and not until you commit the changes in the transaction are they applied to CDB. And if the session or transaction fail before commit, nothing is set. (for example a commit button that you can press after you are done configuring something)
- You get the permissions for users with JSON-RPC (for example grey fields and buttons when a user does not have privileges to change or execute something)
- WIth JSON-RPC you get access to the complete schema as generated by the YANG model and you can get individual levels, which I demonstrated earlier. (download only the config users view on their current screen)
- rollbacks, messages to other WebUI / CLI users, subscribe to changes in config and oper datastores, get transaction changes (diff) etc.

---

<div class="post-metadata">

**Author:** ![skbits](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@skbits](https://dmap-community.ductus.global/u/skbits)\
**Post date:** [January 21, 2020, 8:16pm UTC](https://dmap-community.ductus.global/t/can-restconf-be-utilised-as-backed-for-web-development/2892/3 "2020-01-21T20:16:17Z")

</div>

Thanks Cohult for the reply.  
What do you mean by man page of json rpc in the above reply. Are you referring to user guide.

---

<div class="post-metadata">

**Author:** ![cohult](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/cohult/32/221_2.png) [@cohult](https://dmap-community.ductus.global/u/cohult)\
**Post date:** [January 21, 2020, 8:21pm UTC](https://dmap-community.ductus.global/t/can-restconf-be-utilised-as-backed-for-web-development/2892/4 "2020-01-21T20:21:55Z")

</div>

“man page” is short for [“manual page”](https://en.wikipedia.org/wiki/Man_page)  
In this case, see  
`$ man $CONFD_DIR/man/man7/jsonrpc.7`  
The man pages are also attached as appendixes to the UG.

---

<div class="post-metadata">

**Author:** ![skbits](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@skbits](https://dmap-community.ductus.global/u/skbits)\
**Post date:** [January 21, 2020, 8:58pm UTC](https://dmap-community.ductus.global/t/can-restconf-be-utilised-as-backed-for-web-development/2892/5 "2020-01-21T20:58:11Z")

</div>

Is there any demo application available on your GitHub or any where else for web interface. Other than the examples in the UG.

---

<div class="post-metadata">

**Author:** ![cohult](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/cohult/32/221_2.png) [@cohult](https://dmap-community.ductus.global/u/cohult)\
**Post date:** [January 22, 2020, 6:49am UTC](https://dmap-community.ductus.global/t/can-restconf-be-utilised-as-backed-for-web-development/2892/6 "2020-01-22T06:49:29Z")

</div>

There is a new larger (better) example in the works (the old one was removed in ConfD 7.1). It may be possible to gain “early adopter” access to the work in progress example if you have access to ConfD support. File a ticket with support and put @josephm and @cohult as your reference.

---

<div class="post-metadata">

**Author:** ![skbits](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@skbits](https://dmap-community.ductus.global/u/skbits)\
**Post date:** [January 22, 2020, 6:51am UTC](https://dmap-community.ductus.global/t/can-restconf-be-utilised-as-backed-for-web-development/2892/7 "2020-01-22T06:51:57Z")

</div>

I do see some examples in the user guide of 7.2.1  
What do you mean by removed?

---

<div class="post-metadata">

**Author:** ![cohult](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/cohult/32/221_2.png) [@cohult](https://dmap-community.ductus.global/u/cohult)\
**Post date:** [January 22, 2020, 6:55am UTC](https://dmap-community.ductus.global/t/can-restconf-be-utilised-as-backed-for-web-development/2892/8 "2020-01-22T06:55:53Z")

</div>

I am referring to the example set that comes with the full version of ConfD (not basic) under examples.confd/webui
