Command Line Execution via API

securityeng969
New here

Command Line Execution via API

Hi Everyone,

 

I'm trying to automate some compliance tests and have noticed the Command Line functionality within the System Manager section.

 

The information I need is not available via the API, however it would be via execution of commands on agents.

 

Is it possible to execute command line commands on SM agents via the API?

 

Thanks in advance.

7 REPLIES 7
PhilipDAth
Kind of a big deal

If you are referring to Windows and Mac - yes. You can select them all at once, and run a command against the whole lot.

Which API endpoint can I use to do this? I could not find it.

Oh I see - sorry I am not aware of an API endpoint to do this. You can only do it do it via the dashboard.

That makes me sad. I need to extract settings and other configs from each box via my Python script. I was hoping the SM agent would be able to handle this since you can do this manually via the dashboard.

 

Manual work isn't going to cut it.

Why don't you run a script via Systems Manager and have it post the results back somewhere for your Python script to process?  Might not be as nice, but should be workable.

Thanks I'll look into that as an option. Appreciate the help 🙂

Also be sure to make a wish from the most relevant page in Meraki Dashboard, and also state your use case and get it to your local Meraki reps so they can follow the feature request process. 

 

The API is evolving rapidly and new endpoints are being developed and existing ones are being enhanced all the time. When you go to Help > API Docs, notice there is now a "changelog" link at the top, check it out here: https://create.meraki.io/whats-new/

 

Get notified when there are additional replies to this discussion.
Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.