-
Notifications
You must be signed in to change notification settings - Fork 18
whiteboard
Home >> Whiteboard
A "whiteboard" is a virtual document that can be used to store information about the current project, e.g.
{
"rest.api": {
// ...
"whiteboard": {
"dir": "./myWhiteBoardRevisionFiles"
}
}
}
Name | Description |
---|---|
dir |
The directory where all revision files should be stored. If not defined, all revisions will be stored in memory and will be lost, when the editor is closed. |
isActive |
Indicates if "whiteboard" feature is active or not. Default: (true)
|
Deletes the whiteboard and all its revisions.
canDelete property must be set to (true)
for an user or guest in the settings to access the endpoint.
DELETE /api/whiteboard
Possible response:
Connection: keep-alive
Date: 2017 Feb 19 18:04:18
Transfer-Encoding: chunked
X-Vscode-Restapi: 1.16.0
{
"code": 0
}
Code | Description |
---|---|
403 |
User has no right to delete the whiteboard. |
404 |
Whiteboard is not available. |
Gets the current (or a specific) revision of the whiteboard.
GET /api/whiteboard
Possible response:
Connection: keep-alive
Content-Type: text/markdown; charset=utf-8
Date: 2017 Feb 19 18:04:18
Transfer-Encoding: chunked
X-Vscode-Restapi: 1.16.0
X-Vscode-Restapi-Revision: 0
X-Vscode-Restapi-Title: My whiteboard
# My project
This is a sample whiteboard document written in Markdown
GET /api/whiteboard/3
Possible response:
Connection: keep-alive
Content-Type: text/markdown; charset=utf-8
Date: 2017 Feb 19 18:04:18
Transfer-Encoding: chunked
X-Vscode-Restapi: 1.16.0
X-Vscode-Restapi-Revision: 3
X-Vscode-Restapi-Title: My whiteboard
# My project
This is a sample whiteboard document written in Markdown, Version 4
Code | Description |
---|---|
404 |
Whiteboard is not available or there is currently no (matching) document available. |
Resets the whiteboard with a new document.
canDelete and canWrite properties must be set to (true)
for an user or guest in the settings to access the endpoint.
POST /api/whiteboard
{
"content": "IyBNeSBwcm9qZWN0XG5cblRoaXMgaXMgYSBzYW1wbGUgd2hpdGVib2FyZCBkb2N1bWVudCB3cml0dGVuIGluIE1hcmtkb3du",
"encoding": "utf8",
"mime": "text/markdown",
"title": "My whiteboard"
}
Instead of using a NewWhiteboardRevision object, which stores the content in Base64 format, you can submit a JSON parsed string that is handled as text/plain
utf-8
encoded document.
Possible response:
Connection: keep-alive
Content-Encoding: gzip
Content-Type: application/json; charset=utf-8
Date: 2017 Feb 19 18:20:33
Transfer-Encoding: chunked
X-Vscode-Restapi: 1.16.0
X-Vscode-Restapi-Revision: 0
X-Vscode-Restapi-Title: My whiteboard
{
"code": 0,
"data": {
"path": "/api/whiteboard/0",
"revision": 0,
"title": "My whiteboard",
"mime": "text/markdown",
"encoding": "utf-8",
"length": 72
}
}
Code | Description |
---|---|
403 |
User has no right to reset the whiteboard with new content. |
404 |
Whiteboard is not available. |
Adds a new revision of a document to the whiteboard.
canWrite property must be set to (true)
for an user or guest in the settings to access the endpoint.
PUT /api/whiteboard
{
"content": "IyBNeSBwcm9qZWN0XG5cblRoaXMgaXMgYSBzYW1wbGUgd2hpdGVib2FyZCBkb2N1bWVudCB3cml0dGVuIGluIE1hcmtkb3du",
"encoding": "utf8",
"mime": "text/markdown",
"title": "My whiteboard"
}
Instead of using a NewWhiteboardRevision object, which stores the content in Base64 format, you can submit a JSON parsed string that is handled as text/plain
utf-8
encoded document.
Possible response:
Connection: keep-alive
Content-Encoding: gzip
Content-Type: application/json; charset=utf-8
Date: 2017 Feb 19 18:20:33
Transfer-Encoding: chunked
X-Vscode-Restapi: 1.16.0
X-Vscode-Restapi-Revision: 0
X-Vscode-Restapi-Title: My whiteboard
{
"code": 0,
"data": {
"path": "/api/whiteboard/7",
"revision": 7,
"title": "My whiteboard",
"mime": "text/markdown",
"encoding": "utf-8",
"length": 72
}
}
Code | Description |
---|---|
403 |
User has no right to add a new revision to the whiteboard. |
404 |
Whiteboard is not available. |