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
| Parameter | Type | Required | Description |
|---|---|---|---|
caseId | string | Yes | The case ID to get analytics for |
Response
| Property | Type | Description |
|---|---|---|
analytics | CaseAnalytics | Computed case strength analysis |
CaseAnalytics
| Property | Type | Description |
|---|---|---|
overallScore | int32 | Overall case strength score (0-100) |
category | string | "Strong Case", "Moderate Case", or "Weak Case" |
caseType | string | Descriptive case classification |
metrics | CaseMetric[] | Individual metric scores |
strengths | string[] | Case strengths (markdown formatted) |
weaknesses | string[] | Case weaknesses (markdown formatted) |
recommendations | string[] | Recommendations (markdown formatted) |
status | AnalyticsStatus | Data availability status |
CaseMetric
| Property | Type | Description |
|---|---|---|
label | string | Metric name (e.g., "Liability Strength") |
value | int32 | Score (0-100) |
description | string | Optional description |
AnalyticsStatus
| Property | Type | Description |
|---|---|---|
crashAnalysisComplete | bool | Whether crash analysis data is available |
biomechanicsComplete | bool | Whether biomechanics data is available |
edrDataAvailable | bool | Whether EDR data is available |
message | string | Human-readable status message |
Examples
- Go
- TypeScript
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))
import { getCaseAnalytics } from "@silentwitness/typescript-sdk";
// Get analytics for a case (can be called anytime)
const analytics = await getCaseAnalytics("case_abc123");
console.log(`Score: ${analytics.overallScore}/100 (${analytics.category})`);
console.log(`Strengths: ${analytics.strengths.length}, Weaknesses: ${analytics.weaknesses.length}`);
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
StartAnalysiscompletes - 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
| Code | Description |
|---|---|
NOT_FOUND | Case ID not found |
FAILED_PRECONDITION | No completed analysis (crash or biomechanics) exists for this case |
UNAUTHENTICATED | Invalid or missing API key |