Skip to main content

Add Stream Output

Add a restream output to an active managed stream.

Endpoint

Headers

Parameters

  • streamId: The managed stream identifier

Request Body

Response

Success:
Error:

Implementation

  • File: packages/cloud/src/routes/streams.routes.ts:22-137
  • Middleware: validateAppApiKey
  • Service: ManagedStreamingExtension.addRestreamOutput()

Validation

  • URL must start with rtmp:// or rtmps://
  • App must be actively viewing the stream
  • Maximum 10 outputs per stream
  • Maximum 10 outputs per app
  • No duplicate URLs allowed

Remove Stream Output

Remove a restream output from a managed stream.

Endpoint

Headers

Parameters

  • streamId: The managed stream identifier
  • outputId: The output identifier to remove

Response

Success:
Error:

Implementation

  • File: packages/cloud/src/routes/streams.routes.ts:142-229
  • Authorization: Only the app that added an output can remove it

List Stream Outputs

Get all restream outputs for a managed stream.

Endpoint

Headers

Parameters

  • streamId: The managed stream identifier

Response

Implementation

  • File: packages/cloud/src/routes/streams.routes.ts:234-307
  • Authorization: App must be viewing the stream

Output Status

Possible status values:
  • active - Output is streaming
  • connecting - Attempting to connect
  • error - Connection failed
  • unknown - Status unavailable

Error Codes

Notes

  • Managed streams are created by apps using the SDK
  • Apps must be actively viewing a stream to manage outputs
  • Each stream supports up to 10 simultaneous outputs
  • Each app can add up to 10 outputs across all streams
  • Outputs are managed through Cloudflare Stream service
  • Only the app that added an output can remove it