You must start a valid session by sending a basic authentication request to the Representational State Transfer Configuration Protocol (RESTCONF) server, before you can start making API calls. There are no limits on the number of requests per session.
curl -k -d '{"username":"rwa","password":"rwa"}' -H "Content-Type: application/json" -X POST http://<Device_IP_Address>:8080/auth/token
{"token": "IjcyNzc2MS03Mjc3NjEtNmM2ZjYzNjE2Yy0zMTMwMmUzMjJlMzMzOTJlMzUzOCI. YtUL8Q.cBUfBcF5FumXQTEn1Dp0Ak0VHnY"}
Note
The token is valid for a day and can be used to send subsequent requests. Include the token in the request header for all subsequent API calls.curl -X GET http://<Device_IP_Address>/rest/restconf/data/openconfig_vlan:vlans/vlan=1/config \ -H 'Content-Type: application/json' \ -H 'Cookie: x-auth-token=eyJhbGciOiJIUzI1NiIsImV4cCI6MTU3MDE5MDk3OSwiaWF0IjoxNTcwMTA0NTc5fQ. eyJ1c2VybmFtZSI6ImFkbWluIiwiYWNjZXNzX2xldmVsIjoiYWRtaW4ifQ. I2uaCxQ8v5-ShAaZHwUbS76e9LZ22Who4icgLBwmVc8'