SP.Site.runHealthCheck Method (sp.js)

Runs a health check as follows. (The health rules referenced below perform an implementation-dependent check on the health of a site collection)

If bRunAlways is true, rules are always run by this method, and the results are returned. If false, cached results from a recent previous run can be returned instead.

If bRepair is true, runs the specified rules in repair mode. In this case, and if a given rule is repairable, an attempt will be made to repair issues found by the rule, and the results from that attempted repairs are returned. If bRepair is false, an attempt to repair issues found is not made.

If ruleId is not an empty GUID, runs the specified site collection health rule and returns a summary of the results. If ruleId is an empty GUID, runs all of the site collection health rules and returns a summary of the results.

Last modified: December 02, 2013

Applies to: apps for SharePoint | SharePoint Foundation 2013 | SharePoint Server 2013

SP.Site.runHealthCheck()

Parameters

  • ruleId
    Specifies the rule or rules to be run. If the value is an empty GUID, all rules are run, otherwise only the specified rule is run.

  • bRepair
    Specifies whether repairable rules are to be run in repair mode.

  • bRunAlways
    Specifies whether the rules will be run as a result of this call or cached results from a previous run can be returned.

Return value

Microsoft.SharePoint.Administration.SiteHealth.SiteHealthSummary

REST resource endpoint

Endpoint URI structure

http://<sitecollection>/<site>/_api/site/runHealthCheck(ruleId,bRepair,bRunAlways)

HTTP requests

This resource supports the following HTTP commands:

  • POST

POST syntax

POST http://<sitecollection>/<site>/_api/site/runHealthCheck(ruleId,bRepair,bRunAlways)

Resource parameters

  • ruleId

  • bRepair

  • bRunAlways