Threat detection analytics APIs