2020-05-24 15:00:16 -04:00
|
|
|
openapi: 3.0.3
|
2022-01-23 16:02:58 -05:00
|
|
|
info:
|
2020-07-15 19:22:50 -04:00
|
|
|
title: HedgeDoc
|
|
|
|
description: HedgeDoc is an open source collaborative note editor. Several tasks of HedgeDoc can be automated through this API.
|
2020-05-24 15:00:16 -04:00
|
|
|
version: 2.0.0
|
2022-01-23 16:02:58 -05:00
|
|
|
contact:
|
2020-07-15 19:22:50 -04:00
|
|
|
name: HedgeDoc on GitHub
|
2022-02-14 05:35:26 -05:00
|
|
|
url: https://github.com/hedgedoc/hedgedoc
|
2022-01-23 16:02:58 -05:00
|
|
|
license:
|
|
|
|
name: AGPLv3
|
2022-02-14 05:35:26 -05:00
|
|
|
url: https://github.com/hedgedoc/hedgedoc/blob/develop/LICENSE
|
2022-01-23 16:02:58 -05:00
|
|
|
externalDocs:
|
2022-02-14 05:35:26 -05:00
|
|
|
description: The HedgeDoc Documentation.
|
|
|
|
url: https://docs.hedgedoc.org
|
2020-05-24 15:00:16 -04:00
|
|
|
servers:
|
2020-06-06 17:26:48 -04:00
|
|
|
- url: "/api/v2"
|
|
|
|
description: The base API Path.
|
2020-07-15 19:22:50 -04:00
|
|
|
security:
|
|
|
|
- bearerAuth: []
|
2022-01-23 16:02:58 -05:00
|
|
|
paths:
|
2020-05-24 15:00:16 -04:00
|
|
|
/me:
|
|
|
|
get:
|
|
|
|
tags:
|
|
|
|
- user
|
2020-06-06 16:00:17 -04:00
|
|
|
summary: Get the user information of the currently logged-in user
|
2020-05-24 15:00:16 -04:00
|
|
|
operationId: getMe
|
|
|
|
responses:
|
2020-05-28 16:19:15 -04:00
|
|
|
'200':
|
2020-06-06 17:26:48 -04:00
|
|
|
description: The user information.
|
2020-05-24 15:00:16 -04:00
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
"$ref": "#/components/schemas/UserInfo"
|
2020-05-28 16:19:15 -04:00
|
|
|
'401':
|
2020-07-15 19:22:50 -04:00
|
|
|
"$ref": "#/components/responses/UnauthorizedError"
|
2020-06-06 16:51:13 -04:00
|
|
|
/me/history:
|
2020-05-24 15:00:16 -04:00
|
|
|
get:
|
|
|
|
tags:
|
2020-06-06 16:51:13 -04:00
|
|
|
- history
|
2020-07-15 19:22:50 -04:00
|
|
|
- user
|
2020-06-06 17:26:48 -04:00
|
|
|
summary: Returns a list of the last viewed notes
|
2020-06-06 16:51:13 -04:00
|
|
|
operationId: getHistory
|
|
|
|
description: The list is returned as a JSON object with an array containing for each entry it's id, title, tags, last visit time and pinned status.
|
|
|
|
responses:
|
|
|
|
'200':
|
2020-06-06 17:26:48 -04:00
|
|
|
description: The list of recently viewed notes and pinned notes.
|
2020-06-06 16:51:13 -04:00
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2020-10-24 13:39:34 -04:00
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
"$ref": "#/components/schemas/History"
|
2020-07-15 19:22:50 -04:00
|
|
|
'401':
|
|
|
|
"$ref": "#/components/responses/UnauthorizedError"
|
2020-06-06 16:51:13 -04:00
|
|
|
/me/history/{note}:
|
2020-08-17 17:09:06 -04:00
|
|
|
get:
|
|
|
|
tags:
|
|
|
|
- history
|
|
|
|
- user
|
|
|
|
summary: Returns History data for a note
|
|
|
|
operationId: getHistoryObject
|
|
|
|
description: JSON Object which contains id, title, tags, last visit time and pinned status
|
|
|
|
responses:
|
|
|
|
'200':
|
2020-10-24 13:39:34 -04:00
|
|
|
description: Information about the history entry
|
2020-08-17 17:09:06 -04:00
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2020-10-24 13:39:34 -04:00
|
|
|
"$ref": "#/components/schemas/History"
|
2020-08-17 17:09:06 -04:00
|
|
|
'401':
|
|
|
|
"$ref": "#/components/responses/UnauthorizedError"
|
|
|
|
'404':
|
|
|
|
"$ref": "#/components/responses/NotFoundError"
|
|
|
|
parameters:
|
|
|
|
- name: note
|
|
|
|
in: path
|
|
|
|
required: true
|
|
|
|
description: The name of the note which is used to address it.
|
|
|
|
content:
|
|
|
|
text/plain:
|
|
|
|
example: my-note
|
2020-06-06 16:51:13 -04:00
|
|
|
put:
|
|
|
|
tags:
|
|
|
|
- history
|
2020-07-15 19:22:50 -04:00
|
|
|
- user
|
2020-06-06 16:51:13 -04:00
|
|
|
summary: Update the history object of the note (e.g change it's pin status)
|
|
|
|
operationId: updateHistoryObject
|
|
|
|
requestBody:
|
2020-06-06 17:26:48 -04:00
|
|
|
description: The updated history object.
|
2020-06-06 16:51:13 -04:00
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2020-10-24 13:39:34 -04:00
|
|
|
"$ref": "#/components/schemas/HistoryUpdate"
|
2020-06-06 16:51:13 -04:00
|
|
|
responses:
|
|
|
|
'200':
|
2020-06-06 17:26:48 -04:00
|
|
|
description: The new history.
|
2020-06-06 16:51:13 -04:00
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
"$ref": "#/components/schemas/HistoryObject"
|
2020-07-15 19:22:50 -04:00
|
|
|
'401':
|
|
|
|
"$ref": "#/components/responses/UnauthorizedError"
|
|
|
|
'404':
|
|
|
|
"$ref": "#/components/responses/NotFoundError"
|
2020-06-06 16:51:13 -04:00
|
|
|
parameters:
|
|
|
|
- name: note
|
|
|
|
in: path
|
|
|
|
required: true
|
2020-06-06 17:26:48 -04:00
|
|
|
description: The note for which the revision should be shown.
|
2020-06-06 16:51:13 -04:00
|
|
|
content:
|
|
|
|
text/plain:
|
|
|
|
example: my-note
|
|
|
|
delete:
|
|
|
|
tags:
|
|
|
|
- history
|
2020-07-15 19:22:50 -04:00
|
|
|
- user
|
2020-06-06 16:51:13 -04:00
|
|
|
summary: Remove the note from the currently logged-in user's history
|
|
|
|
operationId: deleteHistoryObject
|
|
|
|
responses:
|
2020-07-15 19:22:50 -04:00
|
|
|
'204':
|
2020-08-17 17:14:38 -04:00
|
|
|
"$ref": "#/components/responses/SuccessfullyDeleted"
|
2020-07-15 19:22:50 -04:00
|
|
|
'401':
|
|
|
|
"$ref": "#/components/responses/UnauthorizedError"
|
|
|
|
'404':
|
|
|
|
"$ref": "#/components/responses/NotFoundError"
|
2020-06-06 16:51:13 -04:00
|
|
|
parameters:
|
|
|
|
- name: note
|
|
|
|
in: path
|
|
|
|
required: true
|
2020-06-06 17:26:48 -04:00
|
|
|
description: The note for which the revision should be shown.
|
2020-06-06 16:51:13 -04:00
|
|
|
content:
|
|
|
|
text/plain:
|
|
|
|
example: my-note
|
2020-07-15 19:22:50 -04:00
|
|
|
/me/notes:
|
|
|
|
get:
|
|
|
|
tags:
|
|
|
|
- user
|
|
|
|
summary: Returns a list of the notes metadata the user owns
|
|
|
|
operationId: getOwnNotes
|
|
|
|
description: The list is returned as a JSON object with an array containing each notes metadata.
|
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: The list of notes owned by the currently logged in user.
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: array
|
|
|
|
description: The array that contains notes metadata.
|
|
|
|
items:
|
|
|
|
"$ref": "#/components/schemas/NoteMetadata"
|
|
|
|
'401':
|
|
|
|
"$ref": "#/components/responses/UnauthorizedError"
|
2020-10-24 15:48:29 -04:00
|
|
|
/me/media:
|
|
|
|
get:
|
|
|
|
tags: [ user, media ]
|
|
|
|
summary: Get list of uploaded files owned by the current user
|
|
|
|
operationId: getOwnMedia
|
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description:
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
"$ref": "#/components/schemas/MediaUpload"
|
2020-05-27 07:20:37 -04:00
|
|
|
/notes:
|
2022-01-23 16:02:58 -05:00
|
|
|
post:
|
|
|
|
tags:
|
|
|
|
- note
|
2020-06-06 17:26:48 -04:00
|
|
|
summary: Imports some markdown data into a new note
|
2020-05-24 15:00:16 -04:00
|
|
|
operationId: createNoteFromMarkdown
|
2022-01-23 16:02:58 -05:00
|
|
|
description: A random id will be assigned and the content will equal to the body of the received HTTP-request.
|
2020-07-15 19:22:50 -04:00
|
|
|
security:
|
2020-10-24 15:48:29 -04:00
|
|
|
- bearerAuth: [ ]
|
|
|
|
- { }
|
2022-01-23 16:02:58 -05:00
|
|
|
requestBody:
|
2020-05-27 05:30:32 -04:00
|
|
|
required: false
|
2020-06-06 17:26:48 -04:00
|
|
|
description: The content of the note to be imported as markdown.
|
2022-01-23 16:02:58 -05:00
|
|
|
content:
|
|
|
|
'text/markdown':
|
2020-05-24 15:00:16 -04:00
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
examples:
|
|
|
|
markdownExample:
|
|
|
|
"$ref": '#/components/examples/markdownExample'
|
2022-01-23 16:02:58 -05:00
|
|
|
responses:
|
2020-10-03 08:40:51 -04:00
|
|
|
'201':
|
2020-06-06 17:26:48 -04:00
|
|
|
description: Get information about the newly created note.
|
2020-05-24 15:00:16 -04:00
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2020-05-27 07:25:37 -04:00
|
|
|
"$ref": "#/components/schemas/Note"
|
2020-07-15 19:22:50 -04:00
|
|
|
'401':
|
|
|
|
"$ref": "#/components/responses/UnauthorizedError"
|
|
|
|
'403':
|
|
|
|
"$ref": "#/components/responses/ForbiddenError"
|
2020-05-27 07:20:37 -04:00
|
|
|
/notes/{note}:
|
2020-05-27 05:30:32 -04:00
|
|
|
get:
|
|
|
|
tags:
|
|
|
|
- note
|
2020-06-06 17:26:48 -04:00
|
|
|
summary: Returns the note
|
2020-05-27 05:30:32 -04:00
|
|
|
operationId: getNote
|
|
|
|
description: This includes all metadata and the content of the note.
|
|
|
|
responses:
|
2020-05-28 16:19:15 -04:00
|
|
|
'200':
|
2020-06-06 17:26:48 -04:00
|
|
|
description: All data of the note.
|
2020-05-27 05:30:32 -04:00
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
"$ref": "#/components/schemas/Note"
|
2020-07-15 19:22:50 -04:00
|
|
|
'401':
|
|
|
|
"$ref": "#/components/responses/UnauthorizedError"
|
|
|
|
'403':
|
|
|
|
"$ref": "#/components/responses/ForbiddenError"
|
2020-05-28 16:19:15 -04:00
|
|
|
'404':
|
2020-07-15 19:22:50 -04:00
|
|
|
"$ref": "#/components/responses/NotFoundError"
|
2020-05-27 05:30:32 -04:00
|
|
|
parameters:
|
|
|
|
- name: note
|
|
|
|
in: path
|
|
|
|
required: true
|
2020-08-17 17:14:38 -04:00
|
|
|
description: The name of the note which is used to address it.
|
2020-05-27 05:30:32 -04:00
|
|
|
content:
|
|
|
|
text/plain:
|
|
|
|
example: my-note
|
2022-01-23 16:02:58 -05:00
|
|
|
post:
|
|
|
|
tags:
|
|
|
|
- note
|
2020-06-06 17:26:48 -04:00
|
|
|
summary: Imports some markdown data into a new note with a given alias
|
2020-05-24 15:00:16 -04:00
|
|
|
operationId: createNoteWithAlias
|
2020-10-03 08:51:22 -04:00
|
|
|
description: This endpoint creates a new note with the content of the HTTP request body and the alias from the URL parameter.
|
2022-01-23 16:02:58 -05:00
|
|
|
requestBody:
|
|
|
|
required: true
|
2020-06-06 17:26:48 -04:00
|
|
|
description: The content of the note to be imported as markdown.
|
2022-01-23 16:02:58 -05:00
|
|
|
content:
|
|
|
|
'text/markdown':
|
2020-05-24 15:00:16 -04:00
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
examples:
|
|
|
|
markdownExample:
|
|
|
|
"$ref": '#/components/examples/markdownExample'
|
2022-01-23 16:02:58 -05:00
|
|
|
responses:
|
2020-10-03 08:40:51 -04:00
|
|
|
'201':
|
2020-06-06 17:26:48 -04:00
|
|
|
description: Get information about the newly created note.
|
2020-05-24 15:00:16 -04:00
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2020-05-27 07:25:37 -04:00
|
|
|
"$ref": "#/components/schemas/Note"
|
2020-07-15 19:22:50 -04:00
|
|
|
'401':
|
|
|
|
"$ref": "#/components/responses/UnauthorizedError"
|
|
|
|
'403':
|
|
|
|
"$ref": "#/components/responses/ForbiddenError"
|
2020-05-28 16:19:15 -04:00
|
|
|
'409':
|
2020-06-06 17:26:48 -04:00
|
|
|
description: This alias is already in use.
|
2020-05-25 06:04:29 -04:00
|
|
|
parameters:
|
|
|
|
- name: note
|
|
|
|
in: path
|
|
|
|
required: true
|
2020-08-17 17:14:38 -04:00
|
|
|
description: The name of the note which is used to address it.
|
2020-05-25 06:04:29 -04:00
|
|
|
content:
|
|
|
|
text/plain:
|
|
|
|
example: my-note
|
2020-07-15 19:22:50 -04:00
|
|
|
delete:
|
2020-05-25 06:04:29 -04:00
|
|
|
tags:
|
|
|
|
- note
|
2020-08-17 17:14:38 -04:00
|
|
|
summary: Remove the note
|
2020-07-15 19:22:50 -04:00
|
|
|
operationId: deleteNote
|
2020-05-25 06:04:29 -04:00
|
|
|
responses:
|
2020-07-15 19:22:50 -04:00
|
|
|
'204':
|
2020-08-17 17:14:38 -04:00
|
|
|
"$ref": "#/components/responses/SuccessfullyDeleted"
|
2020-07-15 19:22:50 -04:00
|
|
|
'401':
|
|
|
|
"$ref": "#/components/responses/UnauthorizedError"
|
|
|
|
'403':
|
|
|
|
"$ref": "#/components/responses/ForbiddenError"
|
2020-05-28 16:19:15 -04:00
|
|
|
'404':
|
2020-07-15 19:22:50 -04:00
|
|
|
"$ref": "#/components/responses/NotFoundError"
|
2020-05-25 06:04:29 -04:00
|
|
|
parameters:
|
|
|
|
- name: note
|
|
|
|
in: path
|
|
|
|
required: true
|
2020-07-15 19:22:50 -04:00
|
|
|
description: The note for which the revision should be shown.
|
2020-05-25 06:04:29 -04:00
|
|
|
content:
|
|
|
|
text/plain:
|
|
|
|
example: my-note
|
2020-07-15 19:22:50 -04:00
|
|
|
put:
|
2020-05-25 06:04:29 -04:00
|
|
|
tags:
|
|
|
|
- note
|
2020-07-15 19:22:50 -04:00
|
|
|
summary: Imports some markdown data into an existing note, creating a new revision
|
|
|
|
operationId: createNewRevisionForNote
|
2020-10-03 08:51:22 -04:00
|
|
|
description: This endpoint updates the note content of an existing note. The old content is completely replaced and a new revision is created.
|
2020-07-15 19:22:50 -04:00
|
|
|
requestBody:
|
|
|
|
required: true
|
|
|
|
description: The content of the note to be imported as markdown.
|
|
|
|
content:
|
|
|
|
'text/markdown':
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
examples:
|
|
|
|
markdownExample:
|
|
|
|
"$ref": '#/components/examples/markdownExample'
|
2022-01-23 16:02:58 -05:00
|
|
|
responses:
|
2020-05-28 16:19:15 -04:00
|
|
|
'200':
|
2020-07-15 19:22:50 -04:00
|
|
|
description: The new, changed note
|
2022-01-23 16:02:58 -05:00
|
|
|
content:
|
2020-05-27 05:30:32 -04:00
|
|
|
application/json:
|
2020-05-24 15:00:16 -04:00
|
|
|
schema:
|
2020-07-15 19:22:50 -04:00
|
|
|
"$ref": "#/components/schemas/Note"
|
|
|
|
'401':
|
|
|
|
"$ref": "#/components/responses/UnauthorizedError"
|
|
|
|
'403':
|
|
|
|
"$ref": "#/components/responses/ForbiddenError"
|
2020-05-28 16:19:15 -04:00
|
|
|
'404':
|
2020-07-15 19:22:50 -04:00
|
|
|
"$ref": "#/components/responses/NotFoundError"
|
2022-01-23 16:02:58 -05:00
|
|
|
parameters:
|
|
|
|
- name: note
|
|
|
|
in: path
|
|
|
|
required: true
|
2020-07-15 19:22:50 -04:00
|
|
|
description: The note for which the info should be shown.
|
2022-01-23 16:02:58 -05:00
|
|
|
content:
|
2020-05-24 15:00:16 -04:00
|
|
|
text/plain:
|
2022-01-23 16:02:58 -05:00
|
|
|
example: my-note
|
2020-07-15 19:22:50 -04:00
|
|
|
/notes/{note}/metadata:
|
2022-01-23 16:02:58 -05:00
|
|
|
get:
|
|
|
|
tags:
|
|
|
|
- note
|
2020-10-03 06:46:28 -04:00
|
|
|
summary: Get the metadata of a note
|
2020-07-15 19:22:50 -04:00
|
|
|
operationId: getNoteMetadata
|
2022-01-23 16:02:58 -05:00
|
|
|
responses:
|
2020-05-28 16:19:15 -04:00
|
|
|
'200':
|
2020-10-03 06:46:28 -04:00
|
|
|
description: The metadata of the note.
|
2022-01-23 16:02:58 -05:00
|
|
|
content:
|
2020-07-15 19:22:50 -04:00
|
|
|
application/json:
|
2022-01-23 16:02:58 -05:00
|
|
|
schema:
|
2020-07-15 19:22:50 -04:00
|
|
|
"$ref": "#/components/schemas/NoteMetadata"
|
|
|
|
'401':
|
|
|
|
"$ref": "#/components/responses/UnauthorizedError"
|
|
|
|
'403':
|
|
|
|
"$ref": "#/components/responses/ForbiddenError"
|
2020-05-28 16:19:15 -04:00
|
|
|
'404':
|
2020-07-15 19:22:50 -04:00
|
|
|
"$ref": "#/components/responses/NotFoundError"
|
2022-01-23 16:02:58 -05:00
|
|
|
parameters:
|
|
|
|
- name: note
|
|
|
|
in: path
|
|
|
|
required: true
|
2020-07-15 19:22:50 -04:00
|
|
|
description: The note for which the info should be shown.
|
2022-01-23 16:02:58 -05:00
|
|
|
content:
|
2020-05-24 15:00:16 -04:00
|
|
|
text/plain:
|
2022-01-23 16:02:58 -05:00
|
|
|
example: my-note
|
2021-01-10 14:25:28 -05:00
|
|
|
/notes/{note}/metadata/permissions:
|
2020-10-03 06:46:28 -04:00
|
|
|
put:
|
|
|
|
tags: [ note ]
|
|
|
|
summary: Set permissions of a note
|
|
|
|
operationId: updateNotePermissions
|
|
|
|
requestBody:
|
|
|
|
required: true
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
"$ref": "#/components/schemas/NotePermissionsUpdate"
|
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: The updated permissions of the note.
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2020-10-03 12:08:31 -04:00
|
|
|
"$ref": "#/components/schemas/NotePermissions"
|
2020-10-03 06:46:28 -04:00
|
|
|
'401':
|
|
|
|
"$ref": "#/components/responses/UnauthorizedError"
|
|
|
|
'403':
|
|
|
|
"$ref": "#/components/responses/ForbiddenError"
|
|
|
|
'404':
|
|
|
|
"$ref": "#/components/responses/NotFoundError"
|
|
|
|
parameters:
|
|
|
|
- name: note
|
|
|
|
in: path
|
|
|
|
required: true
|
|
|
|
description: The note for which the info should be shown.
|
|
|
|
content:
|
|
|
|
text/plain:
|
|
|
|
example: my-note
|
2020-06-06 15:45:27 -04:00
|
|
|
/notes/{note}/revisions:
|
2022-01-23 16:02:58 -05:00
|
|
|
get:
|
|
|
|
tags:
|
|
|
|
- note
|
2020-06-06 17:26:48 -04:00
|
|
|
summary: Returns a list of the available note revisions
|
2020-05-24 15:00:16 -04:00
|
|
|
operationId: getAllRevisionsOfNote
|
2020-09-22 15:07:41 -04:00
|
|
|
description: The list contains the revision-id, the length and a ISO-timestamp of the creation date.
|
2022-01-23 16:02:58 -05:00
|
|
|
responses:
|
2020-05-28 16:19:15 -04:00
|
|
|
'200':
|
2020-06-06 17:26:48 -04:00
|
|
|
description: Revisions of the note.
|
2022-01-23 16:02:58 -05:00
|
|
|
content:
|
2020-05-24 15:00:16 -04:00
|
|
|
application/json:
|
2022-01-23 16:02:58 -05:00
|
|
|
schema:
|
2020-10-24 13:39:05 -04:00
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
"$ref": "#/components/schemas/NoteRevisionsMetadata"
|
2020-07-15 19:22:50 -04:00
|
|
|
'401':
|
|
|
|
"$ref": "#/components/responses/UnauthorizedError"
|
|
|
|
'403':
|
|
|
|
"$ref": "#/components/responses/ForbiddenError"
|
2020-05-28 16:19:15 -04:00
|
|
|
'404':
|
2020-07-15 19:22:50 -04:00
|
|
|
"$ref": "#/components/responses/NotFoundError"
|
2022-01-23 16:02:58 -05:00
|
|
|
parameters:
|
|
|
|
- name: note
|
|
|
|
in: path
|
|
|
|
required: true
|
2020-06-06 17:26:48 -04:00
|
|
|
description: The note for which revisions should be shown.
|
2022-01-23 16:02:58 -05:00
|
|
|
content:
|
2020-05-24 15:00:16 -04:00
|
|
|
text/plain:
|
2022-01-23 16:02:58 -05:00
|
|
|
example: my-note
|
2020-06-06 15:45:27 -04:00
|
|
|
/notes/{note}/revisions/{revision-id}:
|
2022-01-23 16:02:58 -05:00
|
|
|
get:
|
|
|
|
tags:
|
|
|
|
- note
|
2020-06-06 17:26:48 -04:00
|
|
|
summary: Returns the revision of the note with some metadata
|
2020-05-24 15:00:16 -04:00
|
|
|
operationId: getSpecificRevisionOfNote
|
2022-01-23 16:02:58 -05:00
|
|
|
description: The revision is returned as a JSON object with the content of the note and the authorship.
|
|
|
|
responses:
|
2020-05-28 16:19:15 -04:00
|
|
|
'200':
|
2020-09-22 15:07:41 -04:00
|
|
|
description: Revision of the note for the given id.
|
2022-01-23 16:02:58 -05:00
|
|
|
content:
|
2020-05-24 15:00:16 -04:00
|
|
|
application/json:
|
2022-01-23 16:02:58 -05:00
|
|
|
schema:
|
2020-05-24 15:00:16 -04:00
|
|
|
"$ref": "#/components/schemas/NoteRevision"
|
2020-07-15 19:22:50 -04:00
|
|
|
'401':
|
|
|
|
"$ref": "#/components/responses/UnauthorizedError"
|
|
|
|
'403':
|
|
|
|
"$ref": "#/components/responses/ForbiddenError"
|
2020-05-28 16:19:15 -04:00
|
|
|
'404':
|
2020-07-15 19:22:50 -04:00
|
|
|
"$ref": "#/components/responses/NotFoundError"
|
2022-01-23 16:02:58 -05:00
|
|
|
parameters:
|
|
|
|
- name: note
|
|
|
|
in: path
|
|
|
|
required: true
|
2020-06-06 17:26:48 -04:00
|
|
|
description: The note for which the revision should be shown.
|
2022-01-23 16:02:58 -05:00
|
|
|
content:
|
2020-05-24 15:00:16 -04:00
|
|
|
text/plain:
|
2022-01-23 16:02:58 -05:00
|
|
|
example: my-note
|
|
|
|
- name: revision-id
|
|
|
|
in: path
|
|
|
|
required: true
|
2020-09-22 15:07:41 -04:00
|
|
|
description: The id of the revision to fetch.
|
2022-01-23 16:02:58 -05:00
|
|
|
content:
|
2020-05-24 15:00:16 -04:00
|
|
|
text/plain:
|
2022-01-23 16:02:58 -05:00
|
|
|
example: 1570921051959
|
2020-07-15 19:22:50 -04:00
|
|
|
/notes/{note}/content:
|
|
|
|
get:
|
2020-07-09 20:29:44 -04:00
|
|
|
tags:
|
2020-07-15 19:22:50 -04:00
|
|
|
- note
|
|
|
|
- export
|
|
|
|
summary: Returns the raw markdown content of a note
|
|
|
|
operationId: getNoteContent
|
2020-07-09 20:29:44 -04:00
|
|
|
responses:
|
|
|
|
'200':
|
2020-07-15 19:22:50 -04:00
|
|
|
description: The raw markdown content of the note.
|
2020-07-09 20:29:44 -04:00
|
|
|
content:
|
2020-07-15 19:22:50 -04:00
|
|
|
'text/markdown':
|
2020-07-09 20:29:44 -04:00
|
|
|
schema:
|
2020-07-15 19:22:50 -04:00
|
|
|
type: string
|
|
|
|
format: binary
|
|
|
|
'401':
|
|
|
|
"$ref": "#/components/responses/UnauthorizedError"
|
|
|
|
'403':
|
|
|
|
"$ref": "#/components/responses/ForbiddenError"
|
|
|
|
'404':
|
|
|
|
"$ref": "#/components/responses/NotFoundError"
|
|
|
|
parameters:
|
|
|
|
- name: note
|
|
|
|
in: path
|
|
|
|
required: true
|
|
|
|
description: The note for which the markdown should be exported.
|
|
|
|
content:
|
|
|
|
text/plain:
|
|
|
|
example: my-note
|
2020-10-24 15:48:29 -04:00
|
|
|
/notes/{note}/media:
|
|
|
|
get:
|
|
|
|
tags: [ note, media ]
|
|
|
|
summary: Get list of files uploaded to the note
|
|
|
|
operationId: getOwnMedia
|
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description:
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
"$ref": "#/components/schemas/MediaUpload"
|
2020-10-17 14:58:10 -04:00
|
|
|
/media:
|
2020-07-09 20:29:44 -04:00
|
|
|
post:
|
|
|
|
tags:
|
|
|
|
- media
|
2020-10-17 14:55:40 -04:00
|
|
|
summary: Uploads a media file to the backend storage
|
|
|
|
description: Uploads a file to be processed by the backend.
|
2020-07-09 20:29:44 -04:00
|
|
|
requestBody:
|
|
|
|
required: true
|
2020-10-17 14:55:40 -04:00
|
|
|
description: The binary file to upload.
|
2020-07-15 19:22:50 -04:00
|
|
|
content:
|
2020-10-17 14:55:40 -04:00
|
|
|
image/apng:
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
format: binary
|
|
|
|
image/bmp:
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
format: binary
|
|
|
|
image/gif:
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
format: binary
|
|
|
|
image/heif:
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
format: binary
|
|
|
|
image/heic:
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
format: binary
|
|
|
|
image/heif-sequence:
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
format: binary
|
|
|
|
image/heic-sequence:
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
format: binary
|
|
|
|
image/jpeg:
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
format: binary
|
|
|
|
image/png:
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
format: binary
|
|
|
|
image/svg+xml:
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
format: binary
|
|
|
|
image/tiff:
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
format: binary
|
|
|
|
image/webp:
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
format: binary
|
|
|
|
parameters:
|
|
|
|
- in: header
|
|
|
|
name: HedgeDoc-Note
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
required: true
|
|
|
|
description: ID or alias of the parent note
|
2020-07-09 20:29:44 -04:00
|
|
|
responses:
|
2020-10-03 08:40:51 -04:00
|
|
|
'201':
|
2020-10-17 14:55:40 -04:00
|
|
|
description: The file was uploaded successfully.
|
2020-10-12 15:51:09 -04:00
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
link:
|
|
|
|
type: string
|
2020-07-15 19:22:50 -04:00
|
|
|
'401':
|
|
|
|
"$ref": "#/components/responses/UnauthorizedError"
|
|
|
|
'403':
|
|
|
|
"$ref": "#/components/responses/ForbiddenError"
|
2020-10-17 15:55:05 -04:00
|
|
|
/media/{filename}:
|
|
|
|
delete:
|
|
|
|
tags:
|
|
|
|
- media
|
|
|
|
summary: Delete the specified file
|
|
|
|
operationId: deleteMedia
|
|
|
|
parameters:
|
|
|
|
- name: filename
|
|
|
|
in: path
|
|
|
|
required: true
|
|
|
|
description: The name of the file to be deleted.
|
|
|
|
content:
|
|
|
|
text/plain:
|
|
|
|
example: e18d1b83e1821128615bad849ad0655a.jpg
|
|
|
|
responses:
|
|
|
|
'204':
|
|
|
|
"$ref": "#/components/responses/SuccessfullyDeleted"
|
|
|
|
'401':
|
|
|
|
"$ref": "#/components/responses/UnauthorizedError"
|
|
|
|
'403':
|
|
|
|
"$ref": "#/components/responses/ForbiddenError"
|
|
|
|
'404':
|
|
|
|
"$ref": "#/components/responses/NotFoundError"
|
2020-07-15 19:22:50 -04:00
|
|
|
/monitoring:
|
2020-05-27 08:58:49 -04:00
|
|
|
get:
|
|
|
|
tags:
|
2020-07-15 19:22:50 -04:00
|
|
|
- monitoring
|
|
|
|
summary: Returns the current status of the backend
|
|
|
|
operationId: getMonitoring
|
|
|
|
description: The data is returned as a JSON object containing the number of notes stored on the server, (distinct) online users and more.
|
2020-05-27 08:58:49 -04:00
|
|
|
responses:
|
2020-05-28 16:19:15 -04:00
|
|
|
'200':
|
2020-07-15 19:22:50 -04:00
|
|
|
description: The server info.
|
2020-05-27 08:58:49 -04:00
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2020-07-15 19:22:50 -04:00
|
|
|
"$ref": "#/components/schemas/ServerStatus"
|
|
|
|
'401':
|
|
|
|
"$ref": "#/components/responses/UnauthorizedError"
|
|
|
|
'403':
|
|
|
|
"$ref": "#/components/responses/ForbiddenError"
|
|
|
|
/monitoring/prometheus:
|
2020-06-06 16:51:39 -04:00
|
|
|
get:
|
|
|
|
tags:
|
2020-07-15 19:22:50 -04:00
|
|
|
- monitoring
|
|
|
|
summary: Returns the current status of the backend for Prometheus.
|
|
|
|
operationId: getPrometheus
|
|
|
|
description: The data is returned in Prometheus Exposition Format
|
2020-06-06 16:51:39 -04:00
|
|
|
responses:
|
|
|
|
'200':
|
2020-07-15 19:22:50 -04:00
|
|
|
description: Prometheus compatible monitoring data.
|
2020-06-06 16:51:39 -04:00
|
|
|
content:
|
2020-07-15 19:22:50 -04:00
|
|
|
text/plain: {}
|
|
|
|
'401':
|
|
|
|
"$ref": "#/components/responses/UnauthorizedError"
|
|
|
|
'403':
|
|
|
|
"$ref": "#/components/responses/ForbiddenError"
|
2020-05-24 15:00:16 -04:00
|
|
|
components:
|
|
|
|
schemas:
|
|
|
|
UserInfo:
|
|
|
|
type: object
|
|
|
|
properties:
|
2020-07-15 19:22:50 -04:00
|
|
|
userName:
|
2020-05-24 15:00:16 -04:00
|
|
|
type: string
|
2020-07-15 19:22:50 -04:00
|
|
|
displayName:
|
2020-05-24 15:00:16 -04:00
|
|
|
type: string
|
|
|
|
photo:
|
|
|
|
type: string
|
|
|
|
format: uri
|
2020-07-15 19:22:50 -04:00
|
|
|
email:
|
2020-05-29 11:27:52 -04:00
|
|
|
type: string
|
2020-07-15 19:22:50 -04:00
|
|
|
format: email
|
2020-05-29 11:27:52 -04:00
|
|
|
UserPasswordChange:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
password:
|
|
|
|
type: string
|
2020-10-03 06:46:28 -04:00
|
|
|
GroupInfo:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
name:
|
|
|
|
type: string
|
|
|
|
displayName:
|
|
|
|
type: string
|
|
|
|
special:
|
|
|
|
type: boolean
|
2020-07-09 20:29:44 -04:00
|
|
|
ImageProxyRequest:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
src:
|
|
|
|
type: string
|
|
|
|
description: The url of the image that should be processed by the image proxy.
|
|
|
|
ImageProxyResponse:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
src:
|
|
|
|
type: string
|
|
|
|
description: The url of the provied version of the image.
|
2020-05-25 06:04:29 -04:00
|
|
|
Note:
|
2020-07-15 19:22:50 -04:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
content:
|
|
|
|
type: string
|
|
|
|
description: The markdown content of the note
|
|
|
|
metadata:
|
|
|
|
$ref: "#/components/schemas/NoteMetadata"
|
|
|
|
editedByAtPosition:
|
|
|
|
type: array
|
|
|
|
description: Data which gives insights about who worked where on the note.
|
|
|
|
items:
|
|
|
|
type: integer
|
2020-08-17 17:14:38 -04:00
|
|
|
description: Unique user ids and additional data
|
2020-07-15 19:22:50 -04:00
|
|
|
NoteMetadata:
|
2020-05-25 06:04:29 -04:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
type: string
|
|
|
|
format: UUIDv4
|
2020-06-06 17:26:48 -04:00
|
|
|
description: The id of the note.
|
2020-05-25 06:04:29 -04:00
|
|
|
alias:
|
|
|
|
type: string
|
2020-06-06 17:26:48 -04:00
|
|
|
description: The alias of the note.
|
2020-07-15 19:22:50 -04:00
|
|
|
title:
|
|
|
|
type: string
|
|
|
|
description: Title of the note
|
|
|
|
description:
|
|
|
|
type: string
|
|
|
|
description: Description of the note.
|
|
|
|
tags:
|
|
|
|
type: array
|
|
|
|
description: A list of tags attached to the note.
|
|
|
|
items:
|
|
|
|
type: string
|
|
|
|
description: A tag
|
|
|
|
updateTime:
|
2020-10-01 06:22:52 -04:00
|
|
|
type: string
|
2020-09-22 15:07:41 -04:00
|
|
|
description: ISO-timestamp of when the note was last changed.
|
2020-08-17 17:16:08 -04:00
|
|
|
updateUser:
|
|
|
|
$ref: "#/components/schemas/UserInfo"
|
2020-07-15 19:22:50 -04:00
|
|
|
viewCount:
|
2020-05-27 05:30:32 -04:00
|
|
|
type: integer
|
|
|
|
minimum: 0
|
2020-06-06 17:26:48 -04:00
|
|
|
description: How often the published version of the note was viewed.
|
2020-07-15 19:22:50 -04:00
|
|
|
createTime:
|
2020-05-27 05:30:32 -04:00
|
|
|
type: string
|
2020-09-22 15:07:41 -04:00
|
|
|
description: The ISO-timestamp when the note was created in ISO 8601 format.
|
2020-07-15 19:22:50 -04:00
|
|
|
editedBy:
|
2020-05-25 06:04:29 -04:00
|
|
|
type: array
|
2020-07-15 19:22:50 -04:00
|
|
|
description: List of usernames who edited the note.
|
2020-05-25 06:04:29 -04:00
|
|
|
items:
|
2020-07-15 19:22:50 -04:00
|
|
|
type: string
|
|
|
|
permissions:
|
|
|
|
$ref: "#/components/schemas/NotePermissions"
|
2020-05-27 07:20:37 -04:00
|
|
|
NotePermissions:
|
|
|
|
type: object
|
|
|
|
properties:
|
2020-07-15 19:22:50 -04:00
|
|
|
owner:
|
2020-10-03 06:46:28 -04:00
|
|
|
$ref: "#/components/schemas/UserInfo"
|
|
|
|
sharedToUsers:
|
|
|
|
type: array
|
|
|
|
description: Contains all users that can read the note and a boolean that denotes if they can also edit.
|
|
|
|
items:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
user:
|
|
|
|
$ref: "#/components/schemas/UserInfo"
|
|
|
|
canEdit:
|
|
|
|
type: boolean
|
|
|
|
sharedToGroups:
|
|
|
|
type: array
|
|
|
|
description: Contains all groups that can read the note and a boolean that denotes if they can also edit.
|
|
|
|
items:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
group:
|
|
|
|
$ref: "#/components/schemas/GroupInfo"
|
|
|
|
canEdit:
|
|
|
|
type: boolean
|
|
|
|
NotePermissionsUpdate:
|
|
|
|
type: object
|
|
|
|
description: Contains only title, description and tags of a note.
|
|
|
|
properties:
|
|
|
|
sharedToUsers:
|
2020-07-15 19:22:50 -04:00
|
|
|
type: array
|
|
|
|
description: Contains all usernames that can read the note and a boolean that denotes if they can also edit.
|
|
|
|
items:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
username:
|
|
|
|
type: string
|
|
|
|
canEdit:
|
|
|
|
type: boolean
|
2020-10-03 06:46:28 -04:00
|
|
|
sharedToGroups:
|
|
|
|
type: array
|
|
|
|
description: Contains all groups that can read the note and a boolean that denotes if they can also edit.
|
|
|
|
items:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
groupname:
|
|
|
|
type: string
|
|
|
|
canEdit:
|
|
|
|
type: boolean
|
2020-05-24 15:00:16 -04:00
|
|
|
NoteRevisionsMetadata:
|
2020-10-24 13:39:05 -04:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
type: integer
|
|
|
|
description: The id of the revision
|
|
|
|
createdTime:
|
|
|
|
type: string
|
|
|
|
description: ISO-timestamp of when the revision was saved. Is also the revision-id.
|
|
|
|
length:
|
|
|
|
type: integer
|
|
|
|
description: Length of the document to the timepoint the revision was saved.
|
2020-05-24 15:00:16 -04:00
|
|
|
NoteRevision:
|
|
|
|
type: object
|
|
|
|
properties:
|
2022-01-23 16:02:58 -05:00
|
|
|
content:
|
2020-05-24 15:00:16 -04:00
|
|
|
type: string
|
2020-06-06 17:26:48 -04:00
|
|
|
description: The raw markdown content of the note revision.
|
2020-05-24 15:00:16 -04:00
|
|
|
authorship:
|
|
|
|
type: array
|
2020-06-06 17:26:48 -04:00
|
|
|
description: Data which gives insights about who worked on the note.
|
2020-05-24 15:00:16 -04:00
|
|
|
items:
|
|
|
|
type: integer
|
2020-06-06 17:26:48 -04:00
|
|
|
description: Unique user ids and additional data.
|
2020-05-24 15:00:16 -04:00
|
|
|
patch:
|
|
|
|
type: array
|
2020-06-06 17:26:48 -04:00
|
|
|
description: Data which gives insight about what changed in comparison to former revisions.
|
2020-05-24 15:00:16 -04:00
|
|
|
items:
|
|
|
|
type: string
|
2020-05-27 05:30:32 -04:00
|
|
|
GistLink:
|
2020-05-24 15:00:16 -04:00
|
|
|
type: object
|
|
|
|
properties:
|
2020-05-27 05:30:32 -04:00
|
|
|
link:
|
2020-05-24 15:00:16 -04:00
|
|
|
type: string
|
2020-05-27 05:30:32 -04:00
|
|
|
format: uri
|
2020-06-06 17:26:48 -04:00
|
|
|
description: A Gist link.
|
2020-05-27 05:30:32 -04:00
|
|
|
DropboxLink:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
link:
|
2020-05-24 15:00:16 -04:00
|
|
|
type: string
|
2020-05-27 05:30:32 -04:00
|
|
|
format: uri
|
2020-06-06 17:26:48 -04:00
|
|
|
description: A Dropbox link.
|
2020-05-24 15:00:16 -04:00
|
|
|
EmailLogin:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
email:
|
|
|
|
type: string
|
|
|
|
format: email
|
|
|
|
password:
|
|
|
|
type: string
|
|
|
|
format: password
|
2020-05-27 05:30:32 -04:00
|
|
|
LdapLogin:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
username:
|
|
|
|
type: string
|
|
|
|
format: email
|
|
|
|
password:
|
|
|
|
type: string
|
|
|
|
format: password
|
2020-05-24 15:00:16 -04:00
|
|
|
ServerStatus:
|
|
|
|
type: object
|
|
|
|
properties:
|
2020-06-09 15:42:43 -04:00
|
|
|
serverVersion:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
major:
|
|
|
|
type: integer
|
|
|
|
minor:
|
|
|
|
type: integer
|
|
|
|
patch:
|
|
|
|
type: integer
|
|
|
|
preRelease:
|
|
|
|
type: string
|
|
|
|
commit:
|
|
|
|
type: string
|
|
|
|
description: Version of the server specified according to SemVer specification
|
2020-05-24 15:00:16 -04:00
|
|
|
onlineNotes:
|
|
|
|
type: integer
|
2020-06-06 17:26:48 -04:00
|
|
|
description: How many notes are edited at the moment.
|
2020-05-24 15:00:16 -04:00
|
|
|
onlineUsers:
|
|
|
|
type: integer
|
2020-06-06 17:26:48 -04:00
|
|
|
description: How many users are online at the moment.
|
2020-05-24 15:00:16 -04:00
|
|
|
distinctOnlineUsers:
|
|
|
|
type: integer
|
2020-06-06 17:26:48 -04:00
|
|
|
description: How many distinct users (different machines) are online at the moment.
|
2020-05-24 15:00:16 -04:00
|
|
|
notesCount:
|
|
|
|
type: integer
|
2020-06-06 17:26:48 -04:00
|
|
|
description: How many notes are stored on the server.
|
2020-05-24 15:00:16 -04:00
|
|
|
registeredUsers:
|
|
|
|
type: integer
|
2020-06-06 17:26:48 -04:00
|
|
|
description: How many users are registered on the server.
|
2020-05-24 15:00:16 -04:00
|
|
|
onlineRegisteredUsers:
|
|
|
|
type: integer
|
2020-06-06 17:26:48 -04:00
|
|
|
description: How many of the online users are registered on the server.
|
2020-05-24 15:00:16 -04:00
|
|
|
distinctOnlineRegisteredUsers:
|
|
|
|
type: integer
|
2020-06-06 17:26:48 -04:00
|
|
|
description: How many of the distinct online users are registered on the server.
|
2020-05-24 15:00:16 -04:00
|
|
|
isConnectionBusy:
|
|
|
|
type: boolean
|
|
|
|
connectionSocketQueueLength:
|
|
|
|
type: integer
|
|
|
|
isDisconnectBusy:
|
|
|
|
type: boolean
|
|
|
|
disconnectSocketQueueLength:
|
|
|
|
type: integer
|
2020-10-24 13:39:34 -04:00
|
|
|
History:
|
2020-05-27 08:34:25 -04:00
|
|
|
type: object
|
|
|
|
properties:
|
2020-07-15 19:22:50 -04:00
|
|
|
metadata:
|
|
|
|
$ref: "#/components/schemas/NoteMetadata"
|
2020-05-27 08:34:25 -04:00
|
|
|
pinned:
|
|
|
|
type: boolean
|
2020-06-06 17:26:48 -04:00
|
|
|
description: Whether the user has pinned this note.
|
2020-10-24 13:39:34 -04:00
|
|
|
HistoryUpdate:
|
2020-10-03 06:49:50 -04:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
pinned:
|
|
|
|
type: boolean
|
|
|
|
description: Whether the user has pinned this note.
|
2020-05-27 08:34:25 -04:00
|
|
|
History:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
history:
|
|
|
|
type: array
|
2020-06-06 17:26:48 -04:00
|
|
|
description: The array that contains history objects.
|
2020-05-27 08:34:25 -04:00
|
|
|
items:
|
|
|
|
"$ref": "#/components/schemas/HistoryObject"
|
2020-10-24 15:48:29 -04:00
|
|
|
MediaUpload:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
url:
|
|
|
|
type: string
|
|
|
|
description: URL of the file
|
2021-03-14 12:47:16 -04:00
|
|
|
owningNote:
|
|
|
|
type: string
|
|
|
|
description: ID of the note the file was uploaded to
|
2020-10-24 15:48:29 -04:00
|
|
|
createdAt:
|
|
|
|
type: string
|
|
|
|
format: date-time
|
|
|
|
description: Date when the file was upladed
|
2021-03-14 12:47:16 -04:00
|
|
|
owningUser:
|
|
|
|
type: string
|
|
|
|
description: username of the user who uploaded the file
|
|
|
|
|
|
|
|
|
2020-05-24 15:00:16 -04:00
|
|
|
examples:
|
|
|
|
markdownExample:
|
|
|
|
value: '# Some header\nSome normal text. **Some bold text**'
|
|
|
|
summary: A sample markdown content
|
2020-07-15 19:22:50 -04:00
|
|
|
securitySchemes:
|
|
|
|
bearerAuth:
|
|
|
|
type: http
|
|
|
|
scheme: bearer
|
|
|
|
responses:
|
|
|
|
UnauthorizedError:
|
|
|
|
description: Authorization information is missing or invalid.
|
|
|
|
ForbiddenError:
|
|
|
|
description: Access to the requested resource is not permitted.
|
|
|
|
NotFoundError:
|
|
|
|
description: The requested resource was not found.
|
2020-08-17 17:14:38 -04:00
|
|
|
SuccessfullyDeleted:
|
2020-07-15 19:22:50 -04:00
|
|
|
description: The requested resource was sucessfully deleted.
|