Vimeo OTT Collections API

Categories, series, seasons, movies, and playlists, and their items.

OpenAPI Specification

vimeo-ott-collections-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Vimeo OTT Analytics Collections API
  description: 'The Vimeo OTT API (formerly the VHX API) is a REST interface for managing a branded subscription video / over-the-top (OTT) service. It lets media companies manage customers (subscribers), products (subscription, rental, and purchase access agreements), videos, and collections (categories, series, seasons, movies, playlists), plus watchlists, embeddable-player authorizations, comments, live events, and analytics. All access is over HTTPS; requests and responses are JSON using the HAL hypermedia convention (_links, _embedded). Authentication is HTTP Basic Auth with a Vimeo OTT API key supplied as the username and a blank password; keys are generated on the Platforms page of the Vimeo OTT CMS.

    Scope note - HTTP methods and paths are confirmed from the public reference at dev.vhx.tv. Request and response field-level schemas below are modeled from the documented examples and generalized where the reference documents fields by example rather than as a formal schema.'
  version: '1.0'
  contact:
    name: Vimeo OTT Developers
    url: https://dev.vhx.tv/docs/api/
servers:
- url: https://api.vhx.tv
  description: Vimeo OTT (VHX) API
security:
- basicAuth: []
tags:
- name: Collections
  description: Categories, series, seasons, movies, and playlists, and their items.
paths:
  /collections:
    get:
      operationId: listCollections
      tags:
      - Collections
      summary: List collections
      description: Lists all collections. Paginated, 50 per page by default.
      parameters:
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/perPage'
      responses:
        '200':
          description: A paginated list of collections.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionList'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createCollection
      tags:
      - Collections
      summary: Create a collection
      description: Creates a collection of type category, series, season, movie, or playlist.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CollectionCreate'
      responses:
        '201':
          description: The created collection.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Collection'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /collections/{id}:
    parameters:
    - $ref: '#/components/parameters/id'
    get:
      operationId: getCollection
      tags:
      - Collections
      summary: Retrieve a collection
      description: Retrieves a single collection by ID.
      responses:
        '200':
          description: The requested collection.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Collection'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    put:
      operationId: updateCollection
      tags:
      - Collections
      summary: Update a collection
      description: Updates a collection's metadata.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CollectionCreate'
      responses:
        '200':
          description: The updated collection.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Collection'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /collections/{id}/update_position:
    parameters:
    - $ref: '#/components/parameters/id'
    put:
      operationId: updateCollectionPosition
      tags:
      - Collections
      summary: Reorder a collection
      description: Updates the position of the collection relative to its siblings.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                position:
                  type: integer
                  description: The new zero-based position.
              required:
              - position
      responses:
        '200':
          description: Collection reordered.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /collections/{id}/items:
    parameters:
    - $ref: '#/components/parameters/id'
    get:
      operationId: listCollectionItems
      tags:
      - Collections
      summary: List collection items
      description: Lists the videos and nested collections that belong to a collection.
      parameters:
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/perPage'
      responses:
        '200':
          description: The collection's items.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionList'
        '401':
          $ref: '#/components/responses/Unauthorized'
    put:
      operationId: addCollectionItem
      tags:
      - Collections
      summary: Add a collection item
      description: Adds a video or nested collection to the collection.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                item:
                  type: string
                  description: The video or collection ID or href to add.
                position:
                  type: integer
                  description: Optional zero-based insertion position.
              required:
              - item
      responses:
        '200':
          description: Item added.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: removeCollectionItem
      tags:
      - Collections
      summary: Remove a collection item
      description: Removes a video or nested collection from the collection.
      parameters:
      - name: item
        in: query
        required: true
        description: The video or collection ID or href to remove.
        schema:
          type: string
      responses:
        '204':
          description: Item removed.
        '401':
          $ref: '#/components/responses/Unauthorized'
  /collections/{id}/items/{item_id}:
    parameters:
    - $ref: '#/components/parameters/id'
    - name: item_id
      in: path
      required: true
      description: The ID of the item within the collection.
      schema:
        type: string
    put:
      operationId: repositionCollectionItem
      tags:
      - Collections
      summary: Reposition a collection item
      description: Updates the position of an item within the collection.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                position:
                  type: integer
                  description: The new zero-based position.
              required:
              - position
      responses:
        '200':
          description: Item repositioned.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    perPage:
      name: per_page
      in: query
      required: false
      description: The number of results per page (default 50).
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 50
    id:
      name: id
      in: path
      required: true
      description: The resource ID.
      schema:
        type: string
    page:
      name: page
      in: query
      required: false
      description: The page of results to return.
      schema:
        type: integer
        minimum: 1
        default: 1
  responses:
    BadRequest:
      description: The request was malformed or missing required fields.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Links:
      type: object
      description: HAL hypermedia links.
      additionalProperties: true
    CollectionCreate:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        type:
          type: string
          enum:
          - category
          - series
          - season
          - movie
          - playlist
      required:
      - name
      - type
    CollectionList:
      type: object
      properties:
        _embedded:
          type: object
          properties:
            collections:
              type: array
              items:
                $ref: '#/components/schemas/Collection'
        count:
          type: integer
        total:
          type: integer
        _links:
          $ref: '#/components/schemas/Links'
    Collection:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        description:
          type: string
        type:
          type: string
          description: One of category, series, season, movie, or playlist.
        position:
          type: integer
        created_at:
          type: string
          format: date-time
        _links:
          $ref: '#/components/schemas/Links'
    Error:
      type: object
      properties:
        message:
          type: string
        error:
          type: string
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic Auth. Supply your Vimeo OTT API key as the username and leave the password blank.