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
| Parameter | Type | Required | Description |
|---|---|---|---|
reportId | string | Yes | Unique identifier of the report |
Response
Returns:
reportId: Unique report identifierstatus: Current status:pending,processing,completed,failedreportUrl: URL to download the complete report PDF (only when status iscompleted)
Examples
- Go
- TypeScript
import "github.com/silentwitness/go-sdk"
silentwitness.Key = "sk_test_..."
response, err := silentwitness.Reports.GetResult(ctx, &silentwitness.GetResultRequest{
ReportId: "report_xyz789abc",
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("Status: %s\n", response.Status)
if response.ReportUrl != nil {
fmt.Printf("Report URL: %s\n", *response.ReportUrl)
}
import { setApiKey, getResult } from "@silentwitness/typescript-sdk";
setApiKey("sk_test_...");
const response = await getResult({
reportId: "report_xyz789abc"
});
console.log(`Status: ${response.status}`);
if (response.reportUrl) {
console.log(`Report URL: ${response.reportUrl}`);
}
Errors
| Code | Description |
|---|---|
NOT_FOUND | Report does not exist |
PERMISSION_DENIED | Insufficient permissions |
UNAUTHENTICATED | Invalid or missing API key |