content

The content query parameter controls how descendant nodes of the requested data nodes will be processed in the reply. The allowed values are:
Table 1. Content Query Parameter Values
Value Description
config Return only configuration descendant data nodes
nonconfig Return only non-configuration descendant data nodes
all Return all descendant data nodes
The content parameter is allowed only for GET methods on datastore and data resources. A 400 Bad Request status is returned if used for other methods or resource types.

If the content query parameter is not present in the request, the default value is all.

Sample request from client with content = config

GET  /rest/restconf/data/openconfig-interfaces:interfaces/interface=1?content=config
    HTTP/1.1
    Host: 10.68.5.64

Sample response data from the server

{  
"openconfig-interfaces:interface": [    
{      
    "config": {        
        "description": "",        
        "enabled": true,        
        "mtu": 1500,        
        "name": "1",        
        "type": "ethernetCsmacd"      
    },      
    "hold-time": {        
        "config": {          
            "down": 0,          
            "up": 0        
        }      
    },      
    "name": "1",      
    "openconfig-if-ethernet:ethernet": {        
        "config": {          
            "auto-negotiate": true,          
            "duplex-mode": "FULL",          
            "enable-flow-control": false,          
            "mac-address": "00:04:96:9A:4F:4F",          
            "port-speed": "SPEED_UNKNOWN"        
        },        
        "openconfig-vlan:switched-vlan": {          
            "config": {            
                "access-vlan": 1,            
                "interface-mode": "ACCESS"          
            }        
           }      
        },      
       "subinterfaces": {        
            "subinterface": [          
             {            
                "config": {              
                    "description": "",              
                    "enabled": true,              
                    "index": 1000004,              
                    "name": "Default"            
                },            
                "index": 1000004          
              }        
            ]      
        }    
      }  
]}

Sample request from client with content = nonconfig

GET  /rest/restconf/data/openconfig-interfaces:interfaces/interface=1?content=nonconfig
    HTTP/1.1
    Host: 10.68.5.64

Sample response data from server

{  
"openconfig-interfaces:interface": [    
{      
    "hold-time": {        
        "state": {          
            "down": 0,          
            "up": 0        
        }      
    },      
    "name": "1",      
    "openconfig-if-ethernet:ethernet": {        
        "openconfig-vlan:switched-vlan": {          
            "state": {            
                "access-vlan": 1,            
                "interface-mode": "ACCESS"          
            }        
        },        
        "state": {          
            "auto-negotiate": true,          
            "counters": {            
                "in-8021q-frames": 0,            
                "in-crc-errors": 0,            
                "in-fragment-frames": 0,            
                "in-jabber-frames": 0,            
                "in-mac-control-frames": 0,            
                "in-mac-pause-frames": 0,            
                "in-oversize-frames": 0,            
                "out-8021q-frames": 0,            
                "out-mac-control-frames": 0,            
                "out-mac-pause-frames": 0          
            },          
            "duplex-mode": "FULL",          
            "effective-speed": 0,          
            "enable-flow-control": false,          
            "hw-mac-address": "00:04:96:9A:4F:4F",          
            "mac-address": "00:04:96:9A:4F:4F",          
            "negotiated-duplex-mode": null,          
            "negotiated-port-speed": "SPEED_UNKNOWN",          
            "port-speed": "SPEED_UNKNOWN"        
         }      
        },      
          "state": {        
            "admin-status": "UP",        
            "counters": {          
                "in-broadcast-pkts": 0,          
                "in-discards": 0,          
                "in-errors": 0,          
                "in-multicast-pkts": 0,          
                "in-octets": 0,          
                "in-unicast-pkts": 0,          
                "in-unknown-protos": 0,          
                "last-clear": "2020-03-16T07:40:46Z",          
                "out-broadcast-pkts": 0,          
                "out-discards": 0,          
                "out-errors": 0,          
                "out-multicast-pkts": 0,          
                "out-octets": 0,          
                "out-unicast-pkts": 0        
            },        
            "description": "",        
            "enabled": true,        
            "ifindex": 1001,        
            "last-change": 3800,        
            "mtu": 1500,        
            "name": "1",        
            "openconfig-platform-transceiver:physical-channel": [],        
            "openconfig-platform:hardware-port": "00:04:96:9A:4F:4F",        
            "oper-status": "DOWN",        
            "type": "ethernetCsmacd"      
        },      
        "subinterfaces": {        
        "subinterface": [          
        {            
            "index": 1000004,            
            "state": {              
                "admin-status": "UP",              
                "counters": {                
                    "in-broadcast-pkts": 0,                
                    "in-discards": 0,                
                    "in-errors": 0,                
                    "in-multicast-pkts": 0,                
                    "in-octets": 0,                
                    "in-unicast-pkts": 0,                
                    "in-unknown-protos": 0,                
                    "out-broadcast-pkts": 0,                
                    "out-discards": 0,                
                    "out-errors": 0,                
                    "out-multicast-pkts": 0,                
                    "out-octets": 0,                
                    "out-unicast-pkts": 0              
                },              
            "description": "",              
            "enabled": true,              
            "ifindex": 1000004,              
            "index": 1000004,              
            "last-change": 3800,              
            "name": "Default",              
            "oper-status": "DOWN"            
            }          
           }        
          ]      
        }    
    }  
]}

Sample request from client with content = all

GET  /rest/restconf/data/openconfig-interfaces:interfaces/interface=1?content=all
    HTTP/1.1
    Host: 10.68.5.64 

...which is the same as

GET  /rest/restconf/data/openconfig-interfaces:interfaces/interface=1
    HTTP/1.1
    Host: 10.68.5.64

Sample response data from server

{  
"openconfig-interfaces:interface": [    
{      
    "config": {        
        "description": "",        
        "enabled": true,        
        "mtu": 1500,        
        "name": "1",        
        "type": "ethernetCsmacd"      
     },      
    "hold-time": {        
        "config": {          
            "down": 0,          
            "up": 0        
        },        
        "state": {          
            "down": 0,          
            "up": 0        
        }      
    },      
    "name": "1",      
    "openconfig-if-ethernet:ethernet": {        
        "config": {          
            "auto-negotiate": true,          
            "duplex-mode": "FULL",          
            "enable-flow-control": false,          
            "mac-address": "00:04:96:9A:4F:4F",          
            "port-speed": "SPEED_UNKNOWN"        
        },        
        "openconfig-vlan:switched-vlan": {          
            "config": {            
                "access-vlan": 1,            
                "interface-mode": "ACCESS"          
            },          
            "state": {            
                "access-vlan": 1,            
                "interface-mode": "ACCESS"          
            }        
        },        
        "state": {          
            "auto-negotiate": true,          
            "counters": {            
                "in-8021q-frames": 0,            
                "in-crc-errors": 0,            
                "in-fragment-frames": 0,            
                "in-jabber-frames": 0,            
                "in-mac-control-frames": 0,            
                "in-mac-pause-frames": 0,            
                "in-oversize-frames": 0,            
                "out-8021q-frames": 0,            
                "out-mac-control-frames": 0,            
                "out-mac-pause-frames": 0          
            },          
            "duplex-mode": "FULL",          
            "effective-speed": 0,          
            "enable-flow-control": false,          
            "hw-mac-address": "00:04:96:9A:4F:4F",          
            "mac-address": "00:04:96:9A:4F:4F",          
            "negotiated-duplex-mode": null,          
            "negotiated-port-speed": "SPEED_UNKNOWN",          
            "port-speed": "SPEED_UNKNOWN"        
        }      
       },      
        "state": {        
            "admin-status": "UP",        
            "counters": {          
                "in-broadcast-pkts": 0,          
                "in-discards": 0,          
                "in-errors": 0,          
                "in-multicast-pkts": 0,          
                "in-octets": 0,          
                "in-unicast-pkts": 0,          
                "in-unknown-protos": 0,          
                "last-clear": "2020-03-16T07:40:46Z",          
                "out-broadcast-pkts": 0,          
                "out-discards": 0,          
                "out-errors": 0,          
                "out-multicast-pkts": 0,          
                "out-octets": 0,          
                "out-unicast-pkts": 0        
            },        
            "description": "",        
            "enabled": true,        
            "ifindex": 1001,        
            "last-change": 3800,        
            "mtu": 1500,        
            "name": "1",        
            "openconfig-platform-transceiver:physical-channel": [],        
            "openconfig-platform:hardware-port": "00:04:96:9A:4F:4F",        
            "oper-status": "DOWN",        
            "type": "ethernetCsmacd"      
           },      
           "subinterfaces": {        
                "subinterface": [          
                {            
                    "config": {              
                        "description": "",              
                        "enabled": true,              
                        "index": 1000004,              
                        "name": "Default"            
                    },            
                "index": 1000004,            
                "state": {              
                    "admin-status": "UP",              
                    "counters": {                
                        "in-broadcast-pkts": 0,                
                        "in-discards": 0,                
                        "in-errors": 0,                
                        "in-multicast-pkts": 0,                
                        "in-octets": 0,                
                        "in-unicast-pkts": 0,                
                        "in-unknown-protos": 0,                
                        "out-broadcast-pkts": 0,                
                        "out-discards": 0,                
                        "out-errors": 0,                
                        "out-multicast-pkts": 0,                
                        "out-octets": 0,                
                        "out-unicast-pkts": 0              
                    },              
                    "description": "",              
                    "enabled": true,              
                    "ifindex": 1000004,              
                    "index": 1000004,              
                    "last-change": 3800,              
                    "name": "Default",              
                    "oper-status": "DOWN"            
                }          
               }        
              ]      
            }    
        }  
]}