Livepeer · Arazzo Workflow

Livepeer Reuse a Standalone Multistream Target

Version 1.0.0

Create a reusable multistream target, then bind it to a new stream by ID.

1 workflow 1 source API 1 provider
View Spec View on GitHub VideoLive StreamingVideo On DemandAI VideoDecentralized ComputeGPU NetworkEthereumArbitrumWeb3ArazzoWorkflows

Provider

livepeer-com

Workflows

standalone-multistream-target
Create a standalone multistream target then bind it to a new stream.
Creates a reusable multistream target resource, creates a new stream, and attaches the existing target to the stream by its target ID.
3 steps inputs: authToken, profile, streamName, targetName, targetUrl outputs: streamId, targetId
1
createMultistreamTarget
createMultistreamTarget
Create a standalone, reusable multistream target resource pointing at the external destination URL.
2
createStream
createStream
Create the stream that will push to the reusable target.
3
bindTarget
addMultistreamTarget
Attach the existing multistream target to the stream by referencing the target ID instead of inlining a new spec.

Source API Descriptions

Arazzo Workflow Specification

livepeer-com-standalone-multistream-target-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Livepeer Reuse a Standalone Multistream Target
  summary: Create a reusable multistream target, then bind it to a new stream by ID.
  description: >-
    Creates a multistream target as a standalone, reusable resource first, then
    creates a stream and attaches the existing target to that stream by ID
    (rather than inlining a new target spec). This pattern is useful when the
    same restream destination is shared across many streams. 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
sourceDescriptions:
- name: livepeerStudio
  url: ../openapi/livepeer-studio-openapi.yml
  type: openapi
workflows:
- workflowId: standalone-multistream-target
  summary: Create a standalone multistream target then bind it to a new stream.
  description: >-
    Creates a reusable multistream target resource, creates a new stream, and
    attaches the existing target to the stream by its target ID.
  inputs:
    type: object
    required:
    - authToken
    - targetName
    - targetUrl
    - streamName
    properties:
      authToken:
        type: string
        description: Livepeer API key used as a Bearer token.
      targetName:
        type: string
        description: Friendly name for the reusable multistream target.
      targetUrl:
        type: string
        description: RTMP(S) or SRT URL of the external restream destination.
      streamName:
        type: string
        description: Name of the stream to create and bind the target to.
      profile:
        type: string
        description: Rendition profile to push to the target.
        default: source
  steps:
  - stepId: createMultistreamTarget
    description: >-
      Create a standalone, reusable multistream target resource pointing at the
      external destination URL.
    operationId: createMultistreamTarget
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.authToken
    requestBody:
      contentType: application/json
      payload:
        name: $inputs.targetName
        url: $inputs.targetUrl
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      targetId: $response.body#/id
  - stepId: createStream
    description: Create the stream that will push to the reusable target.
    operationId: createStream
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.authToken
    requestBody:
      contentType: application/json
      payload:
        name: $inputs.streamName
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      streamId: $response.body#/id
  - stepId: bindTarget
    description: >-
      Attach the existing multistream target to the stream by referencing the
      target ID instead of inlining a new spec.
    operationId: addMultistreamTarget
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.authToken
    - name: id
      in: path
      value: $steps.createStream.outputs.streamId
    requestBody:
      contentType: application/json
      payload:
        profile: $inputs.profile
        videoOnly: false
        id: $steps.createMultistreamTarget.outputs.targetId
    successCriteria:
    - condition: $statusCode == 204
  outputs:
    targetId: $steps.createMultistreamTarget.outputs.targetId
    streamId: $steps.createStream.outputs.streamId