Get Case
Retrieves complete information about a case by its ID.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
caseId | string | Yes | Unique identifier of the case |
Response
Returns the case with:
id: Unique case identifiername: Case nameclientName: Client name (if set)organizationId: Organization ID (if associated)status: Current case statuscreatorId: ID of the creator (API key or user)created: Creation timestampupdated: Last modification timestamp
Examples
- Go
- TypeScript
import (
"context"
"github.com/silentwitness/go-sdk"
)
response, err := silentwitness.Cases.Get(ctx, "case_abc123def456")
if err != nil {
log.Fatal(err)
}
fmt.Printf("Case: %s\n", response.Case.Name)
fmt.Printf("Client: %s\n", response.Case.ClientName)
fmt.Printf("Status: %s\n", response.Case.Status)
import { getCase } from "@silentwitness/typescript-sdk";
const response = await getCase("case_abc123def456");
console.log(`Case: ${response.case.name}`);
console.log(`Client: ${response.case.clientName}`);
console.log(`Status: ${response.case.status}`);
Errors
| Code | Description |
|---|---|
NOT_FOUND | Case does not exist or not accessible |
PERMISSION_DENIED | Case belongs to a different account |
UNAUTHENTICATED | Invalid or missing API key |