Mock Endpoints
Active Endpointsβ
GET /api/image/GetLatestImageβ
Simulates a single image capture from a camera. Returns a random static image with randomized PTZ position metadata.
Response: GetImageResponse
{
"image": "<base64 byte array>",
"position": {
"pan": 45.0,
"tilt": -12.0,
"zoom": 4500,
"focus": 2300,
"autoFocus": "on",
"autoIris": "off"
},
"imageTimestamp": "2024-01-15T10:30:00Z",
"errors": [],
"httpStatusCode": null,
"body": null
}
Behavior:
- Selects a random image from
StaticImages/(39 images across East Quincy, Fowler Peak, Golden Gate, Healdsburg, and generic sets) - Generates random PTZ values: pan/tilt (-180 to 180), zoom/focus (0 to 9999), autoFocus/autoIris ("on"/"off")
GET /api/image/GetPanoImage?deviceId={deviceId}β
Simulates a panoramic image capture. Returns a device-specific panoramic image if a mapping exists, otherwise returns a random panoramic image.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
deviceId | string | Yes | Camera device identifier |
Response: byte[] (raw JPEG image)
Device-to-Image Mapping:
| Device ID | Panoramic Image |
|---|---|
blackmtnslo-cam01 | Aliso_Laguna.jpg |
cowles-cam01 | Cowles_Mtn.jpg |
lyons-cam01 | Lyons_Peak_1.jpg |
lyons-cam02 | Lyons_Peak_2.jpg |
crest-cam01 | Mt_San_Miguel_North.jpg |
crest-cam02 | Mt_San_Miguel_South.jpg |
otay-cam01 | Otay_Mtn_1.jpg |
otay-cam02 | Otay_Mtn_2.jpg |
tijuanaestuary-cam03 | Santiago_Peak_CalOES_N.jpg |
mtsoledad-cam03 | Soledad_Peak_2.jpg |
tdlln-cam01 | UCSD_TDLLN_1.jpg |
tdlln-cam02 | UCSD_TDLLN_2.jpg |
sanmiguel-cam03 | Mt_San_Miguel_North.jpg |
sanmiguel-cam04 | Mt_San_Miguel_South.jpg |
sanmiguel-cam05 | Mt_San_Miguel_South.jpg |
If the deviceId does not match any mapping, a random image from the 23 available panoramics is returned.
Inactive Endpointsβ
The CameraController contains two commented-out setup endpoints that were previously used to populate mock data from production APIs:
POST /camera/setupMocksβ fetched camera data from the CDN APIPOST /camera/setupCameraConfigMocksβ fetched config from the UCSD metadata API
These are not active and exist only as reference for future mock data generation.
Response Modelsβ
GetImageResponseβ
Extends ResponseBase with image-specific fields:
| Field | Type | Description |
|---|---|---|
image | byte[] | Raw JPEG image bytes |
position | CameraPosition | Randomized PTZ values |
imageTimestamp | DateTimeOffset | Capture timestamp |
errors | IList<ErrorItem> | Error collection (empty on success) |
httpStatusCode | HttpStatusCode? | Status override |
CameraPositionβ
| Field | Type | Range | Description |
|---|---|---|---|
pan | decimal | -180 to 180 | Horizontal rotation |
tilt | decimal | -180 to 180 | Vertical rotation |
zoom | int | 0 to 9999 | Zoom level |
focus | int | 0 to 9999 | Focus value |
autoFocus | string | "on" / "off" | Auto-focus state |
autoIris | string | "on" / "off" | Auto-iris state |