diff --git a/docs/README.md b/docs/README.md index 29191980f..68b27e15a 100644 --- a/docs/README.md +++ b/docs/README.md @@ -3,3 +3,8 @@ This website is built using [Docusaurus 3.5](https://docusaurus.io/docs), a modern static website generator. For installation and contributing instructions, please follow the [Contributing Docs](https://docs.frigate.video/development/contributing). + +# Development + +1. Run `npm i` to install dependencies +2. Run `npm run start` to start the website diff --git a/docs/docs/integrations/api.md b/docs/docs/integrations/api.md deleted file mode 100644 index edbb3d881..000000000 --- a/docs/docs/integrations/api.md +++ /dev/null @@ -1,534 +0,0 @@ ---- -id: api -title: HTTP API ---- - -A web server is available on port 5000 with the following endpoints. - -## Management & Information - -### `GET /api/config` - -A json representation of your configuration - -### `POST /api/restart` - -Restarts Frigate process. - -### `GET /api/stats` - -Contains some granular debug info that can be used for sensors in Home Assistant. - -Sample response: - -```json -{ - /* Per Camera Stats */ - "cameras": { - "back": { - /*************** - * Frames per second being consumed from your camera. If this is higher - * than it is supposed to be, you should set -r FPS in your input_args. - * camera_fps = process_fps + skipped_fps - ***************/ - "camera_fps": 5.0, - /*************** - * Number of times detection is run per second. This can be higher than - * your camera FPS because Frigate often looks at the same frame multiple times - * or in multiple locations - ***************/ - "detection_fps": 1.5, - /*************** - * PID for the ffmpeg process that consumes this camera - ***************/ - "capture_pid": 27, - /*************** - * PID for the process that runs detection for this camera - ***************/ - "pid": 34, - /*************** - * Frames per second being processed by Frigate. - ***************/ - "process_fps": 5.1, - /*************** - * Frames per second skip for processing by Frigate. - ***************/ - "skipped_fps": 0.0 - } - }, - /*************** - * Sum of detection_fps across all cameras and detectors. - * This should be the sum of all detection_fps values from cameras. - ***************/ - "detection_fps": 5.0, - /* Detectors Stats */ - "detectors": { - "coral": { - /*************** - * Timestamp when object detection started. If this value stays non-zero and constant - * for a long time, that means the detection process is stuck. - ***************/ - "detection_start": 0.0, - /*************** - * Time spent running object detection in milliseconds. - ***************/ - "inference_speed": 10.48, - /*************** - * PID for the shared process that runs object detection on the Coral. - ***************/ - "pid": 25321 - } - }, - "service": { - /* Uptime in seconds */ - "uptime": 10, - "version": "0.10.1-8883709", - "latest_version": "0.10.1", - /* Storage data in MB for important locations */ - "storage": { - "/media/frigate/clips": { - "total": 1000, - "used": 700, - "free": 300, - "mnt_type": "ext4" - }, - "/media/frigate/recordings": { - "total": 1000, - "used": 700, - "free": 300, - "mnt_type": "ext4" - }, - "/tmp/cache": { - "total": 256, - "used": 100, - "free": 156, - "mnt_type": "tmpfs" - }, - "/dev/shm": { - "total": 256, - "used": 100, - "free": 156, - "mnt_type": "tmpfs" - } - } - }, - "cpu_usages": { - "pid": { - "cmdline": "ffmpeg...", - "cpu": "5.0", - "cpu_average": "3.0", - "mem": "0.5" - } - }, - "gpu_usages": { - "gpu-type": { - "gpu": "17%", - "mem": "18%" - } - } -} -``` - -### `GET /api/version` - -Version info - -### `GET /api/ffprobe` - -Get ffprobe output for camera feed paths. - -| param | Type | Description | -| ------- | ------ | ---------------------------------- | -| `paths` | string | `,` separated list of camera paths | - -### `GET /api//ptz/info` - -Get PTZ info for the camera. - -## Camera Media - -### `GET /api/` - -An mjpeg stream for debugging. Keep in mind the mjpeg endpoint is for debugging only and will put additional load on the system when in use. - -Accepts the following query string parameters: - -| param | Type | Description | -| ----------- | ---- | ------------------------------------------------------------------ | -| `fps` | int | Frame rate | -| `h` | int | Height in pixels | -| `bbox` | int | Show bounding boxes for detected objects (0 or 1) | -| `timestamp` | int | Print the timestamp in the upper left (0 or 1) | -| `zones` | int | Draw the zones on the image (0 or 1) | -| `mask` | int | Overlay the mask on the image (0 or 1) | -| `motion` | int | Draw blue boxes for areas with detected motion (0 or 1) | -| `regions` | int | Draw green boxes for areas where object detection was run (0 or 1) | - -You can access a higher resolution mjpeg stream by appending `h=height-in-pixels` to the endpoint. For example `/api/back?h=1080`. You can also increase the FPS by appending `fps=frame-rate` to the URL such as `/api/back?fps=10` or both with `?fps=10&h=1000`. - -### `GET /api//latest.jpg[?h=300]` - -The most recent frame that Frigate has finished processing. It is a full resolution image by default. - -Accepts the following query string parameters: - -| param | Type | Description | -| ----------- | ---- | ------------------------------------------------------------------ | -| `h` | int | Height in pixels | -| `bbox` | int | Show bounding boxes for detected objects (0 or 1) | -| `timestamp` | int | Print the timestamp in the upper left (0 or 1) | -| `zones` | int | Draw the zones on the image (0 or 1) | -| `mask` | int | Overlay the mask on the image (0 or 1) | -| `motion` | int | Draw blue boxes for areas with detected motion (0 or 1) | -| `regions` | int | Draw green boxes for areas where object detection was run (0 or 1) | -| `quality` | int | Jpeg encoding quality (0-100). Defaults to 70. | - -Example parameters: - -- `h=300`: resizes the image to 300 pixels tall - -### `GET /api//