Users Guide

Table Of Contents
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.
REST Token-Based Authentication Limitations
The following limitations are applicable in 10.5.1:
REST token authentication is disabled when FIPS mode is enabled.
Acquire new token
You can acquire a new token by calling the Login REST API. A successful Login API call using the basic authentication generates
a new set of token.
$ curl -X GET -k -u admin:admin -H "Content-Type: application/json" https://$TARGET/
login
{
"access_token": "abc.123.xyz",
"token_type": "bearer",
"refresh_token": "efg.456.uvw"
}
On successful login, JSON data returns 'access_token' and 'refresh_token' as keys. You can parse the data and save the token
values for subsequent requests.
$ export ACCESS_TOKEN="abc.123.xyz"
$ export REFRESH_TOKEN="efg.456.uvw"
RESTCONF API
1513