Users Guide

Table Of Contents
Error
{"ietf-restconf:errors":{"error":[{"error-type":"rpc","error-tag":"invalid-value","error-
app-tag":"data-invalid","error-path":"/classifier-entry","error-message":"unknown resource
instance","error-info":{"bad-value":"/restconf/data/dell-diffserv-classifier:classifier-
entry=test","error-number":388}}]}}
POST request
curl -i -k -H "Accept: application/json" -H "Content-Type: application/json" -u
$USER_NAME:$PASSWORD -d '{"dell-diffserv-classifier:classifier-entry":
[{"name":"test","mtype":"qos","match":"match-any"}]}' -X POST https://$MGMT_IP/restconf/
data
Configuration notes
The "request-instance test failed" indicates that there is no target resource.
To create the target resource, use the POST request:
curl -i -k -H "Accept: application/json" -H "Content-Type:
application/json" -u $USER_NAME:$PASSWORD -X POST -d '{}'
https://$MGMT_IP/restconf/data/dell-qos:trust-map-dot1p-to-tc-entry
To check if a target resource is available, use the GET request:
curl -i -k -H "Accept: application/json" -H "Content-Type:
application/json" -u $USER_NAME:$PASSWORD -X GET
https://$MGMT_IP/restconf/data/dell-qos:trust-map-dot1p-to-tc-entry
Obtain RESTCONF API documentation from OS10
OAS files (oas.tgz) are available in the support-bundle directory in OS10. You can download the OAS files using the
standard copy command.
copy supportbundle://oas.tgz <remote-file>
To view the JSON files, decompress and untar the oas.tgz file.
tar -zxvf oas.tgz
All the OAS JSON files are extracted inside the html folder. You can import the OAS files into RESTCONF tools (Swagger /
Postman) to use it.
Translated RESTCONF requests example
Config command
OS10# cli mode rest-translate
Commands executed in this mode will not alter current system state.
Do you want to proceed? [confirm yes/no]:yes
REST-TRANSLATE-OS10# configure terminal
CLI command:
configure terminal
Restconf request(s):
curl -i -k -H "Accept: application/json" -u $USER_NAME:$PASSWORD -X GET https://$MGMT_IP/
restconf/data/dell-mgmt-cm:cms
REST-TRANSLATE-OS10(config)# interface ethernet 1/1/1
CLI command:
RESTCONF API
1517