Kitchen Stories Videos API

The Videos API from Kitchen Stories — 5 operation(s) for videos.

OpenAPI Specification

kitchenstories-videos-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  version: '3'
  title: Kitchen Stories Internal Articles Admin Videos API
  description: ''
  contact:
    email: hello@kitchenstories.com
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
- url: https://api.kitchenstories.io/api
  description: LIVE Environment
- url: https://api.dev.kitchenstories.io/api
  description: Development Environment
- url: http://localhost:8000/api
  description: Local Environment
security:
- bearerAuth: []
- ApiKeyAuth: []
tags:
- name: Videos
paths:
  /videos/:
    get:
      summary: List published videos, ordered by `-published` for the current given language
      operationId: video-list
      tags:
      - Videos
      parameters:
      - name: types
        in: query
        description: Get video by types eg. **'howto,recipe'**. Available types **['howto', 'recipe', 'article']**.
        schema:
          type: string
      - name: tags
        in: query
        description: Get video by tags eg. **'partner,meal'**.
        schema:
          type: string
      - name: slug
        in: query
        description: Get video by slug.
        schema:
          type: string
      responses:
        '200':
          description: Operation successfull
          content:
            application/vnd.ajns.kitchenstories+json; version=3:
              schema:
                $ref: '#/components/schemas/video_pagination'
  /videos/{uuid-or-slug}/:
    get:
      summary: Details for given Video uuid or slug (ignores publishing date)
      operationId: video-detail
      tags:
      - Videos
      parameters:
      - name: uuid-or-slug
        in: path
        description: Video uuid or slug
        required: true
        schema:
          type: string
      - name: draft
        in: query
        description: Get the latest draft version - for preview eg. **true** or **false**
        schema:
          type: string
      responses:
        '200':
          description: Operation successfull
          content:
            application/vnd.ajns.kitchenstories+json; version=3:
              schema:
                $ref: '#/components/schemas/video'
        '404':
          description: Video not found
  /videos/view/vimeo/{remote-id}/:
    post:
      summary: Save a video view for the given Video vimeo-remote-id
      operationId: video-save-view
      tags:
      - Videos
      parameters:
      - name: remote-id
        in: path
        description: Vimeo remote-id
        required: true
        schema:
          type: integer
      responses:
        '204':
          description: Operation successfull
        '404':
          description: Video not found
  /videos/view/{video-id}/:
    post:
      summary: Save a video view for the given Video uuid
      operationId: video-save-view-videoid
      tags:
      - Videos
      parameters:
      - name: video-id
        in: path
        description: Video uuid
        required: true
        schema:
          type: integer
      responses:
        '204':
          description: Operation successfull
        '404':
          description: Video not found
  /videos/{uuid-or-slug}/recommendations/:
    get:
      summary: List Recommendations for given Video uuid or slug
      operationId: video-recommendations
      tags:
      - Videos
      parameters:
      - name: uuid-or-slug
        in: path
        description: Video uuid or slug
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Operation successfull
          content:
            application/vnd.ajns.kitchenstories+json; version=3:
              schema:
                $ref: '#/components/schemas/video_pagination'
        '404':
          description: Video not found
components:
  schemas:
    image:
      type: object
      properties:
        id:
          oneOf:
          - type: string
          - type: number
        url:
          type: string
          format: uri
        source:
          type: string
        source_link:
          type: string
        width:
          type: number
        height:
          type: number
      required:
      - url
      additionalProperties: false
    links:
      type: object
      properties:
        first:
          type: string
          format: uri
        last:
          type: string
          format: uri
        next:
          type: string
          format: uri
        prev:
          type: string
          format: uri
      required:
      - last
      - first
      additionalProperties: false
    video:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        slug:
          type: string
        type:
          type: string
        content_id:
          type: string
        remote_id:
          type: string
        url:
          type: string
          format: uri
        recipe_url:
          type: string
          format: uri
        width:
          type: number
        height:
          type: number
        duration:
          type: number
        image:
          $ref: '#/components/schemas/image'
        meta:
          $ref: '#/components/schemas/wagtail_meta'
        publishing:
          type: object
          properties:
            created:
              type: string
              format: date-time
            updated:
              type: string
              format: date-time
            published:
              type: string
              format: date-time
            state:
              type: string
            playback-state:
              type: string
              enum:
              - not-playable
              - processing
              - ready
          required:
          - created
          - updated
          - state
          - playback-state
        user_reactions:
          type: object
          properties:
            view_count:
              type: number
          required:
          - view_count
      required:
      - content_id
      - duration
      - title
      - id
      - slug
      - meta
    video_pagination:
      type: object
      properties:
        links:
          $ref: '#/components/schemas/links'
        meta:
          $ref: '#/components/schemas/meta'
        data:
          type: array
          items:
            $ref: '#/components/schemas/video'
      required:
      - data
      - links
      - meta
    wagtail_meta:
      type: object
      properties:
        title:
          type: string
        description:
          type: string
        hreflang:
          type: object
          properties:
            en:
              type: string
              format: uri
            de:
              type: string
              format: uri
            zh:
              type: string
              format: uri
          required:
          - en
      required:
      - hreflang
      additionalProperties: false
    meta:
      type: object
      properties:
        pagination:
          type: object
          properties:
            pages:
              type: number
            count:
              type: number
            page:
              type: number
          required:
          - page
          - pages
          - count
          additionalProperties: false
      required:
      - pagination
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Ultron-User