Hi Luc,
below is the screenshot from restapi documentation to stop service .do yu think its the correct representation below
as it shoudbe
$services=get-cisservice -name "com.vmware.appliance.services"
$services.stop("service")
No, that is correct.
With POST you are using an URI where the servicename is part of that URI
When using Get-CisService, you are using a method.
Where the name of the service is a parameter to that method.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
That seems to be correct.
Doesn't it work for you?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
i think it should be like below
POST https://{server}/rest/appliance/services/stop{service}
as stop method needs "service" as parh parameter.
No, that is correct.
With POST you are using an URI where the servicename is part of that URI
When using Get-CisService, you are using a method.
Where the name of the service is a parameter to that method.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
thanks .actually using get-ciservice ...
as yu mentioned with post it should be part of uri so it should be correct.
is it correct to represent in picture wherein the connection from client to server is established using connect-cisserver over http.??
That is correct.
The Connect-CisServer connects to the vSphere Automation SDK server, which is an endpoint on the vCenter.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
just thpught of asking where should be http in this diagram
Since the calls to the REST API start from your station, it is between your station and the vSphere Automation SDK server endpoint on the vCenter
Note that it is HTTPS not HTTP
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
thanks Luc.