Kitchen Stories Articles API

The Articles API from Kitchen Stories — 4 operation(s) for articles.

OpenAPI Specification

kitchenstories-articles-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  version: '3'
  title: Kitchen Stories Internal Admin Articles 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: Articles
paths:
  /articles/:
    get:
      summary: List Articles
      operationId: article-list
      tags:
      - Articles
      parameters:
      - name: slug
        in: query
        description: Get articles by slug
        schema:
          type: string
      - name: type
        in: query
        description: Get article type eg. 'article', 'essential', 'static_page', 'blogger_profile'
        schema:
          type: string
      - name: tag
        in: query
        description: Get articles by tag eg. 'partner'
        schema:
          type: string
      - name: category
        in: query
        description: Get articles by given category slug eg. 'news'
        schema:
          type: string
      - name: order
        in: query
        description: Get articles in descending order of 'date' or 'likes'. Any other value is ignored.
        schema:
          type: string
      - name: simplified
        in: query
        description: Get simplified article
        schema:
          type: boolean
      responses:
        '200':
          description: Get all articles
          content:
            application/vnd.ajns.kitchenstories+json; version=3:
              schema:
                $ref: '#/components/schemas/article_pagination'
  /articles/{uuid-or-slug}/:
    get:
      summary: Details of given Article
      operationId: article-detail
      tags:
      - Articles
      parameters:
      - name: uuid-or-slug
        in: path
        description: id or slug of the article
        required: true
        schema:
          type: string
      - name: draft
        in: query
        description: Get article with the current draft
        schema:
          type: boolean
      - name: simplified
        in: query
        description: Get simplified article
        schema:
          type: boolean
      responses:
        '200':
          description: Get Article with the specific uuid
          content:
            application/vnd.ajns.kitchenstories+json; version=3:
              schema:
                $ref: '#/components/schemas/article'
        '404':
          description: Article not found
  /articles/{uuid-or-slug}/recommendations/:
    get:
      summary: List Recommendations for given Article uuid or slug
      operationId: article-recommendation-list
      tags:
      - Articles
      parameters:
      - name: uuid-or-slug
        in: path
        description: id or slug of the article
        required: true
        schema:
          type: string
      - name: simplified
        in: query
        description: Get simplified article schema
        schema:
          type: boolean
      responses:
        '200':
          description: Articles Paginated List with Recommendations
          content:
            application/vnd.ajns.kitchenstories+json; version=3:
              schema:
                $ref: '#/components/schemas/article_pagination'
        '404':
          description: Article not found
  /articles/{uuid-or-slug}/content-meta/:
    get:
      summary: Content meta of given Article
      operationId: article-detail-content-meta
      tags:
      - Articles
      parameters:
      - name: uuid-or-slug
        in: path
        description: id or slug of the article
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Get content meta for Article with the specific uuid. The returned entries will be ordered by descending updated date.
          content:
            application/vnd.ajns.kitchenstories+json; version=3:
              schema:
                $ref: '#/components/schemas/content_meta_list'
        '404':
          description: Article not found
components:
  schemas:
    article_image_gallery:
      type: object
      properties:
        type:
          type: string
        image_collection:
          type: object
          properties:
            images:
              type: array
              items:
                type: object
                properties:
                  image:
                    $ref: '#/components/schemas/image'
                  link:
                    type: string
                  subtitle:
                    type: string
                required:
                - image
          required:
          - images
      required:
      - type
      - image_collection
    category_simplified:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        slug:
          type: string
        path:
          type: array
          items:
            $ref: '#/components/schemas/path_item'
        children:
          type: array
          items:
            $ref: '#/components/schemas/child_item'
      required:
      - slug
      - title
      - id
    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
    content_meta_markdown:
      type: object
      properties:
        markdown:
          type: string
          minLength: 1
          maxLength: 5000
      required:
      - markdown
    recipe_simplified:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        slug:
          type: string
        type:
          type: string
        content_id:
          type: string
        difficulty:
          type: string
        image:
          $ref: '#/components/schemas/image'
          nullable: true
        author:
          $ref: '#/components/schemas/user_public'
        url:
          type: string
          format: uri
        duration:
          type: object
          properties:
            preparation:
              type: number
            baking:
              type: number
            resting:
              type: number
          required:
          - preparation
          - resting
          - baking
          nullable: true
        user_reactions:
          type: object
          properties:
            rating:
              type: number
            rating_count:
              type: number
            images:
              type: array
              items:
                $ref: '#/components/schemas/comment_image'
              maxItems: 4
            comments_count:
              type: number
            images_count:
              type: number
            like_count:
              type: number
            quality:
              type: number
          required:
          - comments_count
          - images_count
          - like_count
          - quality
        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
              enum:
              - draft
              - submitted
              - rejected
              - live
              - expired
              - scheduled
          required:
          - created
          - updated
          - state
        tags:
          type: array
          items:
            $ref: '#/components/schemas/tag'
      required:
      - content_id
      - type
      - publishing
      - title
      - slug
      - url
      - user_reactions
      - author
      - id
    article_simplified:
      type: object
      properties:
        id:
          type: string
        slug:
          type: string
        title:
          type: string
        subtitle:
          type: string
        type:
          type: string
        content_id:
          type: string
        image:
          $ref: '#/components/schemas/image'
        author:
          $ref: '#/components/schemas/user_public'
        url:
          type: string
          format: uri
        publishing:
          $ref: '#/components/schemas/publishing'
        user_reactions:
          type: object
          properties:
            comments_count:
              type: number
            images_count:
              type: number
            like_count:
              type: number
            quality:
              type: number
          required:
          - comments_count
          - images_count
          - like_count
          - quality
      required:
      - content_id
      - type
      - publishing
      - title
      - slug
      - url
      - subtitle
      - user_reactions
      - author
      - id
      - image
    article:
      type: object
      properties:
        id:
          type: string
        slug:
          type: string
        title:
          type: string
        subtitle:
          type: string
        type:
          type: string
        content_id:
          type: string
        image:
          $ref: '#/components/schemas/image'
        author:
          $ref: '#/components/schemas/user_public'
        url:
          type: string
          format: uri
        publishing:
          $ref: '#/components/schemas/publishing'
        user_reactions:
          type: object
          properties:
            comments_count:
              type: number
            images_count:
              type: number
            like_count:
              type: number
            quality:
              type: number
          required:
          - comments_count
          - images_count
          - like_count
          - quality
        content:
          type: array
          items:
            oneOf:
            - $ref: '#/components/schemas/article_headline'
            - $ref: '#/components/schemas/article_quote'
            - $ref: '#/components/schemas/article_text'
            - $ref: '#/components/schemas/article_recipes'
            - $ref: '#/components/schemas/article_shopping_tips'
            - $ref: '#/components/schemas/article_image_gallery'
            - $ref: '#/components/schemas/article_video'
            - $ref: '#/components/schemas/content_meta_carousel'
            - $ref: '#/components/schemas/article_proscons'
            - $ref: '#/components/schemas/article_cta_button'
        meta:
          $ref: '#/components/schemas/wagtail_meta'
        tags:
          type: array
          items:
            $ref: '#/components/schemas/tag'
        content_meta:
          type: array
          items:
            $ref: '#/components/schemas/content_meta'
        categories:
          type: object
          properties:
            main:
              $ref: '#/components/schemas/category_simplified'
            additional:
              type: array
              items:
                $ref: '#/components/schemas/category_simplified'
      required:
      - content_id
      - type
      - publishing
      - title
      - content
      - slug
      - url
      - subtitle
      - meta
      - user_reactions
      - author
      - id
      - image
    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
    content_meta_list:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/content_meta'
      required:
      - data
    article_cta_button:
      type: object
      properties:
        type:
          type: string
        cta_button:
          type: object
          properties:
            text:
              type: string
            link:
              type: string
          required:
          - text
          - link
      required:
      - cta_button
      - type
    article_headline:
      type: object
      properties:
        type:
          type: string
        headline:
          type: object
          properties:
            level:
              type: number
            text:
              type: string
          required:
          - level
          - text
      required:
      - type
      - headline
      additionalProperties: false
    article_pagination:
      type: object
      properties:
        links:
          $ref: '#/components/schemas/links'
        meta:
          $ref: '#/components/schemas/meta'
        data:
          type: array
          items:
            $ref: '#/components/schemas/article'
      required:
      - data
      - links
      - meta
    comment_image:
      type: object
      properties:
        comment:
          type: string
        author:
          $ref: '#/components/schemas/user_public'
        original_location:
          type: string
        image:
          $ref: '#/components/schemas/image'
        created:
          type: string
          format: date-time
      required:
      - author
      - created
      - image
      - original_location
      - comment
    article_proscons:
      type: object
      properties:
        type:
          type: string
        proscons:
          type: object
          properties:
            pros_title:
              type: string
            pros:
              type: string
            cons_title:
              type: string
            cons:
              type: string
          required:
          - pros
          - pros_title
          - cons
          - cons_title
      required:
      - type
      - proscons
    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
    content_meta_faq:
      type: object
      properties:
        question:
          type: string
          minLength: 1
          maxLength: 500
        answer:
          type: string
          minLength: 1
          maxLength: 5000
      required:
      - answer
      - question
    child_item:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        path:
          type: array
          items:
            $ref: '#/components/schemas/path_item'
        slug:
          type: string
        children:
          type: array
          items:
            $ref: '#/components/schemas/child_item'
      required:
      - id
      - slug
      - title
    article_text:
      type: object
      properties:
        type:
          type: string
        text:
          type: object
          properties:
            text:
              type: string
          required:
          - text
      required:
      - text
      - type
      additionalProperties: false
    article_recipes:
      type: object
      properties:
        type:
          type: string
        recipes:
          type: object
          properties:
            recipes:
              type: array
              items:
                $ref: '#/components/schemas/recipe_simplified'
          required:
          - recipes
      required:
      - recipes
      - type
    article_video:
      type: object
      properties:
        type:
          type: string
        video:
          type: object
          properties:
            video:
              $ref: '#/components/schemas/video'
            subtitle:
              type: string
          required:
          - video
      required:
      - type
      - video
    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
    user_public:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
          - community
          - contributor
          - editor
        new_type:
          type: string
          enum:
          - community
          - contributor
          - editor
          - partner
          - external
        name:
          type: string
        slug:
          type: string
        occupation:
          type: string
        description:
          type: string
        image:
          $ref: '#/components/schemas/image'
          nullable: true
        banner_image:
          $ref: '#/components/schemas/image'
        wide_banner_image:
          $ref: '#/components/schemas/image'
        website:
          type: string
          format: uri
        is_premium:
          type: boolean
        created:
          type: string
          format: date-time
      required:
      - type
      - new_type
      - name
      - id
    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
    content_meta_external_product:
      type: object
      properties:
        title:
          type: string
          minLength: 1
          maxLength: 37
        subtitle:
          type: string
          maxLength: 25
        image:
          type: string
          format: uri
        cta:
          type: string
          maxLength: 20
        url:
          type: string
          format: uri
      required:
      - image
      - url
      - title
    content_meta:
      type: object
      properties:
        key:
          type: string
        type:
          type: string
        value:
          oneOf:
          - $ref: '#/components/schemas/content_meta_external_link'
          - $ref: '#/components/schemas/content_meta_external_product'
          - $ref: '#/components/schemas/content_meta_faq'
          - $ref: '#/components/schemas/content_meta_markdown'
        campaign:
          type: string
        language:
          type: string
      required:
      - type
      - key
      - uuid
    tag:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        slug:
          type: string
        type:
          type: string
        is_hidden:
          type: boolean
    content_meta_external_link:
      type: object
      properties:
        url:
          type: string
          format: uri
      required:
      - url
    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
      required:
      - created
      - updated
      - state
      additionalProperties: false
    content_meta_carousel:
      type: object
      properties:
        type:
          type: string
        title:
          type: string
        content_meta_carousel:
          type: array
          items:
            $ref: '#/components/schemas/content_meta'
      required:
      - type
      - content_meta_carousel
    path_item:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        slug:
          type: string
      required:
      - id
      - slug
      - title
    article_quote:
      type: object
      properties:
        type:
          type: string
        quote:
          type: object
          properties:
            text:
              type: string
            author:
              type: string
          required:
          - text
      required:
      - type
      - quote
      additionalProperties: false
    article_shopping_tips:
      type: object
      properties:
        type:
          type: string
        shopping_tips:
          type: object
          properties:
            shopping_tips:
              type: array
              items:
                $ref: '#/components/schemas/article_simplified'
          required:
          - shopping_tips
      required:
      - type
      - shopping_tips
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Ultron-User