Get Deployed Service Package Health Using Policy

Gets the information about health of service package for a specific application deployed on a Service Fabric node using the specified policy.

Gets the information about health of a service package for a specific application deployed on a Service Fabric node. using the specified policy. Use EventsHealthStateFilter to optionally filter for the collection of HealthEvent objects reported on the deployed service package based on health state. Use ApplicationHealthPolicy to optionally override the health policies used to evaluate the health. This API only uses 'ConsiderWarningAsError' field of the ApplicationHealthPolicy. The rest of the fields are ignored while evaluating the health of the deployed service package.

Request

Method Request URI
POST /Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/GetHealth?api-version=6.0&EventsHealthStateFilter={EventsHealthStateFilter}&timeout={timeout}

Parameters

Name Type Required Location
nodeName string Yes Path
applicationId string Yes Path
servicePackageName string Yes Path
api-version string Yes Query
EventsHealthStateFilter integer No Query
timeout integer (int64) No Query
ApplicationHealthPolicy ApplicationHealthPolicy No Body

nodeName

Type: string
Required: Yes

The name of the node.


applicationId

Type: string
Required: Yes

The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the "~" character. For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions.


servicePackageName

Type: string
Required: Yes

The name of the service package.


api-version

Type: string
Required: Yes
Default: 6.0

The version of the API. This parameter is required and its value must be '6.0'.

Service Fabric REST API version is based on the runtime version in which the API was introduced or was changed. Service Fabric runtime supports more than one version of the API. This is the latest supported version of the API. If a lower API version is passed, the returned response may be different from the one documented in this specification.

Additionally the runtime accept any version that is higher than the latest supported version up to the current version of the runtime. So if the latest API version is 6.0, but if the runtime is 6.1, in order to make it easier to write the clients, the runtime will accept version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 version.


EventsHealthStateFilter

Type: integer
Required: No
Default: 0

Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag-based enumeration, so the value could be a combination of these values, obtained using the bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.

  • Default - Default value. Matches any HealthState. The value is zero.
  • None - Filter that doesn't match any HealthState value. Used in order to return no results on a given collection of states. The value is 1.
  • Ok - Filter that matches input with HealthState value Ok. The value is 2.
  • Warning - Filter that matches input with HealthState value Warning. The value is 4.
  • Error - Filter that matches input with HealthState value Error. The value is 8.
  • All - Filter that matches input with any HealthState value. The value is 65535.

timeout

Type: integer (int64)
Required: No
Default: 60
InclusiveMaximum: 4294967295
InclusiveMinimum: 1

The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds.


ApplicationHealthPolicy

Type: ApplicationHealthPolicy
Required: No

Describes the health policies used to evaluate the health of an application or one of its children. If not present, the health evaluation uses the health policy from application manifest or the default health policy.

Responses

HTTP Status Code Description Response Schema
200 (OK) A successful operation will return 200 status code and the health information of the deployed service package for a specific node and application.
DeployedServicePackageHealth
All other status codes The detailed error response.
FabricError