RESTCONF API Resource The API resource is the top-level resource located at +restconf. It supports the following media types: Media is the type of YANG formated RPC that is sent to the RESCONF server (XML or JSON). Note • Application/YANG-Data+XML OR Application/YANG-Data+JSON • The API resource contains the RESTCONF root resource for the RESTCONF DATASTORE and OPERATION resources. For example: The client may then retrieve the top-level API resource, using the root resource "/restconf". GET /restconf HTTP/1.1 Host: example.com Accept: application/yang-data+json The server might respond as follows: HTTP/1.1 200 OK Date: Thu, 26 Jan 2017 20:56:30 GMT Server: example-server Content-Type:
application/yang-data+json { "data" : {}, "operations" : {}, "yang-library-version" : "2016-06-21" } } "ietf-restconf:restconf" : { For more information, refer to RFC 3986 Methods Methods are HTTPS operations (GET/PATCH/POST/DELETE/OPTIONS/PUT) performed on a target resource. A YANG-formated RPC invokes a particular method on a given resource that pertains to a target YANG model residing in the RESTCONF server. The uniform resource identifier (URI) acts as a location identification for a given resource, so that the client RESTCONF method can locate that particular resource to take an action specified by an HTTPS method or property.
For more information, see RFC 8040 - RESTCONF Protocol RESTCONF YANG-Patch Support RESTCONF supports YANG-Patch media type as specified by RFC 8072. A YANG-Patch is an ordered list of edits that are applied to the target datastore by the RESTCONF server. The YANG Patch operation is invoked by the RESTCONF client by sending a Patch method request with a representation using either the media type application/yang-patch+xml or application/yang-patch+json . RESTCONF Protocol RESTCONF API Resource RESTCONF Protocol 5