Posted on June 13, 2020 12:39 am
 |  Asked by Luong Vu
 |  52 views
RESOLVED
0
0
Print Friendly, PDF & Email

Hi Everyone,

I’m using a Restful API client (Postman) to get PowerSupply serial number from CVP but it failed even PSW S/N contained in that.

https://42.114.255.xx/api/v1/rest/JPE19210271/Sysdb/hardware/entmib/fixedSystem/powerSupplySlot/{“value”:1}?pretty

{
    “notifications”: []
}

Please help me how to get  it. And is there anyone had ever been using Client API to execute Configlet through CVP to change device configuration?

Attachments:
0
Posted by Tamas Plugor
Answered on June 13, 2020 12:52 am

Hi Luong,

That REST API was never supported, and it's best not to use it as we've switched to a more complex path elements structure starting in 2019.1.0, so most paths will not work anymore as they are not simple strings as you saw. In REST API world usually you cannot use special characters in the URL directly, they need to be URL encoded, but you won't be able to query those paths even with URL encoding. Officially supported APIs for that are coming in the next major release.

The provisioning REST APIs are supported (that you can find documentation for on the Settings menu titled CloudVision API Documentation) and used by many. We also have a wrapper and ansible modules and netdevops examples for that. Please check out the following repos:

https://github.com/aristanetworks/cvprac
https://github.com/aristanetworks/ansible-cvp
https://github.com/aristanetworks/ansible-avd
https://github.com/aristanetworks/netdevops-examples

HTH,
Tamas

0
Posted by Luong Vu
Answered on June 15, 2020 3:29 am

Hi Tamas,

Thanks for your detailed explanation! I'm clear now.

Post your Answer

You must be logged in to post an answer.