VMware Cloud Community
mpwerner
Enthusiast
Enthusiast

VCSA - Using VAMI API to start / stop ssh, bash, etc.

Hi, Been trying to figure out how to use the VAMI API commands to start / stop VCSA services such as SSH, Bash, etc., via PowerCLI. Is there anyone that knows how to do this?

Thank you!

0 Kudos
1 Reply
doskiran
Enthusiast
Enthusiast

Use Appliance APIs to enable and disable services.

i.e,

  1. List Services : GET - https://{vCenter}/api/appliance/services
  2. Start Service : POST - https://{vCenter}/api/appliance/services/{service}?action=start
  3. Stop Service: POST - https://{vCenter}/api/appliance/services/{service}?action=stop

service = "sshd"

 

0 Kudos