formattedNEW!

You can use the formatted query parameter to return a human-readable JSON formatted response instead of a non-formatted block of data.

If the formatted query parameter is not present in the request, the default value is FALSE.

Sample request from client with the default behavior of FALSE

GET /rest/restconf/data/openconfiginterfaces:interfaces/interface=1/config
HTTP/1.1
Host: 10.68.5.80

Sample response data from server

{"openconfig-interfaces:config":
{"enabled":true,"type":"ethernetCsmacd","description":"","n
ame":"1","mtu":1500}}

Sample request

GET /rest/restconf/data/openconfig-interfaces:interfaces/interface=1/config?formatted=True
HTTP/1.1
Host: 10.68.5.80

Sample response data from server

{
    "openconfig-interfaces:config": {
        "enabled": true,
        "type": "ethernetCsmacd",
        "description": "",
        "name": "1",
        "mtu": 1500
    }
}