Thanks Jay,
That works for me, like I say it's a lot cleaner than fudging around trying to read command line output via SSH!
These are really probably two Python questions but I'll ask just in case you have any advice:
The JSON I get back converts into something Python understands using .json(), but it's slightly awkward because what I actually get back is a bunch of dictionaries like <snip>{"Item" : "AP State", "Value" : "Running"}<snip> so I can't directly get at "Running" using the Key "AP State", I have to decant what comes back into a dictionary so it is like {"AP State" : "Running"}, then it's much easier to use. I just wondered if this is common with JSON and whether there is some something that can do that final conversion for me (I can do it, it's just a little extra step which I'm wondering if I need to do myself).
And the other question was - I see there is an API method for SCPing an AOS image into flash, that would be something I'd love to automate. But with something like this I'm a bit concerned about how do I know when the file transfer has taken place? And if it has been successful?
Like I say, I know these aren't specifically about the API, but any help appreciated!
Thanks again,
Guy
------------------------------
Guy Goodrick
------------------------------
Original Message:
Sent: Nov 18, 2020 05:29 PM
From: Jay Pathak
Subject: AOS8 API getting AP details
Hi Guy,
The one you mentioned is the correct approach to execute this operation. You need to use the respective CLI based show command while using the Showcommand API and parse its output to build your workflow further. At this moment we do not have a direct API endpoint to perform this operation. However, I hope the Showcommand API helps in building this workflow.
Thanks,
Jay
------------------------------
Jay Pathak
------------------------------