Skip to main content

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:

ParameterTypeRequiredDescription
deviceIdstringYesCamera device identifier

Response: byte[] (raw JPEG image)

Device-to-Image Mapping:

Device IDPanoramic Image
blackmtnslo-cam01Aliso_Laguna.jpg
cowles-cam01Cowles_Mtn.jpg
lyons-cam01Lyons_Peak_1.jpg
lyons-cam02Lyons_Peak_2.jpg
crest-cam01Mt_San_Miguel_North.jpg
crest-cam02Mt_San_Miguel_South.jpg
otay-cam01Otay_Mtn_1.jpg
otay-cam02Otay_Mtn_2.jpg
tijuanaestuary-cam03Santiago_Peak_CalOES_N.jpg
mtsoledad-cam03Soledad_Peak_2.jpg
tdlln-cam01UCSD_TDLLN_1.jpg
tdlln-cam02UCSD_TDLLN_2.jpg
sanmiguel-cam03Mt_San_Miguel_North.jpg
sanmiguel-cam04Mt_San_Miguel_South.jpg
sanmiguel-cam05Mt_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 API
  • POST /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:

FieldTypeDescription
imagebyte[]Raw JPEG image bytes
positionCameraPositionRandomized PTZ values
imageTimestampDateTimeOffsetCapture timestamp
errorsIList<ErrorItem>Error collection (empty on success)
httpStatusCodeHttpStatusCode?Status override

CameraPosition​

FieldTypeRangeDescription
pandecimal-180 to 180Horizontal rotation
tiltdecimal-180 to 180Vertical rotation
zoomint0 to 9999Zoom level
focusint0 to 9999Focus value
autoFocusstring"on" / "off"Auto-focus state
autoIrisstring"on" / "off"Auto-iris state