123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342 |
-
- definitions:
- CommentSchema:
- properties:
- content_id:
- example: 6
- format: int32
- type: integer
- parent_id:
- example: 34
- format: int32
- type: integer
- x-nullable: true
- content:
- type: string
- example: "Coucou !"
- author:
- $ref: '#/definitions/UserDigestSchema'
- UserDigestSchema:
- properties:
- user_id:
- example: 3
- format: int32
- readOnly: true
- type: integer
- avatar_url:
- description: avatar_url is the url to the image file. If no avatar, then set
- it to null (and frontend will interpret this with a default avatar)
- example: /api/v2/assets/avatars/suri-cate.jpg
- format: url
- type: string
- x-nullable: true
- public_name:
- example: Suri Cate
- type: string
- HtmlPageContentSchema:
- properties:
- content_type:
- enum:
- - thread
- - file
- - markdownpage
- - page
- - folder
- example: htmlpage
- type: string
- content_id:
- example: 6
- format: int32
- type: integer
- is_archived:
- example: false
- type: boolean
- is_deleted:
- example: false
- type: boolean
- label:
- example: Intervention Report 12
- type: string
- parent_id:
- example: 34
- format: int32
- type: integer
- x-nullable: true
- show_in_ui:
- description: if false, then do not show content in the treeview. This may
- his maybe used for specific contents or for sub-contents. Default is True.
- In first version of the API, this field is always True
- example: true
- type: boolean
- slug:
- example: intervention-report-12
- type: string
- status_slug:
- description: this slug is found in content_type available statuses
- enum:
- - open
- - closed-validated
- - closed-unvalidated
- - closed-deprecated
- example: closed-deprecated
- type: string
- sub_content_types:
- description: list of content types allowed as sub contents. This field is
- required for folder contents, set it to empty list in other cases
- items:
- type: string
- type: array
- workspace_id:
- example: 19
- format: int32
- type: integer
- current_revision_id:
- type: integer
- example: 74
- created:
- format: date-time
- type: string
- author:
- $ref: '#/definitions/UserDigestSchema'
- modified:
- format: date-time
- type: string
- last_modifier:
- $ref: '#/definitions/UserDigestSchema'
- content:
- example: '<p> Coucou </p>'
- type: string
- type: object
- HtmlPageRevisionSchema:
- properties:
- content_type:
- enum:
- - thread
- - file
- - markdownpage
- - page
- - folder
- example: htmlpage
- type: string
- content_id:
- example: 6
- format: int32
- type: integer
- is_archived:
- example: false
- type: boolean
- is_deleted:
- example: false
- type: boolean
- label:
- example: Intervention Report 12
- type: string
- parent_id:
- example: 34
- format: int32
- type: integer
- x-nullable: true
- show_in_ui:
- description: if false, then do not show content in the treeview. This may
- his maybe used for specific contents or for sub-contents. Default is True.
- In first version of the API, this field is always True
- example: true
- type: boolean
- slug:
- example: intervention-report-12
- type: string
- status_slug:
- description: this slug is found in content_type available statuses
- enum:
- - open
- - closed-validated
- - closed-unvalidated
- - closed-deprecated
- example: closed-deprecated
- type: string
- sub_content_types:
- description: list of content types allowed as sub contents. This field is
- required for folder contents, set it to empty list in other cases
- items:
- type: string
- type: array
- workspace_id:
- example: 19
- format: int32
- type: integer
- revision_id:
- type: integer
- example: 74
- created:
- format: date-time
- type: string
- author:
- $ref: '#/definitions/UserDigestSchema'
- content:
- example: '<p> Coucou </p>'
- type: string
- type: object
- HtmlPageRevisionListSchema:
- properties:
- revisions:
- type: array
- items:
- $ref: '#/definitions/HtmlPageRevisionSchema'
- revision_nb:
- type: integer
- example: 40
- HtmlPageModifySchema:
- type: object
- properties:
- label:
- example: "My Page"
- type: string
- content:
- example: '<p> Coucou </p>'
- type: string
- ContentSetStatusSchema:
- type: object
- properties:
- status:
- example: "open-workinprogress"
- type: string
- NoContentSchema:
- type: object
- info:
- description: API of Tracim v2
- title: Tracim v2 API
- version: 1.0.0
- parameters: {}
- paths:
- "/api/v2/workspaces/{workspace_id}/htmlpages/{htmlpage_id}":
- get:
- description: "get htmlpage content"
- parameters:
- - name: "workspace_id"
- in: path
- required: true
- type: integer
- description: id of the current workspace.
- - name: "htmlpage_id"
- in: path
- required: true
- type: integer
- description: content id of htmlpage.
- responses:
- '200':
- description: "nominal case"
- schema:
- $ref: '#/definitions/HtmlPageContentSchema'
- put:
- description: "modify htmlpage label or/and content"
- parameters:
- - in: body
- name: "body"
- schema:
- $ref: '#/definitions/HtmlPageModifySchema'
- - name: "workspace_id"
- in: path
- required: true
- type: integer
- description: id of the current workspace.
- - name: "htmlpage_id"
- in: path
- required: true
- type: integer
- description: content id of htmlpage.
- responses:
- '200':
- description: "nominal case"
- schema:
- $ref: '#/definitions/HtmlPageContentSchema'
- "/api/v2/workspaces/{workspace_id}/htmlpages/{htmlpage_id}/revisions":
- get:
- description: "gets all htmlpages revisions (sorted by"
- parameters:
- - name: "workspace_id"
- in: path
- required: true
- type: integer
- description: id of the current workspace.
- - name: "htmlpage_id"
- in: path
- required: true
- type: integer
- description: content id of htmlpage.
- responses:
- '200':
- description: "nominal case"
- schema:
- $ref: '#/definitions/HtmlPageRevisionListSchema'
- "/api/v2/workspaces/{workspace_id}/htmlpages/{htmlpage_id}/status":
- put:
- description: "set htmlpage content status"
- parameters:
- - in: body
- name: "body"
- schema:
- $ref: '#/definitions/ContentSetStatusSchema'
- - name: "workspace_id"
- in: path
- required: true
- type: integer
- description: id of the current workspace.
- - name: "htmlpage_id"
- in: path
- required: true
- type: integer
- description: content id of htmlpage.
- responses:
- '200':
- description: "nominal case"
- schema:
- $ref: '#/definitions/NoContentSchema'
- "/api/v2/workspaces/{workspace_id}/contents/{content_id}/comments":
- get:
- description: "get all comments related to a content"
- parameters:
- - name: "workspace_id"
- in: path
- required: true
- type: integer
- description: id of the current workspace.
- - name: "content_id"
- in: path
- required: true
- type: integer
- description: content id.
- responses:
- '200':
- description: "nominal case"
- schema:
- type: array
- items:
- $ref: '#/definitions/CommentSchema'
-
- "/api/v2/workspaces/{workspace_id}/contents/{content_id}/comments/{comments_id}":
- delete:
- description: "delete one comment"
- parameters:
- - name: "workspace_id"
- in: path
- required: true
- type: integer
- description: id of the current workspace.
- - name: "content_id"
- in: path
- required: true
- type: integer
- description: content id.
- - name: "comments_id"
- in: path
- required: true
- type: integer
- description: id of a comment related to content content_id.
- responses:
- '204':
- description: "nominal case"
- schema:
- $ref: '#/definitions/NoContentSchema'
- swagger: '2.0'
- tags: []
|