+
+/**
+ * System.Check API
+ *
+ * @param array $params
+ * @return array API result descriptor; return items are alert codes/messages
+ * @see civicrm_api3_create_success
+ * @see civicrm_api3_create_error
+ * @throws API_Exception
+ */
+function civicrm_api3_system_check($params) {
+ $returnValues = array();
+ foreach (CRM_Utils_Check::singleton()->checkAll() as $message) {
+ $returnValues[] = $message->toArray();
+ }
+
+ // Spec: civicrm_api3_create_success($values = 1, $params = array(), $entity = NULL, $action = NULL)
+ return civicrm_api3_create_success($returnValues, $params, 'System', 'Check');
+}
\ No newline at end of file