Skip to main content

Get Result

Retrieve case analytics for any case that has completed crash analysis or biomechanics analysis. You can call this endpoint anytime using the case ID - no need to track a separate analysis ID.

Request Parameters

ParameterTypeRequiredDescription
caseIdstringYesThe case ID to get analytics for

Response

PropertyTypeDescription
analyticsCaseAnalyticsComputed case strength analysis

CaseAnalytics

PropertyTypeDescription
overallScoreint32Overall case strength score (0-100)
categorystring"Strong Case", "Moderate Case", or "Weak Case"
caseTypestringDescriptive case classification
metricsCaseMetric[]Individual metric scores
strengthsstring[]Case strengths (markdown formatted)
weaknessesstring[]Case weaknesses (markdown formatted)
recommendationsstring[]Recommendations (markdown formatted)
statusAnalyticsStatusData availability status

CaseMetric

PropertyTypeDescription
labelstringMetric name (e.g., "Liability Strength")
valueint32Score (0-100)
descriptionstringOptional description

AnalyticsStatus

PropertyTypeDescription
crashAnalysisCompleteboolWhether crash analysis data is available
biomechanicsCompleteboolWhether biomechanics data is available
edrDataAvailableboolWhether EDR data is available
messagestringHuman-readable status message

Examples

import "github.com/silentwitness/go-sdk"

silentwitness.Key = "sk_test_..."

// Get analytics for a case (can be called anytime)
analytics, err := silentwitness.Cases.GetAnalytics(ctx, "case_abc123")
if err != nil {
log.Fatal(err)
}

fmt.Printf("Score: %d/100 (%s)\n", analytics.OverallScore, analytics.Category)
fmt.Printf("Strengths: %d, Weaknesses: %d\n", len(analytics.Strengths), len(analytics.Weaknesses))

Re-fetching Analytics

Analytics are computed on-demand based on the latest case data. You can call this endpoint:

  • After initial analysis - Get results immediately after StartAnalysis completes
  • Days later - Come back anytime with just the caseId
  • After updates - If new data is added to the case, analytics will reflect the latest state

Errors

CodeDescription
NOT_FOUNDCase ID not found
FAILED_PRECONDITIONNo completed analysis (crash or biomechanics) exists for this case
UNAUTHENTICATEDInvalid or missing API key