Kitchen Stories User Comments API

The User Comments API from Kitchen Stories — 3 operation(s) for user comments.

OpenAPI Specification

kitchenstories-user-comments-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  version: '3'
  title: Kitchen Stories Internal Articles Admin User Comments 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: User Comments
paths:
  /users/comments/:
    get:
      summary: List User Comments
      operationId: comment-list
      tags:
      - User Comments
      parameters:
      - name: feed_item
        in: query
        description: Get comments for the specific feed-item
        required: false
        schema:
          type: boolean
      - name: parent
        in: query
        description: Get all answers for the given parent comment uuid
        required: false
        schema:
          type: string
      - name: with_feed_item
        in: query
        description: Embed the feeditem in the comment
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Get all comments (with optionally embedded articles or recipes) from the current user
          content:
            application/vnd.ajns.kitchenstories+json; version=3:
              schema:
                $ref: '#/components/schemas/comment_pagination'
    post:
      summary: Create a new comment
      operationId: comment-create
      tags:
      - User Comments
      requestBody:
        description: feed_item + parent is feed_item-uuid or parent-comment-uuid. Provide `feed_item` or `parent`
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/comment_add_json'
      responses:
        '200':
          description: Operation successfull
          content:
            application/vnd.ajns.kitchenstories+json; version=3:
              schema:
                oneOf:
                - $ref: '#/components/schemas/comment'
                - $ref: '#/components/schemas/errors'
        '403':
          description: Forbidden. When user is not logged in
        '404':
          description: NotFound. When Cookbook does not exists
  /users/comments/images/:
    get:
      summary: Get user image comments
      operationId: comment-images-list
      tags:
      - User Comments
      parameters:
      - name: feed_item
        in: query
        description: Get comments for the specific feed-item
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Get all image comments from the current user
          content:
            application/vnd.ajns.kitchenstories+json; version=3:
              schema:
                $ref: '#/components/schemas/comment_image_pagination'
  /users/comments/{comment-uuid}/images/:
    post:
      summary: Attach an image to a comment
      operationId: comment-image
      tags:
      - User Comments
      parameters:
      - name: comment-uuid
        in: path
        description: Comment uuid
        required: true
        schema:
          type: string
      requestBody:
        description: Image is a http-form-url-encoded image
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/user_public_update_image'
      responses:
        '200':
          description: Operation successfull
          content:
            application/vnd.ajns.kitchenstories+json; version=3:
              schema:
                $ref: '#/components/schemas/comment_image_create'
        '403':
          description: Forbidden. When user is not logged in
        '404':
          description: NotFound. When Comment does not exists
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
    legacy_unit:
      type: object
      properties:
        id:
          type: string
        ingredient_pluralizable:
          type: boolean
        name:
          type: object
          properties:
            rendered:
              type: string
            one:
              type: string
            many:
              type: string
          required:
          - rendered
          additionalProperties: false
      required:
      - name
    comment_comment:
      type: object
      properties:
        id:
          type: string
        author:
          $ref: '#/components/schemas/user_public'
        created:
          type: string
          format: date-time
        original_comment:
          type: string
        original_language_code:
          type: string
        original_location:
          type: string
        comment:
          type: string
        like_count:
          type: number
        reply_count:
          type: number
        feed_item:
          oneOf:
          - $ref: '#/components/schemas/feed_article'
          - $ref: '#/components/schemas/feed_recipe'
        images:
          type: array
          items:
            $ref: '#/components/schemas/comment_image'
          maxItems: 10
        errors:
          type: object
          additionalProperties: false
          nullable: true
      required:
      - author
      - created
      - like_count
      - id
      - original_location
      - original_comment
      - reply_count
    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
    content_meta_markdown:
      type: object
      properties:
        markdown:
          type: string
          minLength: 1
          maxLength: 5000
      required:
      - markdown
    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
    step:
      type: object
      properties:
        headline:
          type: string
        text:
          type: string
        tip:
          type: object
          properties:
            title:
              type: string
            description:
              type: string
            video:
              $ref: '#/components/schemas/video'
          required:
          - description
          - title
        image:
          $ref: '#/components/schemas/image'
        video:
          $ref: '#/components/schemas/video'
        utensils:
          type: array
          items:
            $ref: '#/components/schemas/recipe_utensil'
        ingredients:
          type: array
          items:
            $ref: '#/components/schemas/recipe_ingredient'
      required:
      - text
    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
    errors:
      type: object
      properties:
        errors:
          type: array
          items:
            type: string
      required:
      - errors
    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
    characteristic:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
      required:
      - id
      - name
      additionalProperties: false
    additional_information:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
      required:
      - id
      - name
      additionalProperties: false
    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
    size:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        metric:
          type: string
        imperial:
          type: string
      required:
      - id
      additionalProperties: false
    unit:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
        featured_order:
          type: number
        ingredient_pluralizable:
          type: boolean
        name:
          type: object
          properties:
            one:
              type: string
            many:
              type: string
            rendered:
              type: string
          required:
          - rendered
          additionalProperties: false
      required:
      - id
      - name
      - ingredient_pluralizable
      - type
    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
    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
    feed_recipe:
      type: object
      properties:
        type:
          type: string
        recipe:
          oneOf:
          - $ref: '#/components/schemas/recipe_simplified'
          - $ref: '#/components/schemas/recipe'
        hide_for_web:
          type: boolean
        hide_for_app:
          type: boolean
      required:
      - type
      - recipe
    feed_article:
      type: object
      properties:
        type:
          type: string
        article:
          oneOf:
          - $ref: '#/components/schemas/article_simplified'
          - $ref: '#/components/schemas/article'
        hide_for_web:
          type: boolean
        hide_for_app:
          type: boolean
      required:
      - type
      - article
    recipe_utensil:
      type: object
      properties:
        id:
          type: string
        amount:
          type: number
        name:
          type: object
          properties:
            rendered:
              type: string
            one:
              type: string
            many:
              type: string
          required:
          - rendered
          additionalProperties: false
        characteristic:
          $ref: '#/components/schemas/characteristic'
        additional_information:
          $ref: '#/components/schemas/additional_information'
        size:
          $ref: '#/components/schemas/size'
      required:
      - name
    comment:
      type: object
      properties:
        id:
          type: string
        author:
          $ref: '#/components/schemas/user_public'
        created:
          type: string
          format: date-time
        original_comment:
          type: string
        original_language_code:
          type: string
        original_location:
          type: string
        comment:
          type: string
        like_count:
          type: number
        reply_count:
          type: number
        feed_item:
          oneOf:
          - $ref: '#/components/schemas/feed_article'
          - $ref: '#/components/schemas/feed_recipe'
        recent_answers:
          type: array
          items:
            $ref: '#/components/schemas/comment_comment'
        images:
          type: array
          items:
            $ref: '#/components/schemas/comment_image'
          maxItems: 10
        errors:
          type: object
          additionalProperties: false
          nullable: true
      required:
      - author
      - created
      - like_count
      - id
      - original_location
      - original_comment
      - reply_count
    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
    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
    comment_add_json:
      type: object
      properties:
        feed_item:
          type: string
        parent:
          type: string
        original_comment:
          type: string
    user_public_update_image:
      type: object
      properties:
        image:
          $ref: '#/components/schemas/image'
    recipe_ingredient:
      type: object
      properties:
        id:
          type: string
        name:
          type: object
          properties:
            rendered:
              type: string
            one:
              type: string
            many:
              type: string
          required:
          - rendered
          additionalProperties: false
        measurement:
          type: object
          properties:
            imperial:
              type: object
              properties:
                amount:
                  type: number
                unit:
                  oneOf:
                  - $ref: '#/components/schemas/legacy_unit'
                  - $ref: '#/components/schemas/unit'
              additionalProperties: false
            metric:
              type: object
              properties:
                amount:
                  type: number
                unit:
                  oneOf:
                  - $ref: '#/components/schemas/legacy_unit'
                  - $ref: '#/components/schemas/unit'
              additionalProperties: false
          additionalProperties: false
        characteristic:
          $ref: '#/components/schemas/characteristic'
        additional_information:
          $ref: '#/components/schemas/additional_information'
        is_divided:
          type: boolean
        is_partner:
          type: boolean
        is_searcheable:
          type: boolean
        url:
          type: string
      required:
      - name
    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
    comment_image_pagination:
      type: object
      properties:
        links:
          $ref: '#/components/schemas/links'
        meta:
          $ref: '#/components/schemas/meta'
        data:
          type: array
          items:
            $ref: '#/components/schemas/comment_image'
      required:
      - data
      - links
      - meta
    comment_image_create:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/comment_image'
      required:
      - data
    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
    recipe:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        slug:
          type: string
        type:
          type: string
        content_id:
          type: string
        difficulty:
          type: string
        chefs_note:
          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
        servings:
          type: object
          properties:
            amount:
              type: number
            type:
              type: string
          required:
          - amount
          - type
        nutrition:
          type: object
          properties:
            calories:
              type: number
            fat:
              type: number
            protein:
              type: number
            carbohydrate:
              type: number
          required:
          - protein
          - fat
          - calories
          - carbohydrate
        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
        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'
        video:
          $ref: '#/components/schemas/video'
        howto_videos:
          type: array
          items:
            $ref: '#/components/schemas/video'
        steps:
          type: array
          items:
            $ref: '#/components/schemas/step'
        utensils:
          type: array
          items:
            $ref: '#/components/schemas/recipe_utensil'
        ingredients:
          type: array
          items:
            type: object
            properties:
              list:
                type: array
                items:
                  $ref: '#/components/schemas/recipe_ingredient'
            required:
            - list
            additionalProperties: false
      required:
      - content_id
      - type
      - publishing
      - title
      - steps
      - slug
      - url
      - user_reactions
      - author
      - servings
      - ingredients
      - id
    comment_pagination:
      type: object
      properties:
        links:
          $ref: '#/components/schemas/links'
        meta:
          $ref: '#/components/schemas/meta'
        data:
          type: array
          items:
            $ref: '#/components/schemas/comment'
      required:
      - data
      - links
      - meta
    content_meta_external_link:
      type:

# --- truncated at 32 KB (34 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/kitchenstories/refs/heads/main/openapi/kitchenstories-user-comments-api-openapi.yml