Get Services
If vSphere APIs begin with /rest (vs /api), any maps are consumed/returned instead as arrays of objects, each containing a key and a value property field.
Returns the state of a service.
Request
URLURL
https://{api_host}/rest/appliance/services/{service}
Parameters
Parameters
string
service
Required
identifier of the service whose state is being queried.
The parameter must be an identifier for the resource type: com.vmware.appliance.services.
Header Parameters
Header Parameters
string
vmware-api-session-id
Required
Required session ID, obtained by first calling Create Session API
Example: b00db39f948d13ea1e59b4d6fce56389
Response
Response
Response BodyResponse Body
200 OK returns
ServicesGetResponseBody
of type application/json
Service Info structure.
{
"value": {
"description": "string",
"state": "enum"
}
}
cURL Command
curl -H "vmware-api-session-id: b00db39f948d13ea1e59b4d6fce56389" https://{api_host}/rest/appliance/services/{service}
Errors
404
com.vmware.vapi.std.errors.not_found : if the service associated with service does not exist. | com.vmware.vapi.std.errors.error : if any other error occurs during the execution of the operation.