Lightstream LayoutService API

Layouts

OpenAPI Specification

lightstream-layoutservice-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  title: Event AuthenticationService LayoutService 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: LayoutService
  description: Layouts
paths:
  /layouts:
    get:
      summary: Get all layouts owned by the user.
      operationId: LayoutService_ListLayouts
      responses:
        '200':
          description: All layouts returned.
          schema:
            type: array
            items:
              $ref: '#/definitions/v2Layout'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
      - name: projectId
        in: query
        required: false
        type: string
      - name: collectionId
        in: query
        required: false
        type: string
      - name: type
        description: " - LAYOUT_TYPE_SCENELESS: A layout managed by Studio Kit\n - LAYOUT_TYPE_SCENE: A layout managed via the layout API for use with our scene-based renderer."
        in: query
        required: false
        type: string
        enum:
        - LAYOUT_TYPE_SCENELESS
        - LAYOUT_TYPE_SCENE
      tags:
      - LayoutService
    post:
      summary: 'Create a new layout

        '
      operationId: LayoutService_CreateLayout
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/v2Layout'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
      - name: body
        description: layout to create
        in: body
        required: true
        schema:
          $ref: '#/definitions/v2PartialLayout'
      tags:
      - LayoutService
  /layouts/{layoutId}:
    get:
      summary: 'Get a layout

        '
      operationId: LayoutService_GetLayout
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/v2Layout'
        '404':
          description: Layout not found
          schema: {}
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
      - name: layoutId
        description: the id of the Layout
        in: path
        required: true
        type: string
      tags:
      - LayoutService
    delete:
      summary: Delete a layout
      operationId: LayoutService_DeleteLayout
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/v2DeleteLayoutResponse'
        '404':
          description: Layout not found
          schema: {}
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
      - name: layoutId
        description: the id of the Layout
        in: path
        required: true
        type: string
      tags:
      - LayoutService
    patch:
      summary: 'Update a layout

        '
      operationId: LayoutService_UpdateLayout
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/v2Layout'
        '404':
          description: Layout not found
          schema: {}
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
      - name: layoutId
        description: the id of the Layout
        in: path
        required: true
        type: string
      - name: body
        description: layout data to update with.
        in: body
        required: true
        schema:
          $ref: '#/definitions/v2PartialLayout'
      tags:
      - LayoutService
definitions:
  v2Layout:
    type: object
    properties:
      id:
        type: string
        format: uuid
        example: 713f6e91-3831-4421-a720-1c8084d10525
        title: internal ID for the layout
      width:
        type: integer
        format: int32
        example: 1280
        title: width of the layout in pixels
        maximum: 10000
      height:
        type: integer
        format: int32
        example: 720
        title: height of the layout in pixels
        maximum: 10000
      metadata:
        type: object
        example:
          name: Test Layout
        description: Custom metadata for the layout. This is freeform.
        maximum: 10000
      projectId:
        type: string
        example: 624c6f465887b2894ed87c87
      collectionId:
        type: string
        example: 624c6f475887b2894ed87c89
      type:
        $ref: '#/definitions/v2LayoutType'
        example: LAYOUT_TYPE_SCENE
      transitions:
        type: array
        items:
          $ref: '#/definitions/v2Transition'
        description: 'Transitions to apply when switching to this scene from another

          note: this is only available for layouts of type `LAYOUT_TYPE_SCENE`.'
      requestMetadata:
        type: object
        example:
          example: true
        default: undefined
        title: Metadata sent with the request
    description: A Layout represents a container for multiple layers.
  rpcStatus:
    type: object
    properties:
      code:
        type: integer
        format: int32
      message:
        type: string
      details:
        type: array
        items:
          $ref: '#/definitions/protobufAny'
  TransitionTransitionCut:
    type: object
    description: 'Transition: a simple scene switch. this is the default transition.'
  v2PartialLayout:
    type: object
    properties:
      width:
        type: integer
        format: int32
        example: 1280
        title: width of the layer in pixels
        maximum: 10000
      height:
        type: integer
        format: int32
        example: 720
        title: height of the layer in pixels
        maximum: 10000
      metadata:
        type: object
        example:
          name: Test Layout
        description: Metadata associated with a layout. This is freeform JSON.
        maximum: 10000
      projectId:
        type: string
        example: 624c6f465887b2894ed87c87
        description: 'Project ID from the Live API for the layout

          note: this cannot be changed for existing layouts.'
      collectionId:
        type: string
        example: 624c6f475887b2894ed87c89
        description: 'Collection ID from the Live API for the layout

          note: this cannot be changed once set.'
      type:
        $ref: '#/definitions/v2LayoutType'
        example: LAYOUT_TYPE_SCENE
        description: 'The type of layout to use.

          Typically you should use LAYOUT_TYPE_SCENE to manage layouts via the API. This automatically

          creates a "root" layer for all layers to be under.

          LAYOUT_TYPE_SCENELESS is used for layouts managed by the Studio SDK.'
      transitions:
        type: array
        items:
          $ref: '#/definitions/v2Transition'
        description: 'Transitions to apply when switching to this scene from another

          note: this is only available for layouts of type `LAYOUT_TYPE_SCENE`.'
      requestMetadata:
        type: object
        example:
          example: true
        default: undefined
        title: Metadata associated with the publishing of the event
    title: Partial layout
  TransitionTransitionSwipeType:
    type: string
    enum:
    - TRANSITION_SWIPE_TYPE_COMBINED
    - TRANSITION_SWIPE_TYPE_SOURCE
    - TRANSITION_SWIPE_TYPE_DESTINATION
    title: "- TRANSITION_SWIPE_TYPE_UNSPECIFIED: Both layouts are animated together\n - TRANSITION_SWIPE_TYPE_COMBINED: Both layouts are animated together\n - TRANSITION_SWIPE_TYPE_SOURCE: The source animation is moved out of the way\n - TRANSITION_SWIPE_TYPE_DESTINATION: The destination layout is overlaid"
  protobufAny:
    type: object
    properties:
      '@type':
        type: string
    additionalProperties: {}
  v2DeleteLayoutResponse:
    type: object
    properties:
      id:
        type: string
        format: uuid
        example: 713f6e91-3831-4421-a720-1c8084d10525
        title: The ID of the layout deleted
      requestMetadata:
        type: object
        example:
          example: true
        default: undefined
        title: Metadata associated with the deletion of a layout
  v2Transition:
    type: object
    properties:
      fromLayoutIds:
        type: array
        items:
          type: string
        description: 'A list of layout IDs to apply this transition to. If empty,

          this transition will apply to all scene switches which _do not_ have a matching transition.

          If multiple transitions match (e.g multiple targetting the layout), a transition will be chosen at random.'
      cut:
        $ref: '#/definitions/TransitionTransitionCut'
      crossfade:
        $ref: '#/definitions/TransitionTransitionCrossfade'
      fadeToColor:
        $ref: '#/definitions/TransitionTransitionFadeToColor'
      swipe:
        $ref: '#/definitions/TransitionTransitionSwipe'
      stinger:
        $ref: '#/definitions/TransitionTransitionStinger'
    description: Transition defines a transition into this layout.
  TransitionTransitionSwipe:
    type: object
    properties:
      durationMs:
        type: integer
        format: int32
        description: The duration to animate over.
      direction:
        $ref: '#/definitions/TransitionTransitionDirection'
        description: The direction to swipe the layer from.
      combinedAnimation:
        $ref: '#/definitions/TransitionTransitionSwipeType'
        description: How to animate the slide.
    description: 'Transition: Animation where layouts are slide over another.'
  TransitionTransitionCrossfade:
    type: object
    properties:
      durationMs:
        type: integer
        format: int32
        description: The duration to animate over.
    description: 'Transition: crossfade between two layouts.'
  TransitionTransitionDirection:
    type: string
    enum:
    - TRANSITION_DIRECTION_LEFT
    - TRANSITION_DIRECTION_RIGHT
    - TRANSITION_DIRECTION_UP
    - TRANSITION_DIRECTION_DOWN
    description: Direction for the animation to display in.
  TransitionTransitionFadeToColor:
    type: object
    properties:
      durationMs:
        type: integer
        format: int32
        description: The duration to animate over. The fade to color will take half this duration.
      backgroundColor:
        type: string
        description: A CSS-compatible background color.
    description: 'Transition: Fade to a color before transitioning to another layout.'
  v2LayoutType:
    type: string
    enum:
    - LAYOUT_TYPE_SCENELESS
    - LAYOUT_TYPE_SCENE
    description: "The type of layout, specifying how it functions.\n\n - LAYOUT_TYPE_SCENELESS: A layout managed by Studio Kit\n - LAYOUT_TYPE_SCENE: A layout managed via the layout API for use with our scene-based renderer."
  TransitionTransitionStingerCut:
    type: object
    properties:
      cutPointMs:
        type: integer
        format: int32
        description: 'The duration from the start of the media playing at which the layout should change.

          this should be a point where the entire screen is filled.'
      media:
        $ref: '#/definitions/TransitionTransitionMediaType'
        description: The remote media to play as the stinger.
    description: Stinger where the layout is cut over at a specific point.
  TransitionTransitionMediaType:
    type: object
    properties:
      url:
        type: string
        description: External URL to the media content.
      volume:
        type: number
        format: double
        description: Volume to play the media at between 0 and 1.
    title: Media definition
  TransitionTransitionStinger:
    type: object
    properties:
      cut:
        $ref: '#/definitions/TransitionTransitionStingerCut'
    description: 'Transition: stinger animation.'