Users Guide

Table Of Contents
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="10">
<ok/>
</rpc-reply>
OS10(config)# do no debug cli netconf
RESTCONF API Examples
Some common RESTCONF API operations include configuring system hostname, and interfaces such as loopback interface. The
examples in this section use curl commands to send the HTTPS request.
System
Configure system hostname
RESTCONF
endpoint
/restconf/data/dell-system:system/hostname
JSON content
{
"hostname":"MyHost"
}
Parameters
hostname string Enter the hostname of the system. The default is OS10.
Example
curl -X PATCH -k -u admin:admin -H "Content-Type: application/json"
https://10.11.86.113/restconf/data/dell-system:system/hostname
-d '{"hostname":"MyHost"}'
Interface
Configure a loopback interface
RESTCONF
endpoint
/restconf/data/interfaces
JSON content
{
"interface": [{
"type": "iana-if-type:softwareLoopback",
"enabled": true,
"description":"loopback interface",
"name":"loopback1"}]
}
Parameters
type string Enter iana-if-type:softwareLoopback for a loopback interface.
enabled bool Enter true to enable the interface; enter false to disable.
description string Enter a text string to describe the interface. A maximum of 80
alphanumeric characters.
name string Enter loopback loopback-id of the interface, loopback-id is from 0 to
16383.
Example
curl -X POST -k -u admin:admin "https://10.11.86.113/restconf/data/
interfaces"
-H "accept: application/json" -H "Content-Type: application/json"
-d '{"interface": [{"type": "iana-if-type:softwareLoopback", "enabled":
true,
"description":"loopback interface", "name":"loopback1"}]}'
1520 RESTCONF API