%PDF- %PDF-
Direktori : /home/vacivi36/intranet.vacivitta.com.br/protected/modules/wiki/docs/swagger/ |
Current File : /home/vacivi36/intranet.vacivitta.com.br/protected/modules/wiki/docs/swagger/wiki.yaml |
swagger: '2.0' info: description: | Welcome to the HumHub wiki module API reference. version: 1.0.0 title: HumHub - Wiki API contact: email: info@humhub.com license: name: AGPLv2 url: 'https://www.humhub.org/en/licences' basePath: /api/v1 paths: '/wiki': get: tags: - Wiki summary: Find all wiki pages description: '' produces: - application/json - application/xml parameters: - $ref: 'https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/parameters/pageParam' - $ref: 'https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/parameters/limitParam' responses: '200': description: Success schema: type: object properties: total: $ref: 'https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/properties/totalProperty' page: $ref: 'https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/properties/pageProperty' results: type: array items: $ref: '#/definitions/WikiPage' '/wiki/container/{id}': get: tags: - Wiki summary: Find all wiki pages by container description: '' produces: - application/json - application/xml parameters: - name: id in: path description: ID of content container required: true type: integer - $ref: 'https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/content.yaml#/components/parameters/topicsParam' - $ref: 'https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/parameters/pageParam' - $ref: 'https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/parameters/limitParam' responses: 200: description: Success schema: type: object properties: total: $ref: 'https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/properties/totalProperty' page: $ref: 'https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/properties/pageProperty' results: type: array items: $ref: '#/definitions/WikiPage' post: tags: - Wiki Page summary: Create new wiki page description: '' produces: - application/json parameters: - in: path name: id description: The id of content container required: true type: integer - $ref: "#/definitions/WikiPageParams" responses: 200: description: Success schema: $ref: "#/definitions/WikiPage" 404: description: Not found schema: type: object properties: code: type: integer example: 404 message: type: string example: Content container not found! 422: description: Validation failed 500: description: Internal server error schema: type: object properties: code: type: integer example: 500 message: type: string example: Internal error while save valid wiki page! delete: tags: - Wiki summary: Deletes a wiki pages by container produces: - application/json parameters: - name: id in: path description: The id of content container required: true type: integer responses: 200: description: Success schema: type: object properties: code: type: integer example: 200 message: type: string example: Records successfully deleted! 404: description: Not found schema: type: object properties: code: type: integer example: 404 message: type: string example: Content container not found! '/wiki/page/{id}': get: tags: - Wiki Page summary: Get wiki page by id description: '' produces: - application/json parameters: - name: id in: path description: The id of the wiki page required: true type: integer responses: 200: description: Success schema: $ref: "#/definitions/WikiPage" 404: description: Not found schema: type: object properties: code: type: integer example: 404 message: type: string example: Requested content not found! put: tags: - Wiki Page summary: Update wiki page by id description: '' produces: - application/json parameters: - name: id in: path description: The id of the wiki page required: true type: integer - $ref: "#/definitions/WikiPageParams" responses: 200: description: Success schema: $ref: "#/definitions/WikiPage" 404: description: Not found schema: type: object properties: code: type: integer example: 404 message: type: string example: Page not found! 422: description: Validation failed 500: description: Internal server error schema: type: object properties: code: type: integer example: 500 message: type: string example: Internal error while update wiki page! delete: tags: - Wiki Page summary: Deletes a wiki page by id produces: - application/json parameters: - name: id in: path description: The id of wiki page required: true type: integer responses: 200: description: Success schema: type: object properties: code: type: integer example: 200 message: type: string example: Successfully deleted! 404: description: Not found schema: type: object properties: code: type: integer example: 404 message: type: string description: Content record not found! #----------------------------------------------------------------------------------------------------------------------- # Begin Wiki Page Management #----------------------------------------------------------------------------------------------------------------------- '/wiki/page/{id}/change-index': patch: tags: - Wiki Page Management summary: Move page to another category description: '' produces: - application/json parameters: - name: id in: path description: The id of the wiki page required: true type: integer - name: body in: body required: true schema: type: object required: - target_id properties: target_id: type: integer format: int64 example: 2 description: Wiki page category id index: type: integer format: int64 default: 0 example: 2 description: Index for order responses: 200: description: Success schema: type: object properties: code: type: integer example: 200 message: type: string example: Wiki page successfully moved! 400: description: Bad request schema: type: object properties: code: type: integer example: 400 message: type: string example: Wrong target category. 404: description: Not found schema: type: object properties: code: type: integer example: 404 message: type: string example: Page not found! 500: description: Internal server error schema: type: object properties: code: type: integer example: 500 message: type: string example: Internal error while change wiki page index! '/wiki/page/{id}/move': patch: tags: - Wiki Page Management summary: Move page to another space description: '' produces: - application/json parameters: - name: id in: path description: The id of the wiki page required: true type: integer - name: body in: body required: true schema: type: object required: - target properties: target: type: string example: c1c1c7dc-8197-471b-b5fe-2c12b183623a description: Guid of target space container responses: 200: description: Success schema: type: object properties: code: type: integer example: 200 message: type: string example: Wiki page successfully moved! 400: description: Bad request schema: type: object properties: code: type: integer example: 400 message: type: string example: Target content container guid is required! 404: description: Not found schema: type: object properties: code: type: integer example: 404 message: type: string example: Page not found! 422: description: Validation failed 500: description: Internal server error schema: type: object properties: code: type: integer example: 500 message: type: string example: Internal error while move wiki page! #----------------------------------------------------------------------------------------------------------------------- # Begin Wiki Page Revision #----------------------------------------------------------------------------------------------------------------------- '/wiki/page/{pageId}/revisions': get: tags: - Wiki Page Revision summary: Find all revisions for page description: '' produces: - application/json parameters: - name: pageId in: path description: ID of wiki page required: true type: integer - $ref: 'https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/parameters/pageParam' - $ref: 'https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/parameters/limitParam' responses: 200: description: Success schema: type: object properties: total: $ref: 'https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/properties/totalProperty' page: $ref: 'https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/properties/pageProperty' pages: $ref: 'https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/properties/pagesProperty' links: $ref: 'https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/properties/linksProperty' results: type: array items: $ref: '#/definitions/WikiPageRevision' 404: description: Not found schema: type: object properties: code: type: integer example: 404 message: type: string example: Page not found! '/wiki/revision/{id}': get: tags: - Wiki Page Revision summary: Get revision by id description: '' produces: - application/json parameters: - name: id in: path description: The id of the revision required: true type: integer responses: 200: description: Success schema: $ref: "#/definitions/WikiPageRevision" 404: description: Not found schema: type: object properties: code: type: integer example: 404 message: type: string example: Wiki page revision not found! '/wiki/revision/{id}/revert': patch: tags: - Wiki Page Revision summary: Revert page by revision id produces: - application/json parameters: - name: id in: path description: The id of the revision required: true type: integer responses: 200: description: Success schema: type: object properties: code: type: integer example: 200 message: type: string example: Wiki page revision successfully reverted 400: description: Success schema: type: object properties: code: type: integer example: 400 message: type: string example: Revert not possible. Already latest revision! 403: description: Success schema: type: object properties: code: type: integer example: 403 message: type: string example: Page not editable! 404: description: Not found schema: type: object properties: code: type: integer example: 404 message: type: string example: Wiki page revision not found! 500: description: Internal server error schema: type: object properties: code: type: integer example: 404 message: type: string example: Internal error while revert wiki page! securityDefinitions: $ref: "https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/securityDefinitions" definitions: WikiPage: type: object properties: id: type: integer format: int64 readOnly: true example: 201 title: type: string example: "Some Wikipage title" is_home: type: integer format: int64 example: 1 admin_only: type: integer format: int64 example: 1 is_category: type: integer format: int64 example: 0 parent_page_id: type: integer format: int64 example: null permalink: type: string example: http://localhost/content/perma?id=609 latest_revision: readOnly: true $ref: "#/definitions/WikiPageRevision" content: $ref: "https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/content.yaml#/definitions/Content" WikiPageRevision: type: object properties: id: type: integer format: int64 readOnly: true example: 2424 revision: type: integer format: int64 readOnly: true example: 1534454147 is_latest: type: integer format: int64 readOnly: true example: 1 wiki_page_id: type: integer format: int64 readOnly: true example: 201 created_by: readOnly: true $ref: "https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/user.yaml#/definitions/UserShort" message: type: string example: "The wiki page content in markdown." WikiPageParams: in: body name: body required: true description: Wiki page information schema: type: object required: - WikiPage - WikiPageRevision properties: WikiPage: type: object required: - title properties: title: type: string example: First api page is_home: type: integer format: int64 example: 0 admin_only: type: integer format: int64 example: 0 is_category: type: integer format: int64 example: 0 parent_page_id: type: integer format: int64 example: 0 WikiPageRevision: type: object required: - content properties: content: type: string example: First api page content PageEditForm: type: object properties: is_public: type: integer format: int64 example: 0 topics: type: array description: Topic id's items: type: integer format: int64 example: - 2 - 8 content: $ref: "https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/content.yaml#/definitions/Content"