You must start a valid session by sending a basic authentication request to the RESTCONF server, before you can start making API calls. There are no limits on the number of requests per session.
curl -X POST http://<Device_IP_Address>/auth/token \ -H 'Content-Type: application/json' \ -d '{ "username": "<YOUR_USERNAME_HERE>", "password": "<YOUR_PASSWORD_HERE>" }'
{ "duration": 86400, "token": "eyJhbGciOiJIUzI1NiIsImV4cCI6MTU3MDE5MDk3OSwiaWF0IjoxNTcwMTA0NTc5fQ. eyJ1c2VybmFtZSI6ImFkbWluIiwiYWNjZXNzX2xldmVsIjoiYWRtaW4ifQ. I2uaCxQ8v5-ShAaZHwUbS76e9LZ22Who4icgLBwmVc8" }
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'