Skip to main content

Get Result

Get the result of a accident reconstruction report. This endpoint returns the current status and a download URL when the report is completed.

Parameters​

ParameterTypeRequiredDescription
reportIdstringYesUnique identifier of the report

Response​

Returns:

FieldTypeDescription
idstringUnique report identifier
caseIdstringAssociated case ID
typestringReport type (technical_report)
statusstringCurrent status: pending, processing, completed, failed
reportUrlstringURL to download the PDF (only when completed)
caseUrlstringURL to view case in web app
errorMessagestringError details (only when failed)
crashResultsCrashResultsComputed crash analysis values (only when completed)
createdint64Unix timestamp of creation
updatedint64Unix timestamp of last update

CrashResults Structure​

When the report status is completed, the crashResults field contains:

API FieldSDK FieldTypeDescription
delta_v_at_peak_mphDeltaVAtPeakMphfloatDelta-V at peak acceleration (mph)
final_max_delta_v_mphFinalMaxDeltaVMphfloatFinal maximum Delta-V (mph)
time_at_peak_msTimeAtPeakMsfloatTime at peak acceleration (milliseconds)
time_at_final_max_msTimeAtFinalMaxMsfloatTime at final maximum (milliseconds)
peak_acceleration_gsPeakAccelerationGsfloatPeak acceleration (g's)
pdof_degreesPDOFDegreesfloatPrincipal Direction of Force angle (0-360°)
pdof_directionPDOFDirectionstringHuman-readable direction (e.g., "Front", "Rear", "Left Side")
processing_successfulProcessingSuccessfulboolWhether crash analysis processing succeeded
tip

These values are computed automatically by ML from uploaded damage images or extracted from EDR (Event Data Recorder) data when provided. EDR data provides more precise measurements.

Examples​

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

client := silentwitness.NewClient(silentwitness.Config{
APIKey: "sk_test_...",
})
defer client.Close()

report, err := client.GetReport(ctx, "report_xyz789abc")
if err != nil {
log.Fatal(err)
}

fmt.Printf("Status: %s\n", report.Status)

switch report.Status {
case silentwitness.ReportStatusCompleted:
fmt.Printf("Report URL: %s\n", *report.ReportURL)

// Access crash analysis results
if report.CrashResults != nil {
r := report.CrashResults
if r.DeltaVAtPeakMph != nil {
fmt.Printf("Delta-V at Peak: %.2f mph\n", *r.DeltaVAtPeakMph)
}
if r.FinalMaxDeltaVMph != nil {
fmt.Printf("Final Max Delta-V: %.2f mph\n", *r.FinalMaxDeltaVMph)
}
if r.PeakAccelerationGs != nil {
fmt.Printf("Peak Acceleration: %.2f g's\n", *r.PeakAccelerationGs)
}
if r.PDOFDegrees != nil {
fmt.Printf("PDOF: %.0f° (%s)\n", *r.PDOFDegrees, *r.PDOFDirection)
}
}

case silentwitness.ReportStatusFailed:
if report.ErrorMessage != nil {
fmt.Printf("Error: %s\n", *report.ErrorMessage)
}
}

Errors​

CodeDescription
NOT_FOUNDReport does not exist
PERMISSION_DENIEDInsufficient permissions
UNAUTHENTICATEDInvalid or missing API key