%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/content.yaml

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

  version: 1.0.0
  title: HumHub - Content API
  contact:
    email: info@humhub.com
  license:
    name: AGPLv2
    url: 'https://www.humhub.org/en/licences'
basePath: /api/v1
schemes:
  - http
  - https
tags:
  - name: Content
    description: API to access and manage content information.
    externalDocs:
      description: Find out more
      url: 'http://docs.humhub.org'
  - name: Container
    description: API to access and manage content containers.
    externalDocs:
      description: Find out more
      url: 'http://docs.humhub.org'
  - name: Tags
    description: Group API
components:
  parameters:
    topicsParam:
      in: query
      name: topics
      required: false
      schema:
        type: string
      description: Coma separated list of topics to filter
      example: "Music,Dancing"
paths:
  /content/container:
    get:
      tags:
        - Container
      summary: Find all content container
      description: ''
      produces:
        - application/json
      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/ContentContainer'

  /content/findByContainer/{id}:
    get:
      tags:
        - Content
      summary: Find all content by container
      description: ''
      produces:
        - application/json
      parameters:
        - name: id
          in: path
          description: The id of the content container
          required: true
          type: integer
        - $ref: 'common.yaml#/components/parameters/pageParam'
        - $ref: 'common.yaml#/components/parameters/limitParam'
        - name: orderBy
          in: query
          required: false
          type: string
          enum: [creationTime, lastUpdate]
          default: creationTime
          description: >
            Order by:
              * creationTime - Descending, from most recently created
              * lastUpdate - Descending, from last updated
        - name: dateUpdatedFrom
          in: query
          type: string
          examples:
            string:
              value: 2021-01-01 11:00:00
              summary: Value can be a date string.
            unix:
              value: 1609498800
              summary: Value can be a unix timestamp.
          description: Filter by latest update time from date.
        - name: dateUpdatedTo
          in: query
          type: string
          examples:
            string:
              value: 2022-01-01 11:00:00
              summary: Value can be a date string.
            unix:
              value: 1641034800
              summary: Value can be a unix timestamp.
          description: Filter by latest update time until date.
      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/Content'
        '400':
          description: Invalid content container id supplied
        '404':
          description: Content container not found

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

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

definitions:

  Content:
    type: object
    properties:
      metadata:
        $ref: "#/definitions/ContentMetadata"
      comments:
        type: object
        readOnly: true
        allOf:
          - $ref: "comment.yaml#/definitions/CommentsSummary"
      likes:
        type: object
        readOnly: true
        allOf:
          - $ref: "like.yaml#/definitions/LikesSummary"
      files:
        type: object
        readOnly: true
        allOf:
          - $ref: "file.yaml#/definitions/Files"
      topics:
        type: array
        items:
          $ref: "#/definitions/Topic"

  ContentMetadata:
    type: object
    properties:
      id:
        type: integer
        format: int64
        readOnly: true
        example: 14
      guid:
        type: string
        readOnly: true
        example: cd081891-d2e2-40d5-84a4-b47309e71c80
      object_model:
        type: string
        readOnly: true
        example: "humhub\\modules\\post\\models\\Post"
      object_id:
        type: integer
        format: int64
        readOnly: true
        example: 12
      visibility:
        type: integer
        format: int64
        minimum: 0
        maximum: 2
        example: 1
      archived:
        type: boolean
        example: true
      pinned:
        type: boolean
        example: false
      locked_comments:
        type: boolean
        example: false
      created_by:
        readOnly: true
        allOf:
          - $ref: "user.yaml#/definitions/UserShort"
      created_at:
        type: string
        readOnly: true
        example: "2022-04-13 05:15:43"
      updated_by:
        readOnly: true
        allOf:
          - $ref: "user.yaml#/definitions/UserShort"
      updated_at:
        type: string
        readOnly: true
        example: "2022-05-21 06:20:18"
      url:
        type: string
        readOnly: true
        example: "http://localhost/p/humhub/master/content/perma?id=109"
      contentcontainer_id:
        type: integer
        readOnly: true
        format: int64
        example: 5
      stream_channel:
        type: string
        readOnly: true
        example: default

  Topic:
    type: object
    properties:
      id:
        type: integer
        format: int64
        readOnly: true
        example: 135
      name:
        type: string
        example: News

  ContentContainer:
    type: object
    properties:
      id:
        type: integer
        format: int64
        readOnly: true
        example: 14
      guid:
        type: string
        readOnly: true
        example: cd081891-d2e2-40d5-84a4-b47309e71c80
      objectClass:
       type: string
       readOnly: true
       example: 'humhub\modules\user\models\User'
      objectPk:
       type: integer
       format: int64
       readOnly: true
       example: 53


Zerion Mini Shell 1.0