REST API
OIntel exposes a single authenticated endpoint for CI/CD and headless integrations.
Endpoint: GET /wp-json/ointel/v1/health
Authentication: WordPress cookie auth or Application Passwords (manage_options required)
Response:
json{
"score": 84,
"categories": {
"environment": { "score": 90, "weight": 0.35 },
"plugins": { "score": 75, "weight": 0.25 },
"performance": { "score": 82, "weight": 0.25 },
"content": { "score": 88, "weight": 0.15 }
},
"failing": [
{ "id": "plugin_updates", "severity": "warning", "label": "3 plugins need updates" }
],
"snapshot_id": 42,
"scanned_at": "2026-05-02T14:30:00Z"
}
Developer Hooks
php// Add a custom check
add_filter( 'ointel_checks', function( array $checks ): array {
$checks['my_custom_check'] = [
'label' => 'My Custom Check',
'category' => 'environment',
'callback' => function(): array {
return [
'status' => 'pass', // 'pass', 'warning', 'fail'
'message' => 'All good',
'impact' => 5, // points this check contributes
];
},
];
return $checks;
} );
// Fire after scan completes
add_action( 'ointel_scan_complete', function( int $score, array $results ) {
// Log or notify on score changes
}, 10, 2 );
// Modify alert message before sending
add_filter( 'ointel_alert_message', function( string $message, string $type ): string {
return $message;
}, 10, 2 );