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
PATCH failure case
You can perform a POST request if a PATCH request fails with a require-instance test failed error message when a PATCH
request is made to a non-existing object. To configure the PATCH, change the operation from PATCH to POST.
The following is an example of a PATCH and POST request:
PATCH request
curl -i -k -H "Accept: application/json" -H "Content-Type: application/json" -u
$USER_NAME:$PASSWORD -d '{"dell-bgp:bgp-router":{"vrf":[{"vrf-name":"default","local-as-
number":"200"}]}}' -X PATCH https://$MGMT_IP/restconf/data/dell-bgp:bgp-router
Error
{"ietf-restconf:errors": {"error": [{"error-type":"rpc","error-tag":"data-
missing","error-app-tag":"instance-required","error-message":"require-instance test
failed","error-info": {"error-number":350}}]}
POST request
curl -i -k -H "Accept: application/json" -H "Content-Type: application/json" -u
$USER_NAME:$PASSWORD -d '{"dell-bgp:bgp-router":{"vrf":[{"vrf-name":"default","local-as-
number":"200"}]}}' -X POST https://$MGMT_IP/restconf/data/dell-bgp:bgp-router
Configuration notes
The "request-instance test failed" indicates that there is no target resource.
To create the target resource (dell-qos:trust-map-dot1p-to-tc-entry), 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.
1744
RESTCONF API