Answers.Body: <p>Your example of calling <code>System.check</code> with an empty <code>$params</code> array should work. For example, this is what I get if I call the API from <a href="https://github.com/civicrm/cv" rel="nofollow noreferrer">the command line</a>:</p>
  
  <pre><code>$ cv php:eval 'return civicrm_api3("System","check", array());'
  {
      "is_error": 0,
      "version": 3,
      "count": 6,
      "values": {
          "1": {
              "name": "checkExtensionUpgrades",
              "message": "Extension upgrades are pending.  Please visit &lt;a href=\"/civicrm/admin/extensions/upgrade?reset=1\"&gt;the upgrade page&lt;/a&gt; to run them.",
              "title": "Run Extension Upgrades",
              "severity": "error",
              "severity_id": 4,
              "is_visible": 1,
              "icon": "fa-plug",
              "id": 1
          },
          ...
  </code></pre>
  
  <p>(For other media, you can use the API Explorer to get code snippets.)</p>
  
  <p>There are a lot of checks, and it's possible that they're slow on some systems. Alternatively, maybe one of the checks has a bug, relies on an incorrect assumption about the environment or data, or has an interaction with third-party code?</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-23T16:59:42.173Z
Answers.Text: So do not call it directly, but via civicrm_api3("System","check", array()). Would be nice if the examples in ../civicrm/civicrm/api/v3/examples/System/. showed the parameters to run the other System.php methods. Thank you Tim
Answers.UserDisplayName: Codedogs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-23T20:18:16.750Z
Answers.Text: Good point, one does have to use `civicrm_api3()`. I take that for granted. This may be interesting: https://docs.civicrm.org/dev/en/master/api/usage/
Answers.UserDisplayName: Tim Otten
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-24T15:21:55.157Z
Answers.Text: Another API action called HELP is needed. Then civicrm_api3("System", "HELP", array()) could display all possible actions and parameters. By the way CHECK, is not in that API action list nor anywhere else. Self documenting code, what a concept.
Answers.UserDisplayName: Codedogs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-22T23:08:25.943Z
Answers.LastActivityDate: 2017-03-22T23:08:25.943Z
Answers.UserDisplayName: Tim Otten
Body: <p>What are the valid parameters to pass to civicrm_api3_system_check($params)?</p>
  
  <p>Passing $params = false or $params = array() causes an infinite loop despite my try catch.</p>
  
  <p><strong>../civicrm/civicrm/api/v3/System.php</strong> gives no hints</p>
  
  <p><strong>../civicrm/civicrm/api/v3/examples/System/Flush.php</strong> only shows how to use System flush</p>
  
Tags: <wordpress><api><4.7>
Title: How does one call civicrm_api3_system_check API
ThreadText: # How does one call civicrm_api3_system_check API
  
  (Asked by: username_0 on 2017-03-22)
  
  What are the valid parameters to pass to civicrm\_api3\_system\_check($params)?
  
  Passing $params = false or $params = array() causes an infinite loop despite my try catch.
  
  **../civicrm/civicrm/api/v3/System.php** gives no hints
  
  **../civicrm/civicrm/api/v3/examples/System/Flush.php** only shows how to use System flush
  
  **Tags:** wordpress, api, 4.7
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-03-22. Score: 2 | Accepted answer
  
  Your example of calling `System.check` with an empty `$params` array should work. For example, this is what I get if I call the API from [the command line](https://github.com/civicrm/cv):
  
  ```
  $ cv php:eval 'return civicrm_api3("System","check", array());'
  {
      "is_error": 0,
      "version": 3,
      "count": 6,
      "values": {
          "1": {
              "name": "checkExtensionUpgrades",
              "message": "Extension upgrades are pending.  Please visit <a href=\"/civicrm/admin/extensions/upgrade?reset=1\">the upgrade page</a> to run them.",
              "title": "Run Extension Upgrades",
              "severity": "error",
              "severity_id": 4,
              "is_visible": 1,
              "icon": "fa-plug",
              "id": 1
          },
          ...
  
  ```
  
  (For other media, you can use the API Explorer to get code snippets.)
  
  There are a lot of checks, and it's possible that they're slow on some systems. Alternatively, maybe one of the checks has a bug, relies on an incorrect assumption about the environment or data, or has an interaction with third-party code?
  
  > **Comments:**
  > **username_0**: So do not call it directly, but via civicrm_api3("System","check", array()). Would be nice if the examples in ../civicrm/civicrm/api/v3/examples/System/. showed the parameters to run the other System.php methods. Thank you Tim  
  > **username_1**: Good point, one does have to use `civicrm_api3()`. I take that for granted. This may be interesting: https://docs.civicrm.org/dev/en/master/api/usage/  
  > **username_0**: Another API action called HELP is needed. Then civicrm_api3("System", "HELP", array()) could display all possible actions and parameters. By the way CHECK, is not in that API action list nor anywhere else. Self documenting code, what a concept.  
  
  ---
  
  