[curl]
|
curl -c cjar -k -X POST -H "Content-Type: application/json" -d '{"data": [ "root","0penBmc" ] }' https://${bmc_ip}/login
|
For example
[curl in Linux]
$ curl -c cjar -k -X POST -H "Content-Type: application/json" -d '{"data": [ "root","0penBmc" ] }' https://192.168.88.38/login
{
"data": "User 'root' logged in",
"message": "200 OK",
"status": "ok"
}
{
"data": "User 'root' logged in",
"message": "200 OK",
"status": "ok"
}
Logout
[curl]
|
curl -c cjar -b cjar -k -X POST -H "Content-Type: application/json" -d '{"data": [ ] }' https://${bmc_ip}/logout
|
For example
[curl in Linux]
$ curl -c cjar -b cjar -k -X POST -H "Content-Type: application/json" -d '{"data" [ ] }' https://192.168.88.38/logout
{
"data": "User 'root' logged out",
"message": "200 OK",
"status": "ok"
}
{
"data": "User 'root' logged out",
"message": "200 OK",
"status": "ok"
}
Reference
[1] "OpenBMC" https://github.com/openbmc/
[2] "OpenBMC REST cheat sheet" https://github.com/openbmc/docs/blob/master/REST-cheatsheet.md
[3] "Host Management with OpenBMC" https://github.com/openbmc/docs/blob/master/host-management.md
[4] "OpenBMC REST API" https://github.com/openbmc/docs/blob/master/rest-api.md
[1] "OpenBMC" https://github.com/openbmc/
[2] "OpenBMC REST cheat sheet" https://github.com/openbmc/docs/blob/master/REST-cheatsheet.md
[3] "Host Management with OpenBMC" https://github.com/openbmc/docs/blob/master/host-management.md
[4] "OpenBMC REST API" https://github.com/openbmc/docs/blob/master/rest-api.md
Last Updated: 23-02-2018
No comments:
Post a Comment