Skip to content

Feature proposal: HTTP endpoint for camera status as JSON #1055

@hansmi

Description

@hansmi

In order to simplify automated monitoring (as in system monitoring) of camera recordings, e.g. using Icinga, it's useful to have an HTTP endpoint returning a machine-readable format. As of this writing motion only supports human-readable responses. The exact format depends on webcontrol_interface. I propose adding two new endpoints:

  • /cameras.json: Return a JSON object containing a list of cameras, just like / does in HTML format
  • /{camid}/status.json: Return a JSON object describing the current status of a given camera, e.g. whether the RTSP stream is connected. The information comes from struct context and struct rtsp_context for the most part.

Both responses can be expanded later if needed.

I've started experimenting with the code, but before I spend more time on it: is this a feature which would be accepted?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions