Lightstream DestinationService API

The Destination Service operates on Project Destinations. Destinations designate where a Broadcast associated with a Project is distributed downstream.

OpenAPI Specification

lightstream-destinationservice-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  title: Event AuthenticationService DestinationService API
  version: '2.0'
  description: The Authentication Service provides token services for clients
host: live.api.stream
basePath: /event/v2
schemes:
- https
consumes:
- application/json
produces:
- application/json
tags:
- name: DestinationService
  description: 'The Destination Service operates on Project Destinations. Destinations

    designate where a Broadcast associated with a Project is distributed

    downstream.'
paths:
  /collection/{collectionId}/project/{projectId}/destination:
    post:
      summary: Create Destination
      description: Create a new Destination
      operationId: DestinationService_CreateDestination
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/v21CreateDestinationResponse'
        '401':
          description: The access token provided is not valid
          schema: {}
        '403':
          description: The access token provided does not have access to specified resource
          schema: {}
        '404':
          description: The specified resource was not found
          schema: {}
        '429':
          description: The specified service is busy; please use an exponential backoff on subsequent requests.
          schema: {}
        '500':
          description: The specified service is unavailable; please try again later
          schema: {}
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
      - name: collectionId
        description: collection which owns the project which owns the destination
        in: path
        required: true
        type: string
      - name: projectId
        description: project which will own this destination
        in: path
        required: true
        type: string
      - name: body
        in: body
        required: true
        schema:
          type: object
          properties:
            metadata:
              type: object
              example:
                createdBy: Eddie Current
              title: arbitrary metadata associated with this destination
            address:
              $ref: '#/definitions/v21DestinationAddress'
              title: destination address (select one)
            enabled:
              type: boolean
              example: true
              default: 'true'
              title: enable or disable this destination
            timeout:
              type: integer
              format: int64
              example: 5000
              default: '5000'
              title: timeout (in milliseconds) to wait before resetting a connection
              maximum: 30000
              minimum: 100
      tags:
      - DestinationService
  /collection/{collectionId}/project/{projectId}/destination/{destinationId}:
    get:
      summary: Get Destination
      description: Get an existing Destination.
      operationId: DestinationService_GetDestination
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/v21GetDestinationResponse'
        '401':
          description: The access token provided is not valid
          schema: {}
        '403':
          description: The access token provided does not have access to specified resource
          schema: {}
        '404':
          description: The specified resource was not found
          schema: {}
        '429':
          description: The specified service is busy; please use an exponential backoff on subsequent requests.
          schema: {}
        '500':
          description: The specified service is unavailable; please try again later
          schema: {}
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
      - name: collectionId
        description: collection which owns the project which owns the destination
        in: path
        required: true
        type: string
      - name: projectId
        description: project which owns the destination
        in: path
        required: true
        type: string
      - name: destinationId
        description: destination id
        in: path
        required: true
        type: string
      tags:
      - DestinationService
    delete:
      summary: Delete Destination
      description: Delete a destination
      operationId: DestinationService_DeleteDestination
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/v21DeleteDestinationResponse'
        '401':
          description: The access token provided is not valid
          schema: {}
        '403':
          description: The access token provided does not have access to specified resource
          schema: {}
        '404':
          description: The specified resource was not found
          schema: {}
        '429':
          description: The specified service is busy; please use an exponential backoff on subsequent requests.
          schema: {}
        '500':
          description: The specified service is unavailable; please try again later
          schema: {}
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
      - name: collectionId
        description: collection which owns the project which owns the destination
        in: path
        required: true
        type: string
      - name: projectId
        description: project which owns the destination
        in: path
        required: true
        type: string
      - name: destinationId
        description: destination id
        in: path
        required: true
        type: string
      - name: force
        description: forcibly remove destination if enabled.
        in: query
        required: false
        type: boolean
        default: 'false'
      tags:
      - DestinationService
    patch:
      summary: Update Destination
      description: Update a destination
      operationId: DestinationService_UpdateDestination
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/v21UpdateDestinationResponse'
        '401':
          description: The access token provided is not valid
          schema: {}
        '403':
          description: The access token provided does not have access to specified resource
          schema: {}
        '404':
          description: The specified resource was not found
          schema: {}
        '429':
          description: The specified service is busy; please use an exponential backoff on subsequent requests.
          schema: {}
        '500':
          description: The specified service is unavailable; please try again later
          schema: {}
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
      - name: collectionId
        description: collection which owns the project which owns the destination
        in: path
        required: true
        type: string
      - name: projectId
        description: project which owns the destination
        in: path
        required: true
        type: string
      - name: destinationId
        description: destination id
        in: path
        required: true
        type: string
      - name: body
        in: body
        required: true
        schema:
          type: object
          properties:
            updateMask:
              type: string
              example: metadata, address.rtmpPush.url
              title: fields to update (default updates any non-null field)
              required:
              - update_mask
            metadata:
              type: object
              example:
                createdBy: Eddie Current
              title: arbitrary metadata associated with this destination
            address:
              $ref: '#/definitions/v21DestinationAddress'
              title: destination address (select one)
            enabled:
              type: boolean
              example: true
              default: 'true'
              title: enable or disable this destination
            timeout:
              type: integer
              format: int64
              example: 5000
              title: timeout (in milliseconds) to wait before resetting a connection
              maximum: 30000
              minimum: 100
          required:
          - updateMask
      tags:
      - DestinationService
definitions:
  v21DeleteDestinationResponse:
    type: object
    properties:
      broadcastUpdated:
        type: boolean
        example: true
        title: indicates whether the broadcast was updated as a function of this request
  v21HlsLifecycleLive:
    type: object
    properties:
      playlistCount:
        type: integer
        format: int32
        example: 5
        default: '5'
        title: number of entries to advertise in playlist file
        minimum: 2
      fileCount:
        type: integer
        format: int32
        example: 10
        default: '10'
        title: number of files to keep on disk
        minimum: 4
    title: live hls lifecycle management
  v21HlsLifecycleVod:
    type: object
    properties:
      maxDuration:
        type: integer
        format: int32
        example: 0
        default: '0'
        title: max duration of the recording in ms (0 is indefinite)
    title: vod hls lifecycle management
  v21HlsLifecycle:
    type: object
    properties:
      vod:
        $ref: '#/definitions/v21HlsLifecycleVod'
        default: '{}'
        title: lifecycle of vod
      live:
        $ref: '#/definitions/v21HlsLifecycleLive'
        title: lifecycle of live
    title: hls lifecycle management
  v21GetDestinationResponse:
    type: object
    properties:
      destination:
        $ref: '#/definitions/v21Destination'
        title: the requested destination
  v21DestinationRtmpPushAddress:
    type: object
    properties:
      key:
        type: string
        example: 7132b004-61e8-49c1-8dc8-4bb3269ce6f
        title: rtmp stream key
      url:
        type: string
        example: rtmp://ingest.fakecompany.com
        title: rtmp destination url
        required:
        - url
    title: rtmp push destination address
    required:
    - url
  rpcStatus:
    type: object
    properties:
      code:
        type: integer
        format: int32
      message:
        type: string
      details:
        type: array
        items:
          $ref: '#/definitions/protobufAny'
  protobufAny:
    type: object
    properties:
      '@type':
        type: string
    additionalProperties: {}
  v21DestinationAgoraPushAddress:
    type: object
    properties:
      appId:
        type: string
        title: Agora app id
        required:
        - app_id
      channelId:
        type: string
        title: Agora channel id
        required:
        - channel_id
      userId:
        type: string
        title: Agora user id
        required:
        - user_id
    title: Agora push addressing
    required:
    - appId
    - channelId
    - userId
  v21UpdateDestinationResponse:
    type: object
    properties:
      destination:
        $ref: '#/definitions/v21Destination'
        title: updated destination
      broadcastUpdated:
        type: boolean
        example: true
        title: indicates whether the broadcast was updated as a function of this request
  v21HlsPackaging:
    type: object
    properties:
      lifecycle:
        $ref: '#/definitions/v21HlsLifecycle'
        default: '{}'
        title: lifecycle of hls segments
      segmentDuration:
        type: integer
        format: int32
        example: 2000
        default: '2000'
        title: duration of segments in ms
        maximum: 18000
        minimum: 2000
    title: hls packaging options
  v21Destination:
    type: object
    properties:
      collectionId:
        type: string
        example: 7132b004-61e8-49c1-8dc8-4bb3269ce6f
        title: collection which owns the project which owns the destination
      projectId:
        type: string
        example: 7132b004-61e8-49c1-8dc8-4bb3269ce6f
        title: project which owns the destination
      destinationId:
        type: string
        example: 7132b004-61e8-49c1-8dc8-4bb3269ce6f
        title: destination id
      metadata:
        type: object
        example:
          createdBy: Eddie Current
        title: arbitrary metadata associated with this destination
      enabled:
        type: boolean
        example: true
        default: 'true'
        title: is output stream enabled?
      address:
        $ref: '#/definitions/v21DestinationAddress'
        title: address of the destination
      timeout:
        type: integer
        format: int64
        example: 5000
        default: '5000'
        title: timeout (ms) to wait before resetting a connection
    title: streaming destination of project
  v21S3ACL:
    type: string
    enum:
    - S3ACL_PRIVATE
    - S3ACL_PUBLIC_READ
    - S3ACL_PUBLIC_READ_WRITE
    - S3ACL_AUTHENTICATED_READ
    - S3ACL_BUCKET_OWNER_READ
    - S3ACL_BUCKET_OWNER_FULL_CONTROL
  v21DestinationAddress:
    type: object
    properties:
      rtmpPush:
        $ref: '#/definitions/v21DestinationRtmpPushAddress'
        title: rtmp push addressing
      agora:
        $ref: '#/definitions/v21DestinationAgoraPushAddress'
        title: Agora addressing
      s3Storage:
        $ref: '#/definitions/v21S3StorageAddress'
        title: s3 storage addressing
    title: destination address (select one)
  v21S3StorageAddress:
    type: object
    properties:
      region:
        type: string
        example: us-west-1
        title: cloud region
        required:
        - region
      bucket:
        type: string
        example: company
        title: cloud bucket
        required:
        - bucket
      prefix:
        type: string
        example: app
        title: cloud bucket prefix
      accessKey:
        type: string
        title: cloud access key
        required:
        - access_key
      secretKey:
        type: string
        title: cloud secret key
        required:
        - secret_key
      token:
        type: string
        title: token based auth
      tokenDuration:
        type: integer
        format: int32
        title: token duration in ms
      acl:
        $ref: '#/definitions/v21S3ACL'
        example: S3ACL_PUBLIC_READ
        title: access control list
      endpoint:
        type: string
        example: fra1.digitaloceanspaces.com
        title: endpoint for non aws s3 destinations
      packaging:
        $ref: '#/definitions/v21ObjectStoragePackaging'
        default: '{}'
        title: the format of the files to be written
    required:
    - region
    - bucket
    - accessKey
    - secretKey
  v21ObjectStoragePackaging:
    type: object
    properties:
      hls:
        $ref: '#/definitions/v21HlsPackaging'
        default: '{}'
        title: hls format
    title: packaging options for object storage
  v21CreateDestinationResponse:
    type: object
    properties:
      destination:
        $ref: '#/definitions/v21Destination'
        title: the newly created destination