API - Execute Commands


Is anyone successful in running a command via the Console API through api/3/administration/commands?

When I include “command”: “show host info” within the Body of the Request through postman, I’m getting the below.
“status”: 500,
“message”: “An error was encountered executing the specified command. {0}”,

Thinking that my string is incorrect - any help would be appreciated.

drop the info and just do “show host”

Same issue - its occurring for any commands,

It could be passed as the wrong data type. I’m not in front of the documentation right now but it may be looking for text but you’re passing it as JSON but in text? I would have to see the whole code to understand.

Post a screenshot of postman where you define the body

I’m doing it wrong probably but screenshot attached
2023-03-02 10_13_54-Postman

try dropping the double quotes and command:
Screenshot 2023-03-01 at 7.47.32 PM

1 Like

Knew I was doing something wrong. Thanks!

@sstevetest beat me to it, sorry i didnt read your original post correctly to see the command: portion being passed.

No worries, thanks for your help also! Cheers