arazzo: 1.0.1
info:
title: Mux Rotate Live Stream Key
summary: Create a live stream, reset its stream key, and read it back to confirm the new key is in place.
description: >-
Rotates the RTMP stream key for a Mux Video live stream, the standard
response when a key is leaked or needs to be cycled. The workflow creates a
live stream, captures its original stream key, resets the key to generate a
new one, and reads the live stream back to confirm the rotated key is now
active. Every step spells out its request inline so the flow can be read and
executed without opening the underlying OpenAPI description.
version: 1.0.0
x-realizes-capability-ids:
- BC-3740.20
x-capability-derivation:
method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
min_confidence: 0.7
sources:
- capability_id: BC-3740.20
capability_name: OTT & Streaming Delivery
spec: mux-com-live-streams-api-openapi.yml
confidence: 0.8
model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: liveStreamsApi
url: ../openapi/mux-com-live-streams-api-openapi.yml
type: openapi
workflows:
- workflowId: reset-stream-key
summary: Create a live stream, reset its stream key, and confirm the new key.
description: >-
Creates a live stream, records its original key, resets the key, and reads
the stream back to confirm the new key.
inputs:
type: object
properties:
latencyMode:
type: string
description: Latency mode for the live stream (low, reduced, or standard).
default: low
steps:
- stepId: createLiveStream
description: >-
Create a live stream and capture its initial stream key.
operationId: create-live-stream
requestBody:
contentType: application/json
payload:
playback_policies:
- public
latency_mode: $inputs.latencyMode
successCriteria:
- condition: $statusCode == 201
outputs:
liveStreamId: $response.body#/data/id
originalStreamKey: $response.body#/data/stream_key
- stepId: resetStreamKey
description: >-
Reset the live stream's stream key, invalidating the old key and
generating a new one.
operationId: reset-stream-key
parameters:
- name: LIVE_STREAM_ID
in: path
value: $steps.createLiveStream.outputs.liveStreamId
successCriteria:
- condition: $statusCode == 200
outputs:
newStreamKey: $response.body#/data/stream_key
- stepId: confirmKey
description: >-
Read the live stream back to confirm the rotated stream key is now the one
stored on the stream.
operationId: get-live-stream
parameters:
- name: LIVE_STREAM_ID
in: path
value: $steps.createLiveStream.outputs.liveStreamId
successCriteria:
- condition: $statusCode == 200
outputs:
currentStreamKey: $response.body#/data/stream_key
outputs:
liveStreamId: $steps.createLiveStream.outputs.liveStreamId
originalStreamKey: $steps.createLiveStream.outputs.originalStreamKey
currentStreamKey: $steps.confirmKey.outputs.currentStreamKey
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.