Users Guide

Table Of Contents
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:
interface ethernet 1/1/1
Restconf request(s):
curl -i -k -H "Accept: application/json" -H "Content-Type: application/
json" -u $USER_NAME:$PASSWORD -d '{"ietf-interfaces:interfaces":{"interface":
[{"name":"ethernet1/1/1","type":"iana-if-type:ethernetCsmacd"}]}}' -X PATCH https://
$MGMT_IP/restconf/data/ietf-interfaces:interfaces
REST-TRANSLATE-OS10(conf-if)# no ip ospf 1 area 100"
CLI command:
no ip ospf 1 area 100
Restconf request(s):
curl -i -k -H"Accept: application/json"-H"Content-Type: application/json"-u $USER_NAME:
$PASSWORD -X DELETE https://$MGMT_IP/restconf/data/ietf-interfaces:interfaces/interface/
dell-ospf-v2:ospf-info/dell-ospf-v2:proc-id
curl -i -k -H"Accept: application/json"-H"Content-Type: application/json"-u $USER_NAME:
$PASSWORD -X DELETE https://$MGMT_IP/restconf/data/ietf-interfaces:interfaces/interface/
dell-ospf-v2:ospf-info/dell-ospf-v2:area-id
curl -i -k -H"Accept: application/json"-H"Content-Type: application/json"-u $USER_NAME:
$PASSWORD -X DELETE https://$MGMT_IP/restconf/data/ietf-interfaces:interfaces/interface/
dell-ospf-v2:ospf-info
NOTE: Container removal is valid only when it is empty.
REST Token-Based Authentication
The REST Token-Based Authentication feature uses token-based authentication. Every OS10 REST API call requires basic
authentication over HTTPs (with HTTP header 'Authorization: Basic <credentials>'). Instead a token is obtained
first by calling the Login REST API using the basic authentication. You can use this token in further REST requests using HTTP
Bearer Authentication (with HTTP header 'Authorization: Bearer <token>').
NOTE: Token-based authentication is optional, and the user can use the basic authentication for each REST API request.
Sample response from login API:
{
"access_token": <access token>,
"token_type": "bearer",
"refresh_token": <refresh token>
}
Access token is valid for the configured amount of time, from the time token is issued.
Refresh can be done only for the configured number of times. After that new set of tokens needs to be acquired using basic
authentication.
Refresh token is valid for the configured validity time of access token that is multiplied by the configured refresh limit.
RESTCONF API
1747