Get Service
Returns the state of a service.
Request
URLURL
Path Parameters
Path Parameters
identifier of the service whose state is being queried. The parameter must be an identifier for the resource type: com.vmware.vcenter.services.Service.
Header Parameters
Header Parameters
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id example
"b00db39f948d13ea1e59b4d6fce56389"
Authentication
Response
Response BodyResponse Body
Service Info structure.
{
"description_key": "string",
"health": "DEGRADED",
"health_messages": [
{
"args": [
"string"
],
"default_message": "string",
"id": "string",
"localized": "string",
"params": {
"key": {
"d": 0,
"dt": "string",
"format": "SHORT_DATE",
"i": 0,
"l": {
"id": "string",
"params": "StdLocalizationParam Object"
},
"precision": 0,
"s": "string"
}
}
}
],
"name_key": "string",
"startup_type": "MANUAL",
"state": "STARTING"
}
Service description key. Can be used to lookup resource bundle
Service name key. Can be used to lookup resource bundle
The Service.StartupType enumerated type defines valid Startup Type for vCenter Server services.
MANUAL : Service Startup type is Manual, thus issuing an explicit start on the service will start it.
AUTOMATIC : Service Startup type is Automatic, thus during starting all services or issuing explicit start on the service will start it.
DISABLED : Service Startup type is Disabled, thus it will not start unless the startup type changes to manual or automatic.
Possible values are: MANUAL , AUTOMATIC , DISABLED
The Service.State enumerated type defines valid Run State for services.
STARTING : Service Run State is Starting, it is still not functional
STOPPING : Service Run State is Stopping, it is not functional
STARTED : Service Run State is Started, it is fully functional
STOPPED : Service Run State is Stopped
Possible values are: STARTING , STOPPING , STARTED , STOPPED
The Service.Health enumerated type defines the possible values for health of a service.
DEGRADED : Service is in degraded state, it is not functional.
HEALTHY : Service is in a healthy state and is fully functional.
HEALTHY_WITH_WARNINGS : Service is healthy with warnings.
Possible values are: DEGRADED , HEALTHY , HEALTHY_WITH_WARNINGS
Localizable messages associated with the health of the service This field is optional and it is only relevant when the value of Service.Info.state is STARTED.
Errors
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.
‘Default’ means this response is used for all HTTP codes that are not covered individually for this operation.
Code Samples
PowerCLI Client SDK Example
cURL Command
Vendor Extensions
x-vmw-doc-deprecated-method: get
x-vmw-doc-deprecated-path: /rest/vcenter/services/{service}
x-vmw-doc-operation: get