Skip to main content

Get All Videos

Returns a list of all videos sorted by view count (descending).

Request

No parameters required.
curl http://localhost:3001/api/videos

Response

videos
array
Array of video objects sorted by views (highest first)

Example Response

[
  {
    "id": "EFTA01683563",
    "title": "Elevator Cam - Floor 5",
    "filename": "EFTA01683563.mp4",
    "length": 127,
    "hasThumbnail": true,
    "views": 1523,
    "likes": 42,
    "is_shorts": false,
    "playlist": "elevator-cam"
  },
  {
    "id": "LOBBY20240315",
    "title": null,
    "filename": "LOBBY20240315.mp4",
    "length": 89,
    "hasThumbnail": false,
    "views": 856,
    "likes": 15,
    "is_shorts": true,
    "playlist": "lobby-cam"
  }
]

Notes

Videos are ordered by the views column in descending order. The most-viewed video appears first.
The likes count is denormalized and automatically updated when users like or unlike videos through the Video Likes endpoints.

Build docs developers (and LLMs) love