openapi: 3.0.3 info: title: Public Webcam API version: "1.0" description: | Read-only, unauthenticated API for embedding camera images on websites. All responses are static files regenerated by the capture service after every capture. Timestamps are ISO 8601 in UTC (suffix Z). History dates are local dates in the timezone given by the `timezone` field. Caching: `latest.jpg` and all JSON use `Cache-Control: no-cache` with ETags, so browsers revalidate cheaply and never show a stale image. Historical images never change and are cached for a year. For an `` that always refreshes, use `latest.versioned_url`. servers: - url: https://public-view.onestop.online paths: /cameras/{slug}/latest.jpg: get: summary: Most recent successful image (fixed URL) parameters: [{ $ref: "#/components/parameters/slug" }] responses: "200": { description: JPEG image, content: { image/jpeg: {} } } "404": { description: Unknown or non-public camera } /cameras/{slug}/latest.thumb.jpg: get: summary: Thumbnail (400px wide) of the most recent image parameters: [{ $ref: "#/components/parameters/slug" }] responses: "200": { description: JPEG image, content: { image/jpeg: {} } } /cameras/{slug}/{yyyy}/{mm}/{dd}/{hhmmss}.jpg: get: summary: A historical image (immutable). Use the URLs returned by the history endpoints. parameters: - { $ref: "#/components/parameters/slug" } - { name: yyyy, in: path, required: true, schema: { type: string } } - { name: mm, in: path, required: true, schema: { type: string } } - { name: dd, in: path, required: true, schema: { type: string } } - { name: hhmmss, in: path, required: true, schema: { type: string } } responses: "200": { description: JPEG image, content: { image/jpeg: {} } } /api/v1/cameras: get: summary: List public cameras responses: "200": description: Camera list content: application/json: schema: type: object properties: generated_at: { type: string, format: date-time } cameras: { type: array, items: { $ref: "#/components/schemas/Camera" } } groups: type: array items: { type: object, properties: { name: { type: string }, description: { type: string, nullable: true } } } /api/v1/cameras/{slug}: get: summary: Camera information including the latest capture parameters: [{ $ref: "#/components/parameters/slug" }] responses: "200": { description: Camera, content: { application/json: { schema: { $ref: "#/components/schemas/Camera" } } } } "404": { description: Unknown or non-public camera } /api/v1/cameras/{slug}/latest: get: summary: Latest capture only (smallest payload; poll this to detect new images) parameters: [{ $ref: "#/components/parameters/slug" }] responses: "200": description: Latest capture content: application/json: schema: type: object properties: slug: { type: string } latest: { $ref: "#/components/schemas/Latest" } /api/v1/cameras/{slug}/history: get: summary: Dates that have historical images (only when history is public for the camera) parameters: [{ $ref: "#/components/parameters/slug" }] responses: "200": description: Dates content: application/json: schema: type: object properties: slug: { type: string } timezone: { type: string, example: America/New_York } dates: type: array items: type: object properties: date: { type: string, format: date } count: { type: integer } url: { type: string } "404": { description: History is not public for this camera } /api/v1/cameras/{slug}/history/{date}: get: summary: All captures on a local date (YYYY-MM-DD), oldest first parameters: - { $ref: "#/components/parameters/slug" } - { name: date, in: path, required: true, schema: { type: string, format: date } } responses: "200": description: Captures content: application/json: schema: type: object properties: slug: { type: string } date: { type: string, format: date } timezone: { type: string } captures: { type: array, items: { $ref: "#/components/schemas/Capture" } } "404": { description: No captures on that date, or history not public } components: parameters: slug: name: slug in: path required: true schema: { type: string, pattern: "^[a-z0-9-]+$" } example: front-gate schemas: Latest: type: object nullable: true properties: captured_at: { type: string, format: date-time } url: { type: string, description: Fixed URL; always the newest image } versioned_url: { type: string, description: Unique per capture (cache-busting) } thumbnail_url: { type: string } permanent_url: { type: string, description: Archived copy of this exact image (if history is public) } width: { type: integer } height: { type: integer } bytes: { type: integer } Capture: type: object properties: captured_at: { type: string, format: date-time } url: { type: string } thumbnail_url: { type: string } width: { type: integer } height: { type: integer } bytes: { type: integer } Camera: type: object properties: slug: { type: string } name: { type: string } description: { type: string, nullable: true } location: { type: string, nullable: true } group: { type: string, nullable: true } latitude: { type: number, nullable: true } longitude: { type: number, nullable: true } status: { type: string, enum: [online, offline, unknown] } capture_interval_seconds: { type: integer } history_enabled: { type: boolean } latest: { $ref: "#/components/schemas/Latest" } links: type: object properties: self: { type: string } latest_image: { type: string } history: { type: string, nullable: true }