captionbob docs

Version 1.0.0
Contents ↓

HTTP API

Video routes

The routes of one video: its facts, its file, its edit history with undo and redo, the ASS script and the emoji layers of a version for the live preview, and its delete with its files.

Source file: captionbob_server/video_routes.js

GET /api/videos/:videoId

Access: any. A route that a dashboard login or an API key may call.

Path values: videoId.

GET /api/videos/:videoId. The facts of a video and its newest render.

DELETE /api/videos/:videoId

Access: any. A route that a dashboard login or an API key may call.

Path values: videoId.

DELETE /api/videos/:videoId. Delete a video with its versions and its renders, its uploaded file and the output files of its renders. A video with a render that is queued or running is not deleted, so that no render writes for a video that is gone.

GET /api/videos/:videoId/file

Access: any. A route that a dashboard login or an API key may call.

Path values: videoId.

GET /api/videos/:videoId/file. The uploaded video file, whole or as one byte range.

GET /api/videos/:videoId/versions

Access: any. A route that a dashboard login or an API key may call.

Path values: videoId.

GET /api/videos/:videoId/versions. The history of a video, the oldest version first, with no version JSON.

POST /api/videos/:videoId/versions

Access: any. A route that a dashboard login or an API key may call.

Path values: videoId.

POST /api/videos/:videoId/versions with {"version"}. A new edit, which becomes the current version. The versions that redo would show are removed.

GET /api/videos/:videoId/versions/:number

Access: any. A route that a dashboard login or an API key may call.

Path values: videoId, number.

GET /api/videos/:videoId/versions/:number. One version with its JSON.

GET /api/videos/:videoId/versions/:number/script

Access: any. A route that a dashboard login or an API key may call.

Path values: videoId, number.

GET /api/videos/:videoId/versions/:number/script. The ASS script and the emoji layers of a version for the live preview, from the Python library. Each layer has the path of its image, the time at which the image starts to play, its first frame and its box on each frame. A style with emoji layers needs the emoji index folder.

POST /api/videos/:videoId/undo

Access: any. A route that a dashboard login or an API key may call.

Path values: videoId.

POST /api/videos/:videoId/undo. The version before the current version becomes the current version.

POST /api/videos/:videoId/redo

Access: any. A route that a dashboard login or an API key may call.

Path values: videoId.

POST /api/videos/:videoId/redo. The version after the current version becomes the current version.