Is there some way to be able to execute CLI commands from the API and pull the files or output? It doesn’t seem there is a way to do it so I wanted to see if anyone has other methods that they have found that would work for this use case?
Is there some way to be able to execute CLI commands from the API and pull the files or output? It doesn’t seem there is a way to do it so I wanted to see if anyone has other methods that they have found that would work for this use case?
Hi
we are facing the same issue and we found a workaround but it is somewhat cumbersome.
Carsten
From here you can pull the command data from NetBrain
Remember response Output is baseline (cache) data and you might need to add your specific CLI command into a benchmark task to start collecting the data for it!
If you ask for live execution for CLI command this can be done via our Triggered Automation Framework to trigger an NI that contains your command and the output could be parsed into API response.
Reach out to your assigned Automation Engineer or Sales Rep to get more help.
@Marco, can you explain how the data could be parsed into the API response? This is actually a surprising feature that I didn’t realize you could do. I have Trigger APIs, but I am not certain how to get the data out of it. I’d like to be able to pull a device’s mac address table for example, but I am not sure how to do this via the API.
https://github.com/NetBrainAPI/NetBrain-REST-API-R11.1a/blob/main/REST%20APIs%20Documentation/TAF%20(Triggered%20Automation%20Framework)/3%20-%20Get%20Trigger%20Result%20API.md
And in case here is the full triggered automaton framework guide:
https://github.com/NetBrainAPI/NetBrain-REST-API-R11.1a/blob/main/REST%20APIs%20Documentation/TAF%20(Triggered%20Automation%20Framework)/TAF%20User%20Guide/TAF%20User%20Guide.md
Send me Email marco.speckert@netbraintech.com and I can find out how to better assist if there a still open questions
If you “just” want to receive NCT Data like MAC Table you could easier use this API to get your data:
https://github.com/NetBrainAPI/NetBrain-REST-API-R11.1a/blob/main/REST%20APIs%20Documentation/Devices%20Management/Get%20Device%20Data%20API.md
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.