Create or update the stream's snapshot rule
POST/program/api/v2/streams/:id/snapshot-rule
This endpoint is available in private cloud only. Use your global host URL if self-hosted.
Create (201) or update (200) the per-stream snapshot rule. While a
rule exists and the stream is live, the platform captures an MP4
clip of up to maxDurSec seconds on a cadence (intervalSec when
set, otherwise the platform default — currently 60 seconds) and
uploads it to the project's configured archiving S3 destination.
backfillSec reads content backwards from the live buffer so each
capture can include the moments before it fired ("clip the last N
seconds").
The request carries capture parameters only — the server assembles the full archiver rule (driver, post-processing, S3 destination and credentials from the project's archiving configuration) when surfacing the rule to orchestration. Changes propagate on the next ping cycle (seconds).
minDurSec controls partial clips when the stream ends early:
clips shorter than it are discarded. Defaults to maxDurSec.
Requires the project to have an archiving configuration (S3
destination); responds 422 project_missing_s3_config otherwise.
Validates the stream belongs to the token's project. One rule per stream.
Generate JWTRequest
Responses
- 200
- 201
- 400
- 403
- 404
- 422
- 500
Existing rule updated
Rule created
Bad request - validation error (invalid_duration, invalid_interval, invalid_backfill, etc.)
Forbidden - Stream belongs to different project
Stream not found
Project has no archiving (S3) configuration (project_missing_s3_config)
Internal Server Error