Vonage Video API Archives API

Record sessions as composed or individual-stream archives.

OpenAPI Specification

vonage-video-archives-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Vonage Video Archives API
  description: REST API for the Vonage Video platform (formerly OpenTok / TokBox). The Vonage Video Cloud creates and manages real-time video sessions and provides advanced server-side features including archiving (recording), live streaming broadcasts, signaling, moderation, SIP interconnect, live captions, and the Experience Composer render service. Requests are authenticated with a JWT Bearer token generated from your Vonage application credentials.
  termsOfService: https://www.vonage.com/legal/communications-apis/terms-of-use/
  contact:
    name: Vonage Video API Support
    url: https://api.support.vonage.com/hc/en-us
  version: '2.0'
servers:
- url: https://video.api.vonage.com/v2
  description: Vonage Video Cloud REST API
security:
- bearerAuth: []
tags:
- name: Archives
  description: Record sessions as composed or individual-stream archives.
paths:
  /project/{applicationId}/archive:
    get:
      operationId: listArchives
      tags:
      - Archives
      summary: List archives for a project
      parameters:
      - $ref: '#/components/parameters/ApplicationId'
      - name: offset
        in: query
        schema:
          type: integer
      - name: count
        in: query
        schema:
          type: integer
      - name: sessionId
        in: query
        schema:
          type: string
      responses:
        '200':
          description: A list of archives.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArchiveList'
        '403':
          $ref: '#/components/responses/Forbidden'
    post:
      operationId: startArchive
      tags:
      - Archives
      summary: Start an archive (recording)
      parameters:
      - $ref: '#/components/parameters/ApplicationId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartArchiveRequest'
      responses:
        '200':
          description: Archive started.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Archive'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          description: Conflict - the session is already being archived or has no clients.
  /project/{applicationId}/archive/{archiveId}:
    get:
      operationId: getArchive
      tags:
      - Archives
      summary: Get an archive
      parameters:
      - $ref: '#/components/parameters/ApplicationId'
      - $ref: '#/components/parameters/ArchiveId'
      responses:
        '200':
          description: Archive information.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Archive'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: deleteArchive
      tags:
      - Archives
      summary: Delete an archive
      parameters:
      - $ref: '#/components/parameters/ApplicationId'
      - $ref: '#/components/parameters/ArchiveId'
      responses:
        '204':
          description: Archive deleted.
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          description: Conflict - status must be uploaded, available, or deleted.
  /project/{applicationId}/archive/{archiveId}/stop:
    post:
      operationId: stopArchive
      tags:
      - Archives
      summary: Stop an archive
      parameters:
      - $ref: '#/components/parameters/ApplicationId'
      - $ref: '#/components/parameters/ArchiveId'
      responses:
        '200':
          description: Archive stopped.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Archive'
        '409':
          description: Conflict - the archive is not currently recording.
  /project/{applicationId}/archive/{archiveId}/layout:
    put:
      operationId: setArchiveLayout
      tags:
      - Archives
      summary: Change the layout of a composed archive
      parameters:
      - $ref: '#/components/parameters/ApplicationId'
      - $ref: '#/components/parameters/ArchiveId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Layout'
      responses:
        '200':
          description: Layout updated.
        '403':
          $ref: '#/components/responses/Forbidden'
  /project/{applicationId}/archive/{archiveId}/streams:
    patch:
      operationId: selectArchiveStreams
      tags:
      - Archives
      summary: Add or remove streams from a composed archive
      parameters:
      - $ref: '#/components/parameters/ApplicationId'
      - $ref: '#/components/parameters/ArchiveId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StreamSelectionRequest'
      responses:
        '204':
          description: Streams updated.
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  parameters:
    ApplicationId:
      name: applicationId
      in: path
      required: true
      description: The Vonage application ID (formerly OpenTok API key).
      schema:
        type: string
    ArchiveId:
      name: archiveId
      in: path
      required: true
      schema:
        type: string
  responses:
    Forbidden:
      description: Authentication failed or the JWT is invalid.
    NotFound:
      description: The requested resource was not found.
  schemas:
    Archive:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
          enum:
          - started
          - stopped
          - uploaded
          - available
          - failed
          - deleted
          - expired
          - paused
        sessionId:
          type: string
        applicationId:
          type: string
        name:
          type: string
        createdAt:
          type: integer
          format: int64
        duration:
          type: integer
        size:
          type: integer
        outputMode:
          type: string
        resolution:
          type: string
        hasAudio:
          type: boolean
        hasVideo:
          type: boolean
        url:
          type: string
          nullable: true
    StreamSelectionRequest:
      type: object
      properties:
        addStream:
          type: string
        removeStream:
          type: string
        hasAudio:
          type: boolean
        hasVideo:
          type: boolean
    ArchiveList:
      type: object
      properties:
        count:
          type: integer
        items:
          type: array
          items:
            $ref: '#/components/schemas/Archive'
    Layout:
      type: object
      properties:
        type:
          type: string
          enum:
          - bestFit
          - pip
          - verticalPresentation
          - horizontalPresentation
          - focus
          - custom
        stylesheet:
          type: string
        screenshareType:
          type: string
    StartArchiveRequest:
      type: object
      required:
      - sessionId
      properties:
        sessionId:
          type: string
        hasAudio:
          type: boolean
          default: true
        hasVideo:
          type: boolean
          default: true
        name:
          type: string
        outputMode:
          type: string
          enum:
          - composed
          - individual
          default: composed
        resolution:
          type: string
          enum:
          - 640x480
          - 1280x720
          - 1920x1080
        streamMode:
          type: string
          enum:
          - auto
          - manual
        layout:
          $ref: '#/components/schemas/Layout'
        multiArchiveTag:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: A JWT generated from your Vonage application's private key and application ID, sent in the Authorization header.