← Back to API Reference

API: Media (Photos & Timelapses)

Access the latest plant photos and timelapse videos captured by your Annaboto's built-in camera. All media is stored locally on the device.

GET /pictures/latest

Returns metadata about the most recent plant photo, including a URL to download it.

Endpoint: GET http://<device-ip>:8080/annaboto/api/pictures/latest

Response Format

{
  "url": "http://192.168.0.103:8080/pictures/latest.jpg",
  "mtime": "2026-05-30T10:47:17.185017Z",
  "size_bytes": 245760
}

Response Fields

Field Type Description
url string Direct URL to download the image file
mtime ISO 8601 Last modification time of the photo file (UTC with Z suffix)
size_bytes integer File size in bytes

Example

# Get photo metadata
curl http://192.168.0.103:8080/annaboto/api/pictures/latest

# Download the actual image
curl -o plant-photo.jpg "http://192.168.0.103:8080/pictures/latest.jpg"

Cache Invalidation

The url stays the same across photo updates, so use the mtime field to detect when a new photo is available. Compare the mtime from your last fetch — if it changed, download the new image.

GET /timelapses/latest

Returns metadata about the most recent timelapse video, including a URL to download it.

Endpoint: GET http://<device-ip>:8080/annaboto/api/timelapses/latest

Response Format

{
  "url": "http://192.168.0.103:8080/timelapses/latest.mp4",
  "mtime": "2026-05-30T10:47:17.185017Z",
  "size_bytes": 12345678
}

Response Fields

Field Type Description
url string Direct URL to download the MP4 video file
mtime ISO 8601 Last modification time of the timelapse file (UTC)
size_bytes integer File size in bytes

Example

# Get timelapse metadata
curl http://192.168.0.103:8080/annaboto/api/timelapses/latest

# Download the video
curl -o timelapse.mp4 "http://192.168.0.103:8080/timelapses/latest.mp4"

Notes