GET /notes
200
โโโโโโ [
โโโโโโ {
โโโโโโ "id": "ehgwc6a8RXSmcSaRwIQ2jw",
โโโโโโ "title": "Personal note title",
โโโโโโ "tags": ["personal", "test"],
โโโโโโ "createdAt": 1643270371245,
โโโโโโ "publishType": "view",
โโโโโโ "publishedAt": null,
โโโโโโ "permalink": null,
โโโโโโ "shortId": "SysJb0yAY",
โโโโโโ "lastChangedAt": 1643270452413,
โโโโโโ "lastChangeUser": {
โโโโโโ "name": "James",
โโโโโโ "photo": "https://avatars.githubusercontent.com/u/26138990?s=96",
โโโโโโ "biography": null,
โโโโโโ "userPath": "AMQ36J15QgCZf46ThEFadg"
โโโโโโ },
โโโโโโ "userPath": "AMQ36J15QgCZf46ThEFadg",
โโโโโโ "teamPath": null,
โโโโโโ "readPermission": "guest",
โโโโโโ "writePermission": "signed_in",
โโโโโโ "publishLink": "https://hackmd.io/@username/permalink"
โโโโโโ }
โโโโโโ ]
GET /notes/:noteId
200
โโโโโโโโ {
โโโโโโโโ "id": "ehgwc6a8RXSmcSaRwIQ2jw",
โโโโโโโโ "title": "Personal note title",
โโโโโโโโ "tags": [
โโโโโโโโ "Personal",
โโโโโโโโ "test"
โโโโโโโโ ],
โโโโโโโโ "createdAt": 1643270371245,
โโโโโโโโ "publishType": "view",
โโโโโโโโ "publishedAt": null,
โโโโโโโโ "permalink": null,
โโโโโโโโ "shortId": "SysJb0yAY",
โโโโโโโโ "content": "# Personal note title\n###### tags: `Personal` `test`",
โโโโโโโโ "lastChangedAt": 1644461594806,
โโโโโโโโ "lastChangeUser": {
โโโโโโโโ "name": "James",
โโโโโโโโ "photo": "https://avatars.githubusercontent.com/u/26138990?s=96",
โโโโโโโโ "biography": null,
โโโโโโโโ "userPath": "AMQ36J15QgCZf46ThEFadg"
โโโโโโโโ },
โโโโโโโโ "userPath": "AMQ36J15QgCZf46ThEFadg",
โโโโโโโโ "teamPath": null,
โโโโโโโโ "readPermission": "guest",
โโโโโโโโ "writePermission": "signed_in",
โโโโโโโโ "publishLink": "https://hackmd.io/@username/permalink"
โโโโโโโโ }
POST /notes
body (optional) [application/json]
โโโโโโโโ{
โโโโโโโโ "title": "New note",
โโโโโโโโ "content": "",
โโโโโโโโ "readPermission": "owner",
โโโโโโโโ "writePermission": "owner",
โโโโโโโโ "commentPermission": "everyone"
โโโโโโโโ}
field | type | values |
---|---|---|
title | string | |
content | string | |
readPermission | string | owner , signed_in , guest |
writePermission | string | owner , signed_in , guest |
commentPermission | string | disabled , forbidden , owners , signed_in_users , everyone |
permalink | string |
Success Response
201
โโโโโโโโโโโโโ {
โโโโโโโโโโโโโ "id": "ppZ6pJ9iRFa7RHHUegcLiQ",
โโโโโโโโโโโโโ "title": "New note",
โโโโโโโโโโโโโ "tags": null,
โโโโโโโโโโโโโ "createdAt": 1644461842833,
โโโโโโโโโโโโโ "publishType": "view",
โโโโโโโโโโโโโ "publishedAt": null,
โโโโโโโโโโโโโ "permalink": null,
โโโโโโโโโโโโโ "shortId": "HyiMJWMk9",
โโโโโโโโโโโโโ "content": "test",
โโโโโโโโโโโโโ "lastChangedAt": 1644461842832,
โโโโโโโโโโโโโ "lastChangeUser": {
โโโโโโโโโโโโโ "name": "James",
โโโโโโโโโโโโโ "photo": "https://avatars.githubusercontent.com/u/26138990?s=96",
โโโโโโโโโโโโโ "biography": null,
โโโโโโโโโโโโโ "userPath": "AMQ36J15QgCZf46ThEFadg"
โโโโโโโโโโโโโ },
โโโโโโโโโโโโโ "userPath": "AMQ36J15QgCZf46ThEFadg",
โโโโโโโโโโโโโ "teamPath": null,
โโโโโโโโโโโโโ "readPermission": "owner",
โโโโโโโโโโโโโ "writePermission": "owner",
โโโโโโโโโโโโโ "publishLink": "https://hackmd.io/@username/permalink"
โโโโโโโโโโโโโ }
Title
fieldAs for now, the title of a note is derived from the content, thus the behavior of "title" field may need further explanation.
---\ntitle: abc\n---
), then it will be the title of the note.readPermission
and writePermission
field must be provided at the same time.writePermission
must be stricter than readPermission
field. For example, a signed_in
user readable note, you can set owner
or signed_in
writable permission, but you can't set guest
writable permission for that note.PATCH /notes/:noteId
โโโโ {
โโโโ "content": "# Updated personal note",
โโโโ "readPermission": "signed_in",
โโโโ "writePermission": "owner",
โโโโ "permalink": "note-permalink"
โโโโ }
field | type | values |
---|---|---|
content | string | |
readPermission | string | owner , signed_in , guest |
writePermission | string | owner , signed_in , guest |
permalink | string |
DELETE /notes/:noteId
GET /history
โโโโโโ [
โโโโโโ {
โโโโโโ "id": "0jJVr2b3T2eSkBnMib-inA",
โโโโโโ "title": "Team notes",
โโโโโโ "tags": [],
โโโโโโ "createdAt": 1644371283239,
โโโโโโ "publishType": "view",
โโโโโโ "publishedAt": 1644371283239,
โโโโโโ "permalink": null,
โโโโโโ "shortId": "SysUa9xJc",
โโโโโโ "lastChangedAt": 1644461300662,
โโโโโโ "lastChangeUser": {
โโโโโโ "name": "James",
โโโโโโ "photo": "https://avatars.githubusercontent.com/u/26138990?s=96",
โโโโโโ "biography": null,
โโโโโโ "userPath": "AMQ36J15QgCZf46ThEFadg"
โโโโโโ },
โโโโโโ "userPath": null,
โโโโโโ "teamPath": "CAT",
โโโโโโ "readPermission": "guest",
โโโโโโ "writePermission": "signed_in",
โโโโโโ "publishLink": "https://hackmd.io/@username/permalink"
โโโโโโ },
โโโโโโ {
โโโโโโ "id": "QpS6V2TCSbeKmNIS1LOrNQ",
โโโโโโ "title": "Untitled",
โโโโโโ "tags": null,
โโโโโโ "createdAt": 1644393142405,
โโโโโโ "publishType": "view",
โโโโโโ "publishedAt": null,
โโโโโโ "permalink": null,
โโโโโโ "shortId": "HJAnGgZyq",
โโโโโโ "lastChangedAt": 1644393142403,
โโโโโโ "lastChangeUser": {
โโโโโโ "name": "Ming-Hsiu Tsai",
โโโโโโ "photo": "https://avatars.githubusercontent.com/u/26138990?s=96",
โโโโโโ "biography": null,
โโโโโโ "userPath": "AMQ36J15QgCZf46ThEFadg"
โโโโโโ },
โโโโโโ "userPath": "AMQ36J15QgCZf46ThEFadg",
โโโโโโ "teamPath": null,
โโโโโโ "readPermission": "owner",
โโโโโโ "writePermission": "owner",
โโโโโโ "publishLink": "https://hackmd.io/@username/permalink"
โโโโโโ }
โโโโโโ ]
POST /notes/:noteId/upload
file: xxx